Codex Claude Sonnet 4.6 commited on
Commit Β·
d61efd6
1
Parent(s): 3c0a4d2
Revert layout to original output card; keep timing order only
Browse filesbook_display and coloring_display back inside the right output column.
The output card layout is restored to: audio β PDF buttons β book pages.
The three-step TIMING remains: audio appears first, then PDF download
button, then book pages β just all within the same column as before.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- ui/layout.py +12 -26
ui/layout.py
CHANGED
|
@@ -370,12 +370,6 @@ body, gradio-app {
|
|
| 370 |
.book-empty { text-align: center; padding: 54px 24px; font-family: 'Gaegu', cursive; color: var(--ink-soft); }
|
| 371 |
.book-empty .big { font-size: 30px; color: var(--ink); }
|
| 372 |
.book-empty .arrow { font-size: 42px; display:block; margin-bottom: 8px; animation: bob 1.6s ease-in-out infinite; }
|
| 373 |
-
.book-scroll-hint {
|
| 374 |
-
display: flex; align-items: center; justify-content: center; gap: 8px;
|
| 375 |
-
padding: 14px 0 4px; font-family: 'Caveat', cursive; font-size: 20px;
|
| 376 |
-
color: var(--ink-soft); opacity: 0.7;
|
| 377 |
-
}
|
| 378 |
-
.book-scroll-hint .hint-arrow { font-size: 26px; animation: bob 1.8s ease-in-out infinite; }
|
| 379 |
@keyframes bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-7px) } }
|
| 380 |
.engine-badge {
|
| 381 |
display:inline-block; margin: 0 auto 4px; padding: 3px 12px;
|
|
@@ -558,7 +552,7 @@ def create_layout(load_sample_fn=None, create_book_fn=None):
|
|
| 558 |
label="Try an example",
|
| 559 |
)
|
| 560 |
|
| 561 |
-
#
|
| 562 |
with gr.Column(scale=2, elem_classes=["output-card"]):
|
| 563 |
audio_narration = gr.Audio(
|
| 564 |
label="π§ Listen to your story",
|
|
@@ -572,25 +566,17 @@ def create_layout(load_sample_fn=None, create_book_fn=None):
|
|
| 572 |
coloring_pdf_download = gr.DownloadButton(
|
| 573 |
"β¬ Coloring PDF", visible=False, elem_classes=["btn-pdf"],
|
| 574 |
)
|
| 575 |
-
gr.HTML(
|
| 576 |
-
|
| 577 |
-
|
| 578 |
-
|
| 579 |
-
|
| 580 |
-
|
| 581 |
-
|
| 582 |
-
|
| 583 |
-
|
| 584 |
-
|
| 585 |
-
|
| 586 |
-
<div class="book-empty">
|
| 587 |
-
<span class="arrow">β</span>
|
| 588 |
-
<p class="big">Your storybook appears here</p>
|
| 589 |
-
<p>Add a drawing, pick a theme, and tap <b>Make my book!</b></p>
|
| 590 |
-
</div>
|
| 591 |
-
""",
|
| 592 |
-
)
|
| 593 |
-
coloring_display = gr.HTML(visible=False, elem_classes=["book-stage"])
|
| 594 |
|
| 595 |
# Behind the magic accordion
|
| 596 |
with gr.Accordion("Behind the magic β¨", open=False, elem_classes=["behind-magic"]):
|
|
|
|
| 370 |
.book-empty { text-align: center; padding: 54px 24px; font-family: 'Gaegu', cursive; color: var(--ink-soft); }
|
| 371 |
.book-empty .big { font-size: 30px; color: var(--ink); }
|
| 372 |
.book-empty .arrow { font-size: 42px; display:block; margin-bottom: 8px; animation: bob 1.6s ease-in-out infinite; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 373 |
@keyframes bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-7px) } }
|
| 374 |
.engine-badge {
|
| 375 |
display:inline-block; margin: 0 auto 4px; padding: 3px 12px;
|
|
|
|
| 552 |
label="Try an example",
|
| 553 |
)
|
| 554 |
|
| 555 |
+
# OUTPUT CARD β right column
|
| 556 |
with gr.Column(scale=2, elem_classes=["output-card"]):
|
| 557 |
audio_narration = gr.Audio(
|
| 558 |
label="π§ Listen to your story",
|
|
|
|
| 566 |
coloring_pdf_download = gr.DownloadButton(
|
| 567 |
"β¬ Coloring PDF", visible=False, elem_classes=["btn-pdf"],
|
| 568 |
)
|
| 569 |
+
book_display = gr.HTML(
|
| 570 |
+
elem_classes=["book-stage"],
|
| 571 |
+
value="""
|
| 572 |
+
<div class="book-empty">
|
| 573 |
+
<span class="arrow">β</span>
|
| 574 |
+
<p class="big">Your storybook appears here</p>
|
| 575 |
+
<p>Add a drawing, pick a theme, and tap <b>Make my book!</b></p>
|
| 576 |
+
</div>
|
| 577 |
+
""",
|
| 578 |
+
)
|
| 579 |
+
coloring_display = gr.HTML(visible=False, elem_classes=["book-stage"])
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 580 |
|
| 581 |
# Behind the magic accordion
|
| 582 |
with gr.Accordion("Behind the magic β¨", open=False, elem_classes=["behind-magic"]):
|