Spaces:
Running on Zero
Running on Zero
fix(frontend): group source and result panels for responsive layout
#1
by fffiloni - opened
- index.html +78 -50
index.html
CHANGED
|
@@ -103,11 +103,21 @@
|
|
| 103 |
min-height: 0;
|
| 104 |
display: grid;
|
| 105 |
grid-template-columns: 1fr 1fr;
|
| 106 |
-
grid-template-rows: auto 1fr auto;
|
| 107 |
border-bottom: 1px solid var(--rule);
|
| 108 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
.cell { padding: 0 28px; min-width: 0; min-height: 0; }
|
| 110 |
-
.cell.right { border-left: 1px solid var(--rule); }
|
| 111 |
|
| 112 |
.cell.head {
|
| 113 |
padding-top: 14px; padding-bottom: 8px;
|
|
@@ -261,14 +271,28 @@
|
|
| 261 |
body { overflow: auto; }
|
| 262 |
.hero { padding: 12px 18px; gap: 8px; }
|
| 263 |
.hero p { margin-left: 0; }
|
|
|
|
| 264 |
main {
|
| 265 |
grid-template-columns: 1fr;
|
| 266 |
-
grid-template-rows: auto auto auto auto auto auto;
|
| 267 |
}
|
| 268 |
-
|
| 269 |
-
.
|
| 270 |
-
|
| 271 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 272 |
}
|
| 273 |
</style>
|
| 274 |
</head>
|
|
@@ -286,53 +310,57 @@
|
|
| 286 |
</header>
|
| 287 |
|
| 288 |
<main>
|
| 289 |
-
<
|
| 290 |
-
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
| 294 |
-
|
| 295 |
-
<
|
| 296 |
-
|
| 297 |
-
|
| 298 |
-
|
| 299 |
-
|
| 300 |
-
|
| 301 |
-
|
| 302 |
-
<div class="placeholder" id="placeholder">
|
| 303 |
-
<div class="glyph">+</div>
|
| 304 |
-
<div class="small"><b>Click</b> or <b>drop</b> a photo here · JPG · PNG · WEBP</div>
|
| 305 |
</div>
|
| 306 |
-
<
|
| 307 |
</div>
|
| 308 |
-
|
| 309 |
-
|
| 310 |
-
|
| 311 |
-
|
| 312 |
-
|
| 313 |
-
|
| 314 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 315 |
</div>
|
| 316 |
-
|
| 317 |
-
|
| 318 |
-
|
| 319 |
-
|
| 320 |
-
|
| 321 |
-
|
| 322 |
-
<div class="presets" id="presets">
|
| 323 |
-
<button class="preset" type="button" data-p="Convert it to black and white with subtle film grain.">B&W film</button>
|
| 324 |
-
<button class="preset" type="button" data-p="Transform the image into a soft watercolor painting.">Watercolor</button>
|
| 325 |
-
<button class="preset" type="button" data-p="Cinematic polaroid with soft grain, subtle vignette, gentle lighting, white frame, preserving realistic texture.">Polaroid</button>
|
| 326 |
-
<button class="preset" type="button" data-p="Convert into a clean line-art ink drawing on white paper.">Line art</button>
|
| 327 |
</div>
|
| 328 |
-
<button id="go" class="go" disabled>Run edit</button>
|
| 329 |
</div>
|
| 330 |
-
|
| 331 |
-
|
| 332 |
-
|
| 333 |
-
|
| 334 |
-
|
| 335 |
-
|
|
|
|
| 336 |
</main>
|
| 337 |
|
| 338 |
<footer>
|
|
@@ -442,4 +470,4 @@
|
|
| 442 |
</script>
|
| 443 |
|
| 444 |
</body>
|
| 445 |
-
</html>
|
|
|
|
| 103 |
min-height: 0;
|
| 104 |
display: grid;
|
| 105 |
grid-template-columns: 1fr 1fr;
|
|
|
|
| 106 |
border-bottom: 1px solid var(--rule);
|
| 107 |
}
|
| 108 |
+
|
| 109 |
+
.panel {
|
| 110 |
+
min-width: 0;
|
| 111 |
+
min-height: 0;
|
| 112 |
+
display: grid;
|
| 113 |
+
grid-template-rows: auto 1fr auto;
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
.panel.right {
|
| 117 |
+
border-left: 1px solid var(--rule);
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
.cell { padding: 0 28px; min-width: 0; min-height: 0; }
|
|
|
|
| 121 |
|
| 122 |
.cell.head {
|
| 123 |
padding-top: 14px; padding-bottom: 8px;
|
|
|
|
| 271 |
body { overflow: auto; }
|
| 272 |
.hero { padding: 12px 18px; gap: 8px; }
|
| 273 |
.hero p { margin-left: 0; }
|
| 274 |
+
|
| 275 |
main {
|
| 276 |
grid-template-columns: 1fr;
|
|
|
|
| 277 |
}
|
| 278 |
+
|
| 279 |
+
.panel.right {
|
| 280 |
+
border-left: 0;
|
| 281 |
+
border-top: 1px solid var(--rule);
|
| 282 |
+
}
|
| 283 |
+
|
| 284 |
+
.cell.head.right {
|
| 285 |
+
padding-top: 12px;
|
| 286 |
+
}
|
| 287 |
+
|
| 288 |
+
.cell.frame-cell {
|
| 289 |
+
min-height: 280px;
|
| 290 |
+
}
|
| 291 |
+
|
| 292 |
+
.nav, .cell, footer {
|
| 293 |
+
padding-left: 18px;
|
| 294 |
+
padding-right: 18px;
|
| 295 |
+
}
|
| 296 |
}
|
| 297 |
</style>
|
| 298 |
</head>
|
|
|
|
| 310 |
</header>
|
| 311 |
|
| 312 |
<main>
|
| 313 |
+
<section class="panel left">
|
| 314 |
+
<div class="cell head left">
|
| 315 |
+
<span class="panel-num">01 / Source</span>
|
| 316 |
+
<span class="panel-title">your photo</span>
|
| 317 |
+
</div>
|
| 318 |
+
|
| 319 |
+
<div class="cell frame-cell left">
|
| 320 |
+
<div class="frame dashed" id="drop">
|
| 321 |
+
<div class="placeholder" id="placeholder">
|
| 322 |
+
<div class="glyph">+</div>
|
| 323 |
+
<div class="small"><b>Click</b> or <b>drop</b> a photo here · JPG · PNG · WEBP</div>
|
| 324 |
+
</div>
|
| 325 |
+
<img id="preview" hidden alt="">
|
|
|
|
|
|
|
|
|
|
| 326 |
</div>
|
| 327 |
+
<input type="file" id="file" accept="image/*" hidden>
|
| 328 |
</div>
|
| 329 |
+
|
| 330 |
+
<div class="cell controls left">
|
| 331 |
+
<textarea id="prompt" placeholder="convert to black and white with grain, replace background with a misty forest, transform into a 1990s polaroid..."></textarea>
|
| 332 |
+
<div class="controls-row">
|
| 333 |
+
<div class="presets" id="presets">
|
| 334 |
+
<button class="preset" type="button" data-p="Convert it to black and white with subtle film grain.">B&W film</button>
|
| 335 |
+
<button class="preset" type="button" data-p="Transform the image into a soft watercolor painting.">Watercolor</button>
|
| 336 |
+
<button class="preset" type="button" data-p="Cinematic polaroid with soft grain, subtle vignette, gentle lighting, white frame, preserving realistic texture.">Polaroid</button>
|
| 337 |
+
<button class="preset" type="button" data-p="Convert into a clean line-art ink drawing on white paper.">Line art</button>
|
| 338 |
+
</div>
|
| 339 |
+
<button id="go" class="go" disabled>Run edit</button>
|
| 340 |
+
</div>
|
| 341 |
+
</div>
|
| 342 |
+
</section>
|
| 343 |
+
|
| 344 |
+
<section class="panel right">
|
| 345 |
+
<div class="cell head right">
|
| 346 |
+
<span class="panel-num">02 / Result</span>
|
| 347 |
+
<span class="panel-title">the edit</span>
|
| 348 |
</div>
|
| 349 |
+
|
| 350 |
+
<div class="cell frame-cell right">
|
| 351 |
+
<div class="frame" id="out">
|
| 352 |
+
<span class="empty" id="empty">Output will appear here</span>
|
| 353 |
+
<img id="result" hidden alt="">
|
| 354 |
+
<div class="loader" id="loader" hidden><span class="bar"></span>Editing</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 355 |
</div>
|
|
|
|
| 356 |
</div>
|
| 357 |
+
|
| 358 |
+
<div class="cell meta-cell right">
|
| 359 |
+
<a href="#" id="download" hidden>Download PNG</a>
|
| 360 |
+
<span class="meta-empty" id="meta-empty">Upload a photo to begin</span>
|
| 361 |
+
<span class="seed" id="seed"></span>
|
| 362 |
+
</div>
|
| 363 |
+
</section>
|
| 364 |
</main>
|
| 365 |
|
| 366 |
<footer>
|
|
|
|
| 470 |
</script>
|
| 471 |
|
| 472 |
</body>
|
| 473 |
+
</html>
|