Spaces:
Running
Running
Create css.py
Browse files
css.py
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""All CSS styles and animations for the Monomerizer app."""
|
| 2 |
+
|
| 3 |
+
BUBBLES_CSS = """
|
| 4 |
+
/* ββ Animated background bubbles ββ */
|
| 5 |
+
@keyframes float {
|
| 6 |
+
0% { transform: translateY(0) scale(1); opacity: 0.25; }
|
| 7 |
+
50% { transform: translateY(-120px) scale(1.15); opacity: 0.35; }
|
| 8 |
+
100% { transform: translateY(-240px) scale(1); opacity: 0; }
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
.bubble-container {
|
| 12 |
+
position: fixed; top: 0; left: 0; width: 100%; height: 100%;
|
| 13 |
+
pointer-events: none; z-index: 0; overflow: hidden;
|
| 14 |
+
}
|
| 15 |
+
.bubble {
|
| 16 |
+
position: absolute; bottom: -60px; border-radius: 50%;
|
| 17 |
+
background: radial-gradient(circle at 30% 30%, rgba(120,180,255,0.35), rgba(180,130,255,0.15));
|
| 18 |
+
animation: float linear infinite;
|
| 19 |
+
}
|
| 20 |
+
.bubble:nth-child(1) { width:40px; height:40px; left:5%; animation-duration:14s; animation-delay:0s; }
|
| 21 |
+
.bubble:nth-child(2) { width:25px; height:25px; left:15%; animation-duration:18s; animation-delay:2s; }
|
| 22 |
+
.bubble:nth-child(3) { width:55px; height:55px; left:28%; animation-duration:20s; animation-delay:4s; }
|
| 23 |
+
.bubble:nth-child(4) { width:30px; height:30px; left:40%; animation-duration:16s; animation-delay:1s; }
|
| 24 |
+
.bubble:nth-child(5) { width:45px; height:45px; left:55%; animation-duration:22s; animation-delay:3s; }
|
| 25 |
+
.bubble:nth-child(6) { width:20px; height:20px; left:65%; animation-duration:15s; animation-delay:5s; }
|
| 26 |
+
.bubble:nth-child(7) { width:50px; height:50px; left:75%; animation-duration:19s; animation-delay:0s; }
|
| 27 |
+
.bubble:nth-child(8) { width:35px; height:35px; left:88%; animation-duration:17s; animation-delay:2s; }
|
| 28 |
+
.bubble:nth-child(9) { width:28px; height:28px; left:48%; animation-duration:21s; animation-delay:6s; }
|
| 29 |
+
.bubble:nth-child(10) { width:38px; height:38px; left:92%; animation-duration:16s; animation-delay:4s; }
|
| 30 |
+
"""
|
| 31 |
+
|
| 32 |
+
LAYOUT_CSS = """
|
| 33 |
+
/* ββ Global ββ */
|
| 34 |
+
.gradio-container {
|
| 35 |
+
max-width: 1000px !important; margin: auto !important;
|
| 36 |
+
position: relative; z-index: 1;
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
/* ββ Rounding everything ββ */
|
| 40 |
+
textarea, input, .gr-button, .gr-box, .gr-panel,
|
| 41 |
+
.gr-input, .gr-text-input { border-radius: 14px !important; }
|
| 42 |
+
|
| 43 |
+
/* ββ Cards ββ */
|
| 44 |
+
.input-card {
|
| 45 |
+
background: linear-gradient(135deg, rgba(240,244,255,0.85) 0%, rgba(232,238,255,0.85) 100%);
|
| 46 |
+
border-radius: 20px !important; padding: 12px 16px !important;
|
| 47 |
+
border: 1px solid #d0d8f0 !important;
|
| 48 |
+
backdrop-filter: blur(8px);
|
| 49 |
+
}
|
| 50 |
+
.output-card {
|
| 51 |
+
background: linear-gradient(135deg, rgba(240,253,244,0.85) 0%, rgba(232,245,233,0.85) 100%);
|
| 52 |
+
border-radius: 20px !important; padding: 12px 16px !important;
|
| 53 |
+
border: 1px solid #c8e6c9 !important;
|
| 54 |
+
backdrop-filter: blur(8px);
|
| 55 |
+
}
|
| 56 |
+
.viz-card {
|
| 57 |
+
background: rgba(250,250,252,0.88);
|
| 58 |
+
border-radius: 20px !important; padding: 10px 14px !important;
|
| 59 |
+
border: 1px solid #e0e0e8 !important;
|
| 60 |
+
backdrop-filter: blur(8px);
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
/* ββ Text areas ββ */
|
| 64 |
+
.smiles-input textarea {
|
| 65 |
+
font-size: 11px !important; font-family: monospace !important;
|
| 66 |
+
border-radius: 12px !important; line-height: 1.5 !important;
|
| 67 |
+
}
|
| 68 |
+
.compact-text textarea {
|
| 69 |
+
font-size: 11px !important; font-family: monospace !important;
|
| 70 |
+
border-radius: 12px !important; line-height: 1.4 !important;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
/* ββ Buttons ββ */
|
| 74 |
+
.run-btn {
|
| 75 |
+
border-radius: 26px !important; font-weight: 700 !important;
|
| 76 |
+
font-size: 15px !important; min-height: 46px !important;
|
| 77 |
+
box-shadow: 0 4px 14px rgba(91,127,245,0.3) !important;
|
| 78 |
+
transition: transform 0.15s, box-shadow 0.15s !important;
|
| 79 |
+
}
|
| 80 |
+
.run-btn:hover {
|
| 81 |
+
transform: translateY(-1px) !important;
|
| 82 |
+
box-shadow: 0 6px 20px rgba(91,127,245,0.4) !important;
|
| 83 |
+
}
|
| 84 |
+
.nav-btn { border-radius: 20px !important; min-width: 40px !important; }
|
| 85 |
+
.save-btn { border-radius: 20px !important; }
|
| 86 |
+
|
| 87 |
+
/* ββ Section labels ββ */
|
| 88 |
+
.section-label {
|
| 89 |
+
font-size: 10px !important; font-weight: 700 !important;
|
| 90 |
+
text-transform: uppercase !important; letter-spacing: 1.6px !important;
|
| 91 |
+
color: #999 !important; margin: 6px 0 2px 4px !important;
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
/* ββ Footer ββ */
|
| 95 |
+
.footer-note {
|
| 96 |
+
text-align: center; font-size: 11px; color: #999;
|
| 97 |
+
margin: 6px 0 2px 0; line-height: 1.5;
|
| 98 |
+
}
|
| 99 |
+
.footer-note a { color: #5b7ff5; text-decoration: none; font-weight: 600; }
|
| 100 |
+
.footer-note a:hover { text-decoration: underline; }
|
| 101 |
+
|
| 102 |
+
/* ββ Example SVG scaling ββ */
|
| 103 |
+
.example-svg-small svg { max-width: 20% !important; height: auto !important; margin: auto; display: block; }
|
| 104 |
+
"""
|
| 105 |
+
|
| 106 |
+
FULL_CSS = BUBBLES_CSS + LAYOUT_CSS
|
| 107 |
+
|
| 108 |
+
BUBBLES_HTML = """
|
| 109 |
+
<div class="bubble-container">
|
| 110 |
+
<div class="bubble"></div><div class="bubble"></div><div class="bubble"></div>
|
| 111 |
+
<div class="bubble"></div><div class="bubble"></div><div class="bubble"></div>
|
| 112 |
+
<div class="bubble"></div><div class="bubble"></div><div class="bubble"></div>
|
| 113 |
+
<div class="bubble"></div>
|
| 114 |
+
</div>
|
| 115 |
+
"""
|