|
2 | 2 | <html lang="en">
|
3 | 3 | <head>
|
4 | 4 | <meta charset="UTF-8" />
|
| 5 | + <meta |
| 6 | + name="viewport" |
| 7 | + content="width=device-width, initial-scale=1.0, user-scalable=yes" |
| 8 | + /> |
5 | 9 | <title>WordPress PHP Playground</title>
|
6 | 10 | <style>
|
7 | 11 | html,
|
|
54 | 58 | gap: 8px;
|
55 | 59 | }
|
56 | 60 |
|
| 61 | + .controls-right button { |
| 62 | + padding: 6px 12px; |
| 63 | + border: 1px solid #ccc; |
| 64 | + border-radius: 4px; |
| 65 | + background: white; |
| 66 | + cursor: pointer; |
| 67 | + transition: background-color 0.2s; |
| 68 | + } |
| 69 | + |
| 70 | + .controls-right button:hover { |
| 71 | + background: #f0f0f0; |
| 72 | + } |
| 73 | + |
| 74 | + .controls-right select { |
| 75 | + padding: 6px 8px; |
| 76 | + border: 1px solid #ccc; |
| 77 | + border-radius: 4px; |
| 78 | + background: white; |
| 79 | + } |
| 80 | + |
57 | 81 | #helpBtn {
|
58 | 82 | color: #0073aa;
|
59 | 83 | text-decoration: none;
|
|
228 | 252 | }
|
229 | 253 |
|
230 | 254 | /* Responsive layout: stack panes on small screens */
|
231 |
| - @media (max-width: 900px) { |
| 255 | + @media (max-width: 1200px) { |
232 | 256 | #app {
|
233 | 257 | flex-direction: column;
|
234 | 258 | }
|
235 | 259 | #previewPane {
|
236 |
| - height: 50vh; |
| 260 | + height: 45vh; |
| 261 | + min-width: 0; |
| 262 | + } |
| 263 | + #editorPane { |
237 | 264 | min-width: 0;
|
238 | 265 | }
|
| 266 | + } |
| 267 | + |
| 268 | + /* Tablet and small desktop adjustments */ |
| 269 | + @media (max-width: 900px) { |
| 270 | + .controls h1 { |
| 271 | + font-size: 16px; |
| 272 | + } |
| 273 | + .controls-right { |
| 274 | + gap: 6px; |
| 275 | + } |
| 276 | + .controls-right label, |
| 277 | + .controls-right select, |
| 278 | + .controls-right button, |
| 279 | + .controls-right a { |
| 280 | + font-size: 14px; |
| 281 | + } |
| 282 | + #previewPane { |
| 283 | + height: 40vh; |
| 284 | + } |
| 285 | + } |
| 286 | + |
| 287 | + /* Mobile phone adjustments */ |
| 288 | + @media (max-width: 768px) { |
| 289 | + .controls { |
| 290 | + flex-direction: column; |
| 291 | + align-items: stretch; |
| 292 | + gap: 8px; |
| 293 | + padding: 12px; |
| 294 | + } |
| 295 | + .controls h1 { |
| 296 | + font-size: 14px; |
| 297 | + text-align: center; |
| 298 | + margin-bottom: 4px; |
| 299 | + } |
| 300 | + .controls-right { |
| 301 | + justify-content: center; |
| 302 | + flex-wrap: wrap; |
| 303 | + gap: 8px; |
| 304 | + } |
| 305 | + .controls-right button { |
| 306 | + padding: 8px 12px; |
| 307 | + min-height: 44px; /* Touch-friendly */ |
| 308 | + } |
| 309 | + .controls-right select { |
| 310 | + min-height: 44px; /* Touch-friendly */ |
| 311 | + } |
| 312 | + #previewPane { |
| 313 | + height: 35vh; |
| 314 | + } |
| 315 | + #editor .cm-editor { |
| 316 | + font-size: 13px; |
| 317 | + } |
| 318 | + } |
| 319 | + |
| 320 | + /* Small mobile adjustments */ |
| 321 | + @media (max-width: 480px) { |
| 322 | + .controls { |
| 323 | + padding: 8px; |
| 324 | + } |
| 325 | + .controls h1 { |
| 326 | + font-size: 13px; |
| 327 | + } |
| 328 | + .controls-right { |
| 329 | + font-size: 13px; |
| 330 | + } |
| 331 | + .controls-right button, |
| 332 | + .controls-right select { |
| 333 | + min-height: 40px; |
| 334 | + font-size: 13px; |
| 335 | + } |
| 336 | + #helpBtn { |
| 337 | + font-size: 12px; |
| 338 | + } |
| 339 | + #previewPane { |
| 340 | + height: 30vh; |
| 341 | + } |
| 342 | + #editor .cm-editor { |
| 343 | + font-size: 12px; |
| 344 | + line-height: 1.3; |
| 345 | + } |
| 346 | + } |
| 347 | + |
| 348 | + /* Modal responsive styles */ |
| 349 | + @media (max-width: 768px) { |
239 | 350 | .modal-content {
|
240 |
| - margin: 10px; |
241 |
| - max-width: calc(100% - 20px); |
| 351 | + margin: 5px; |
| 352 | + max-width: calc(100% - 10px); |
| 353 | + max-height: calc(100vh - 10px); |
| 354 | + border-radius: 6px; |
| 355 | + padding: 16px; |
| 356 | + } |
| 357 | + .modal-header h2 { |
| 358 | + font-size: 18px; |
| 359 | + } |
| 360 | + .modal-body { |
| 361 | + font-size: 14px; |
| 362 | + } |
| 363 | + .modal-body h3 { |
| 364 | + font-size: 16px; |
| 365 | + } |
| 366 | + .modal-body h4 { |
| 367 | + font-size: 15px; |
| 368 | + } |
| 369 | + .modal-body pre { |
| 370 | + font-size: 11px !important; |
| 371 | + overflow-x: auto; |
| 372 | + white-space: pre-wrap; |
| 373 | + word-break: break-all; |
| 374 | + } |
| 375 | + } |
| 376 | + |
| 377 | + /* Very small screens */ |
| 378 | + @media (max-width: 360px) { |
| 379 | + .controls-right { |
| 380 | + flex-direction: column; |
| 381 | + align-items: center; |
| 382 | + } |
| 383 | + .controls-right button, |
| 384 | + .controls-right select { |
| 385 | + width: 100%; |
| 386 | + max-width: 200px; |
| 387 | + } |
| 388 | + } |
| 389 | + |
| 390 | + /* Landscape phone orientation */ |
| 391 | + @media (max-height: 500px) and (orientation: landscape) { |
| 392 | + #app { |
| 393 | + flex-direction: row; |
| 394 | + } |
| 395 | + #previewPane { |
| 396 | + height: auto; |
| 397 | + width: 50%; |
| 398 | + } |
| 399 | + .controls { |
| 400 | + padding: 4px 8px; |
| 401 | + } |
| 402 | + .controls h1 { |
| 403 | + font-size: 12px; |
| 404 | + } |
| 405 | + .controls-right { |
| 406 | + gap: 4px; |
242 | 407 | }
|
243 | 408 | }
|
244 | 409 | </style>
|
|
0 commit comments