Spaces:
Sleeping
Sleeping
Commit
·
d2c76bc
1
Parent(s):
fec0f1f
Match Z-Image UI exactly - dark theme with proper styling
Browse files- Both input and output sections now have dark background (#1d1d1f)
- Output inner area has lighter gray (#2d2d2f) matching Z-Image
- Removed incorrect blue pill styling for labels
- Added variant="panel" to Row like Z-Image
- Fixed title color for dark theme (#f5f5f7)
- Proper character counter margin
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
app.py
CHANGED
|
@@ -252,6 +252,7 @@ css = """
|
|
| 252 |
font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Roboto', sans-serif !important;
|
| 253 |
}
|
| 254 |
|
|
|
|
| 255 |
* {
|
| 256 |
transition: none !important;
|
| 257 |
animation: none !important;
|
|
@@ -268,7 +269,7 @@ css = """
|
|
| 268 |
font-weight: 600 !important;
|
| 269 |
letter-spacing: -0.02em !important;
|
| 270 |
line-height: 1.07 !important;
|
| 271 |
-
color: #
|
| 272 |
margin: 0 0 16px 0 !important;
|
| 273 |
}
|
| 274 |
|
|
@@ -282,24 +283,12 @@ css = """
|
|
| 282 |
min-width: 550px !important;
|
| 283 |
max-width: 550px !important;
|
| 284 |
flex: 0 0 550px !important;
|
| 285 |
-
|
| 286 |
-
|
| 287 |
-
/* Blue pill labels for Prompt and Aspect Ratio */
|
| 288 |
-
.input-section label span,
|
| 289 |
-
#prompt-textbox label span,
|
| 290 |
-
.input-section .label-wrap span {
|
| 291 |
-
background: #0071e3 !important;
|
| 292 |
-
color: #ffffff !important;
|
| 293 |
-
padding: 4px 12px !important;
|
| 294 |
-
border-radius: 980px !important;
|
| 295 |
-
font-size: 14px !important;
|
| 296 |
-
font-weight: 500 !important;
|
| 297 |
-
display: inline-block !important;
|
| 298 |
}
|
| 299 |
|
| 300 |
/* Textbox */
|
| 301 |
-
|
| 302 |
-
#prompt-textbox textarea {
|
| 303 |
font-size: 17px !important;
|
| 304 |
line-height: 1.47 !important;
|
| 305 |
border-radius: 12px !important;
|
|
@@ -313,17 +302,16 @@ css = """
|
|
| 313 |
height: 500px !important;
|
| 314 |
resize: vertical !important;
|
| 315 |
overflow-y: auto !important;
|
|
|
|
| 316 |
}
|
| 317 |
|
| 318 |
-
|
| 319 |
-
#prompt-textbox textarea:focus {
|
| 320 |
border-color: #0071e3 !important;
|
| 321 |
box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15) !important;
|
| 322 |
outline: none !important;
|
| 323 |
}
|
| 324 |
|
| 325 |
-
|
| 326 |
-
#prompt-textbox textarea::placeholder {
|
| 327 |
color: #86868b !important;
|
| 328 |
}
|
| 329 |
|
|
@@ -332,8 +320,9 @@ css = """
|
|
| 332 |
text-align: center;
|
| 333 |
font-size: 13px;
|
| 334 |
color: #86868b;
|
| 335 |
-
margin-top:
|
| 336 |
margin-bottom: 16px;
|
|
|
|
| 337 |
}
|
| 338 |
|
| 339 |
.char-counter.warning {
|
|
@@ -344,15 +333,6 @@ css = """
|
|
| 344 |
color: #ff3b30;
|
| 345 |
}
|
| 346 |
|
| 347 |
-
/* Dropdown styling */
|
| 348 |
-
.input-section select,
|
| 349 |
-
.input-section .wrap {
|
| 350 |
-
background: #2d2d2f !important;
|
| 351 |
-
border: 1px solid #424245 !important;
|
| 352 |
-
border-radius: 12px !important;
|
| 353 |
-
color: #f5f5f7 !important;
|
| 354 |
-
}
|
| 355 |
-
|
| 356 |
/* Button */
|
| 357 |
button.primary {
|
| 358 |
font-size: 17px !important;
|
|
@@ -366,19 +346,22 @@ button.primary {
|
|
| 366 |
letter-spacing: -0.01em !important;
|
| 367 |
cursor: pointer !important;
|
| 368 |
width: 100% !important;
|
| 369 |
-
margin-top: 16px !important;
|
| 370 |
}
|
| 371 |
|
| 372 |
button.primary:hover {
|
| 373 |
background: #0077ed !important;
|
| 374 |
}
|
| 375 |
|
| 376 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 377 |
div.output-section {
|
| 378 |
-
background: #
|
| 379 |
border-radius: 18px !important;
|
| 380 |
padding: 32px !important;
|
| 381 |
-
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.
|
| 382 |
overflow: hidden !important;
|
| 383 |
display: flex !important;
|
| 384 |
align-items: center !important;
|
|
@@ -412,7 +395,7 @@ div.output-section {
|
|
| 412 |
-webkit-backface-visibility: hidden !important;
|
| 413 |
}
|
| 414 |
|
| 415 |
-
/*
|
| 416 |
.output-section > div {
|
| 417 |
width: 100% !important;
|
| 418 |
min-height: 75vh !important;
|
|
@@ -420,6 +403,8 @@ div.output-section {
|
|
| 420 |
display: flex !important;
|
| 421 |
align-items: center !important;
|
| 422 |
justify-content: center !important;
|
|
|
|
|
|
|
| 423 |
}
|
| 424 |
|
| 425 |
.output-section > div > div {
|
|
@@ -429,20 +414,15 @@ div.output-section {
|
|
| 429 |
display: flex !important;
|
| 430 |
align-items: center !important;
|
| 431 |
justify-content: center !important;
|
|
|
|
|
|
|
| 432 |
}
|
| 433 |
|
| 434 |
.output-section * {
|
| 435 |
max-width: 100% !important;
|
| 436 |
}
|
| 437 |
|
| 438 |
-
/*
|
| 439 |
-
.dark .output-section {
|
| 440 |
-
background: #1d1d1f !important;
|
| 441 |
-
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4) !important;
|
| 442 |
-
}
|
| 443 |
-
|
| 444 |
-
/* Dark Mode - title */
|
| 445 |
-
.dark .main-title,
|
| 446 |
.input-section .main-title {
|
| 447 |
color: #f5f5f7 !important;
|
| 448 |
}
|
|
@@ -590,7 +570,7 @@ with gr.Blocks() as demo:
|
|
| 590 |
gr.HTML(f"<style>{css}</style>")
|
| 591 |
|
| 592 |
# Two-column layout
|
| 593 |
-
with gr.Row(equal_height=False, elem_id="main-row"):
|
| 594 |
|
| 595 |
# LEFT COLUMN - Input Controls
|
| 596 |
with gr.Column(scale=0, min_width=550, elem_classes="input-section", elem_id="input-column"):
|
|
|
|
| 252 |
font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', 'Roboto', sans-serif !important;
|
| 253 |
}
|
| 254 |
|
| 255 |
+
/* Disable all transitions globally */
|
| 256 |
* {
|
| 257 |
transition: none !important;
|
| 258 |
animation: none !important;
|
|
|
|
| 269 |
font-weight: 600 !important;
|
| 270 |
letter-spacing: -0.02em !important;
|
| 271 |
line-height: 1.07 !important;
|
| 272 |
+
color: #f5f5f7 !important;
|
| 273 |
margin: 0 0 16px 0 !important;
|
| 274 |
}
|
| 275 |
|
|
|
|
| 283 |
min-width: 550px !important;
|
| 284 |
max-width: 550px !important;
|
| 285 |
flex: 0 0 550px !important;
|
| 286 |
+
flex-shrink: 0 !important;
|
| 287 |
+
flex-grow: 0 !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 288 |
}
|
| 289 |
|
| 290 |
/* Textbox */
|
| 291 |
+
textarea {
|
|
|
|
| 292 |
font-size: 17px !important;
|
| 293 |
line-height: 1.47 !important;
|
| 294 |
border-radius: 12px !important;
|
|
|
|
| 302 |
height: 500px !important;
|
| 303 |
resize: vertical !important;
|
| 304 |
overflow-y: auto !important;
|
| 305 |
+
margin-bottom: 16px !important;
|
| 306 |
}
|
| 307 |
|
| 308 |
+
textarea:focus {
|
|
|
|
| 309 |
border-color: #0071e3 !important;
|
| 310 |
box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.15) !important;
|
| 311 |
outline: none !important;
|
| 312 |
}
|
| 313 |
|
| 314 |
+
textarea::placeholder {
|
|
|
|
| 315 |
color: #86868b !important;
|
| 316 |
}
|
| 317 |
|
|
|
|
| 320 |
text-align: center;
|
| 321 |
font-size: 13px;
|
| 322 |
color: #86868b;
|
| 323 |
+
margin-top: -12px;
|
| 324 |
margin-bottom: 16px;
|
| 325 |
+
font-family: -apple-system, BlinkMacSystemFont, 'Inter', sans-serif;
|
| 326 |
}
|
| 327 |
|
| 328 |
.char-counter.warning {
|
|
|
|
| 333 |
color: #ff3b30;
|
| 334 |
}
|
| 335 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 336 |
/* Button */
|
| 337 |
button.primary {
|
| 338 |
font-size: 17px !important;
|
|
|
|
| 346 |
letter-spacing: -0.01em !important;
|
| 347 |
cursor: pointer !important;
|
| 348 |
width: 100% !important;
|
|
|
|
| 349 |
}
|
| 350 |
|
| 351 |
button.primary:hover {
|
| 352 |
background: #0077ed !important;
|
| 353 |
}
|
| 354 |
|
| 355 |
+
button.primary:active {
|
| 356 |
+
opacity: 0.9 !important;
|
| 357 |
+
}
|
| 358 |
+
|
| 359 |
+
/* Output Section */
|
| 360 |
div.output-section {
|
| 361 |
+
background: #1d1d1f !important;
|
| 362 |
border-radius: 18px !important;
|
| 363 |
padding: 32px !important;
|
| 364 |
+
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4) !important;
|
| 365 |
overflow: hidden !important;
|
| 366 |
display: flex !important;
|
| 367 |
align-items: center !important;
|
|
|
|
| 395 |
-webkit-backface-visibility: hidden !important;
|
| 396 |
}
|
| 397 |
|
| 398 |
+
/* Inner image area with lighter background */
|
| 399 |
.output-section > div {
|
| 400 |
width: 100% !important;
|
| 401 |
min-height: 75vh !important;
|
|
|
|
| 403 |
display: flex !important;
|
| 404 |
align-items: center !important;
|
| 405 |
justify-content: center !important;
|
| 406 |
+
background: #2d2d2f !important;
|
| 407 |
+
border-radius: 12px !important;
|
| 408 |
}
|
| 409 |
|
| 410 |
.output-section > div > div {
|
|
|
|
| 414 |
display: flex !important;
|
| 415 |
align-items: center !important;
|
| 416 |
justify-content: center !important;
|
| 417 |
+
background: #2d2d2f !important;
|
| 418 |
+
border-radius: 12px !important;
|
| 419 |
}
|
| 420 |
|
| 421 |
.output-section * {
|
| 422 |
max-width: 100% !important;
|
| 423 |
}
|
| 424 |
|
| 425 |
+
/* Title color */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 426 |
.input-section .main-title {
|
| 427 |
color: #f5f5f7 !important;
|
| 428 |
}
|
|
|
|
| 570 |
gr.HTML(f"<style>{css}</style>")
|
| 571 |
|
| 572 |
# Two-column layout
|
| 573 |
+
with gr.Row(equal_height=False, variant="panel", elem_id="main-row"):
|
| 574 |
|
| 575 |
# LEFT COLUMN - Input Controls
|
| 576 |
with gr.Column(scale=0, min_width=550, elem_classes="input-section", elem_id="input-column"):
|