Spaces:
Running on Zero
Running on Zero
Canvas UI: move examples row into left column under the board (fill dead space)
Browse files
app.py
CHANGED
|
@@ -449,8 +449,11 @@ STYLE2 = """
|
|
| 449 |
/* board shows the reference as a cover background while editing */
|
| 450 |
#f3-root .board{background-size:cover;background-position:center;background-repeat:no-repeat;}
|
| 451 |
|
| 452 |
-
/* examples row
|
| 453 |
-
#f3-root .
|
|
|
|
|
|
|
|
|
|
| 454 |
#f3-root .ex-head{font:600 11px/1.4 var(--mono);letter-spacing:.06em;color:var(--dim2);margin-bottom:10px;}
|
| 455 |
#f3-root .ex-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px;}
|
| 456 |
#f3-root .excard{background:var(--panel);border:1px solid var(--line2);border-radius:10px;padding:12px 14px;cursor:pointer;transition:border-color .12s,background .12s;}
|
|
@@ -721,12 +724,15 @@ SCRIPT = r"""
|
|
| 721 |
+ '<p>Draw a box for every element, describe it, and the step-distilled FLUX.3 model renders your layout. '
|
| 722 |
+ 'Upload a reference image to edit it with the same boxes.</p></div>'
|
| 723 |
+'<div class="main">'
|
|
|
|
| 724 |
+ '<div class="canvas-wrap"><div class="board empty"><div class="hint">Drag to draw your first element box, pick an example below, or add a reference image.</div><div class="spin">Rendering with FLUX.3…</div></div>'
|
| 725 |
+ '<div class="ratio-tag"></div>'
|
| 726 |
+ '<div class="board-tools">'
|
| 727 |
+ '<div class="btn toggleBtn on" style="display:none"><span class="toggle"></span>Bounding boxes</div>'
|
| 728 |
+ '<div class="btn replayBtn">↻ Replay</div>'
|
| 729 |
+ '</div></div>'
|
|
|
|
|
|
|
| 730 |
+ '<div class="side">'
|
| 731 |
+ '<div class="steps"></div>'
|
| 732 |
+ '<div class="refblock"><label>REFERENCE IMAGE <span class="opt">optional · edit an image</span></label>'
|
|
@@ -739,7 +745,6 @@ SCRIPT = r"""
|
|
| 739 |
+ '<div class="gen"><button class="genbtn">Generate</button></div>'
|
| 740 |
+ '</div>'
|
| 741 |
+'</div>'
|
| 742 |
-
+'<div class="examples"><div class="ex-head">EXAMPLES — click to load, or build your own above</div><div class="ex-row"></div></div>'
|
| 743 |
+'<div class="table-bar"><span class="lab">+ VIEW THE ELEMENT TABLE</span><span class="cnt">0 ROWS</span></div>'
|
| 744 |
+'<div class="etable"></div>';
|
| 745 |
|
|
|
|
| 449 |
/* board shows the reference as a cover background while editing */
|
| 450 |
#f3-root .board{background-size:cover;background-position:center;background-repeat:no-repeat;}
|
| 451 |
|
| 452 |
+
/* left column stacks the board + the examples row directly under it */
|
| 453 |
+
#f3-root .leftcol{display:flex;flex-direction:column;gap:18px;min-width:0;}
|
| 454 |
+
|
| 455 |
+
/* examples row (directly below the canvas) */
|
| 456 |
+
#f3-root .examples{margin-top:0;}
|
| 457 |
#f3-root .ex-head{font:600 11px/1.4 var(--mono);letter-spacing:.06em;color:var(--dim2);margin-bottom:10px;}
|
| 458 |
#f3-root .ex-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:10px;}
|
| 459 |
#f3-root .excard{background:var(--panel);border:1px solid var(--line2);border-radius:10px;padding:12px 14px;cursor:pointer;transition:border-color .12s,background .12s;}
|
|
|
|
| 724 |
+ '<p>Draw a box for every element, describe it, and the step-distilled FLUX.3 model renders your layout. '
|
| 725 |
+ 'Upload a reference image to edit it with the same boxes.</p></div>'
|
| 726 |
+'<div class="main">'
|
| 727 |
+
+ '<div class="leftcol">'
|
| 728 |
+ '<div class="canvas-wrap"><div class="board empty"><div class="hint">Drag to draw your first element box, pick an example below, or add a reference image.</div><div class="spin">Rendering with FLUX.3…</div></div>'
|
| 729 |
+ '<div class="ratio-tag"></div>'
|
| 730 |
+ '<div class="board-tools">'
|
| 731 |
+ '<div class="btn toggleBtn on" style="display:none"><span class="toggle"></span>Bounding boxes</div>'
|
| 732 |
+ '<div class="btn replayBtn">↻ Replay</div>'
|
| 733 |
+ '</div></div>'
|
| 734 |
+
+ '<div class="examples"><div class="ex-head">EXAMPLES — click to load, or build your own</div><div class="ex-row"></div></div>'
|
| 735 |
+
+ '</div>'
|
| 736 |
+ '<div class="side">'
|
| 737 |
+ '<div class="steps"></div>'
|
| 738 |
+ '<div class="refblock"><label>REFERENCE IMAGE <span class="opt">optional · edit an image</span></label>'
|
|
|
|
| 745 |
+ '<div class="gen"><button class="genbtn">Generate</button></div>'
|
| 746 |
+ '</div>'
|
| 747 |
+'</div>'
|
|
|
|
| 748 |
+'<div class="table-bar"><span class="lab">+ VIEW THE ELEMENT TABLE</span><span class="cnt">0 ROWS</span></div>'
|
| 749 |
+'<div class="etable"></div>';
|
| 750 |
|