Spaces:
Sleeping
Sleeping
Upload style.css with huggingface_hub
Browse files
style.css
CHANGED
|
@@ -1,130 +1,326 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
.main-header {
|
| 2 |
text-align: center;
|
| 3 |
-
|
| 4 |
}
|
| 5 |
.main-header h1 {
|
|
|
|
|
|
|
| 6 |
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 7 |
-webkit-background-clip: text;
|
| 8 |
-webkit-text-fill-color: transparent;
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
margin-bottom: 0.25rem;
|
| 12 |
}
|
| 13 |
-
.main-header
|
| 14 |
-
color: #
|
| 15 |
-
font-size: 1.
|
| 16 |
-
max-width: 600px;
|
| 17 |
margin: 0 auto;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
}
|
| 19 |
|
| 20 |
-
/* Pipeline
|
| 21 |
-
.pipeline-
|
| 22 |
-
background: #
|
| 23 |
-
border:
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
margin-bottom: 1rem;
|
| 31 |
-
letter-spacing: 0.02em;
|
| 32 |
}
|
| 33 |
-
.
|
| 34 |
-
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
}
|
| 37 |
-
.
|
| 38 |
-
|
| 39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
}
|
| 41 |
-
.
|
| 42 |
-
color: #
|
| 43 |
-
|
| 44 |
}
|
| 45 |
|
| 46 |
-
/* SQL
|
| 47 |
.sql-output textarea {
|
| 48 |
-
font-family: '
|
| 49 |
-
font-size: 1.
|
| 50 |
-
background: #
|
| 51 |
-
color: #
|
| 52 |
-
border: 1px solid #
|
| 53 |
-
border-radius:
|
| 54 |
-
padding:
|
|
|
|
|
|
|
| 55 |
}
|
| 56 |
.sql-output label span {
|
| 57 |
-
color: #
|
|
|
|
| 58 |
}
|
| 59 |
|
| 60 |
-
/*
|
| 61 |
-
.
|
| 62 |
-
font-family: '
|
| 63 |
-
font-size: 0.
|
| 64 |
background: #f1f5f9 !important;
|
| 65 |
color: #1e293b !important;
|
| 66 |
border: 1px solid #cbd5e1 !important;
|
| 67 |
-
border-radius:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
}
|
| 69 |
-
.
|
| 70 |
-
|
|
|
|
|
|
|
| 71 |
}
|
| 72 |
|
| 73 |
-
/* Generate
|
| 74 |
.generate-btn {
|
| 75 |
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
|
| 76 |
border: none !important;
|
| 77 |
-
color:
|
| 78 |
-
font-weight:
|
| 79 |
font-size: 1.05rem !important;
|
| 80 |
-
padding: 0.
|
| 81 |
-
border-radius:
|
| 82 |
-
min-height:
|
|
|
|
|
|
|
|
|
|
| 83 |
}
|
| 84 |
.generate-btn:hover {
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
|
| 88 |
}
|
| 89 |
|
| 90 |
-
/*
|
| 91 |
-
.
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
color: #3730a3;
|
| 95 |
-
padding: 0.25rem 0.7rem;
|
| 96 |
-
border-radius: 6px;
|
| 97 |
-
font-size: 0.8rem;
|
| 98 |
-
font-weight: 600;
|
| 99 |
}
|
| 100 |
|
| 101 |
-
/*
|
| 102 |
label span, .label-wrap span {
|
| 103 |
-
color: #
|
| 104 |
}
|
| 105 |
|
| 106 |
-
/*
|
| 107 |
-
.
|
| 108 |
-
|
| 109 |
-
|
|
|
|
|
|
|
|
|
|
| 110 |
}
|
| 111 |
|
| 112 |
-
/*
|
| 113 |
-
.
|
| 114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
}
|
| 116 |
|
| 117 |
-
/*
|
| 118 |
-
.
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 123 |
font-size: 0.85rem;
|
| 124 |
}
|
| 125 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 126 |
color: #667eea;
|
|
|
|
| 127 |
}
|
| 128 |
|
| 129 |
-
/* Hide default
|
| 130 |
footer { display: none !important; }
|
|
|
|
| 1 |
+
/* ============================================
|
| 2 |
+
Text-to-SQL Demo — Custom Theme
|
| 3 |
+
============================================ */
|
| 4 |
+
|
| 5 |
+
/* ---------- Global ---------- */
|
| 6 |
+
* { box-sizing: border-box; }
|
| 7 |
+
|
| 8 |
+
.gradio-container {
|
| 9 |
+
max-width: 1200px !important;
|
| 10 |
+
margin: 0 auto !important;
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
/* ---------- Header ---------- */
|
| 14 |
.main-header {
|
| 15 |
text-align: center;
|
| 16 |
+
padding: 2rem 1rem 0.5rem;
|
| 17 |
}
|
| 18 |
.main-header h1 {
|
| 19 |
+
font-size: 2.8rem;
|
| 20 |
+
font-weight: 800;
|
| 21 |
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 22 |
-webkit-background-clip: text;
|
| 23 |
-webkit-text-fill-color: transparent;
|
| 24 |
+
margin: 0 0 0.3rem 0;
|
| 25 |
+
letter-spacing: -0.02em;
|
|
|
|
| 26 |
}
|
| 27 |
+
.main-header .tagline {
|
| 28 |
+
color: #475569;
|
| 29 |
+
font-size: 1.1rem;
|
|
|
|
| 30 |
margin: 0 auto;
|
| 31 |
+
max-width: 540px;
|
| 32 |
+
line-height: 1.5;
|
| 33 |
+
}
|
| 34 |
+
.main-header .model-link {
|
| 35 |
+
display: inline-block;
|
| 36 |
+
margin-top: 0.6rem;
|
| 37 |
+
font-size: 0.85rem;
|
| 38 |
+
color: #667eea;
|
| 39 |
+
text-decoration: none;
|
| 40 |
+
border: 1px solid #c7d2fe;
|
| 41 |
+
padding: 0.25rem 0.85rem;
|
| 42 |
+
border-radius: 20px;
|
| 43 |
+
transition: all 0.2s ease;
|
| 44 |
+
}
|
| 45 |
+
.main-header .model-link:hover {
|
| 46 |
+
background: #667eea;
|
| 47 |
+
color: #fff;
|
| 48 |
}
|
| 49 |
|
| 50 |
+
/* ---------- Pipeline Strip ---------- */
|
| 51 |
+
.pipeline-strip {
|
| 52 |
+
background: #0f172a;
|
| 53 |
+
border-radius: 14px;
|
| 54 |
+
padding: 1.1rem 1.5rem;
|
| 55 |
+
display: flex;
|
| 56 |
+
align-items: center;
|
| 57 |
+
justify-content: center;
|
| 58 |
+
gap: 0.4rem;
|
| 59 |
+
flex-wrap: wrap;
|
| 60 |
+
margin: 0.75rem 0 1.25rem;
|
| 61 |
+
border: 1px solid #1e293b;
|
| 62 |
+
}
|
| 63 |
+
.pipeline-strip .step {
|
| 64 |
+
display: inline-flex;
|
| 65 |
+
align-items: center;
|
| 66 |
+
gap: 0.5rem;
|
| 67 |
+
padding: 0.35rem 0.85rem;
|
| 68 |
+
border-radius: 8px;
|
| 69 |
+
font-size: 0.85rem;
|
| 70 |
+
font-weight: 600;
|
| 71 |
+
font-family: 'Fira Code', monospace;
|
| 72 |
+
}
|
| 73 |
+
.pipeline-strip .step-input {
|
| 74 |
+
background: #1e3a5f;
|
| 75 |
+
color: #7dd3fc;
|
| 76 |
+
}
|
| 77 |
+
.pipeline-strip .step-model {
|
| 78 |
+
background: #312e81;
|
| 79 |
+
color: #a5b4fc;
|
| 80 |
+
}
|
| 81 |
+
.pipeline-strip .step-struct {
|
| 82 |
+
background: #422006;
|
| 83 |
+
color: #fbbf24;
|
| 84 |
+
}
|
| 85 |
+
.pipeline-strip .step-sql {
|
| 86 |
+
background: #14532d;
|
| 87 |
+
color: #86efac;
|
| 88 |
+
}
|
| 89 |
+
.pipeline-strip .arrow {
|
| 90 |
+
color: #475569;
|
| 91 |
+
font-size: 1.1rem;
|
| 92 |
+
margin: 0 0.15rem;
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
/* ---------- Badges ---------- */
|
| 96 |
+
.tech-badges {
|
| 97 |
+
display: flex;
|
| 98 |
+
justify-content: center;
|
| 99 |
+
gap: 0.5rem;
|
| 100 |
+
flex-wrap: wrap;
|
| 101 |
margin-bottom: 1rem;
|
|
|
|
| 102 |
}
|
| 103 |
+
.badge {
|
| 104 |
+
display: inline-block;
|
| 105 |
+
padding: 0.3rem 0.75rem;
|
| 106 |
+
border-radius: 20px;
|
| 107 |
+
font-size: 0.78rem;
|
| 108 |
+
font-weight: 700;
|
| 109 |
+
letter-spacing: 0.03em;
|
| 110 |
}
|
| 111 |
+
.badge-indigo { background: #e0e7ff; color: #3730a3; }
|
| 112 |
+
.badge-purple { background: #ede9fe; color: #5b21b6; }
|
| 113 |
+
.badge-emerald { background: #d1fae5; color: #065f46; }
|
| 114 |
+
.badge-amber { background: #fef3c7; color: #92400e; }
|
| 115 |
+
|
| 116 |
+
/* ---------- Tabs ---------- */
|
| 117 |
+
.tabs .tab-nav button {
|
| 118 |
+
font-weight: 600 !important;
|
| 119 |
+
color: #475569 !important;
|
| 120 |
+
font-size: 0.95rem !important;
|
| 121 |
}
|
| 122 |
+
.tabs .tab-nav button.selected {
|
| 123 |
+
color: #667eea !important;
|
| 124 |
+
border-color: #667eea !important;
|
| 125 |
}
|
| 126 |
|
| 127 |
+
/* ---------- SQL Output (dark code block) ---------- */
|
| 128 |
.sql-output textarea {
|
| 129 |
+
font-family: 'Fira Code', 'Cascadia Code', 'SF Mono', monospace !important;
|
| 130 |
+
font-size: 1.15rem !important;
|
| 131 |
+
background: #0f172a !important;
|
| 132 |
+
color: #e2e8f0 !important;
|
| 133 |
+
border: 1px solid #1e293b !important;
|
| 134 |
+
border-radius: 12px !important;
|
| 135 |
+
padding: 1.15rem !important;
|
| 136 |
+
line-height: 1.6 !important;
|
| 137 |
+
letter-spacing: 0.01em !important;
|
| 138 |
}
|
| 139 |
.sql-output label span {
|
| 140 |
+
color: #1e293b !important;
|
| 141 |
+
font-weight: 600 !important;
|
| 142 |
}
|
| 143 |
|
| 144 |
+
/* ---------- Decode boxes ---------- */
|
| 145 |
+
.decode-box textarea {
|
| 146 |
+
font-family: 'Fira Code', monospace !important;
|
| 147 |
+
font-size: 0.88rem !important;
|
| 148 |
background: #f1f5f9 !important;
|
| 149 |
color: #1e293b !important;
|
| 150 |
border: 1px solid #cbd5e1 !important;
|
| 151 |
+
border-radius: 10px !important;
|
| 152 |
+
}
|
| 153 |
+
.decode-box label span {
|
| 154 |
+
color: #334155 !important;
|
| 155 |
+
font-weight: 600 !important;
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
/* ---------- Empty state placeholder ---------- */
|
| 159 |
+
.sql-output textarea:placeholder-shown,
|
| 160 |
+
.decode-box textarea:placeholder-shown {
|
| 161 |
+
font-style: italic;
|
| 162 |
+
opacity: 0.5;
|
| 163 |
}
|
| 164 |
+
.sql-output textarea:empty::before {
|
| 165 |
+
content: "Your SQL query will appear here...";
|
| 166 |
+
color: #64748b;
|
| 167 |
+
font-style: italic;
|
| 168 |
}
|
| 169 |
|
| 170 |
+
/* ---------- Generate Button ---------- */
|
| 171 |
.generate-btn {
|
| 172 |
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
|
| 173 |
border: none !important;
|
| 174 |
+
color: #fff !important;
|
| 175 |
+
font-weight: 700 !important;
|
| 176 |
font-size: 1.05rem !important;
|
| 177 |
+
padding: 0.8rem 2rem !important;
|
| 178 |
+
border-radius: 12px !important;
|
| 179 |
+
min-height: 48px !important;
|
| 180 |
+
letter-spacing: 0.02em !important;
|
| 181 |
+
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
|
| 182 |
+
box-shadow: 0 2px 8px rgba(102, 126, 234, 0.25) !important;
|
| 183 |
}
|
| 184 |
.generate-btn:hover {
|
| 185 |
+
transform: translateY(-2px) !important;
|
| 186 |
+
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
|
|
|
|
| 187 |
}
|
| 188 |
|
| 189 |
+
/* ---------- Section Headers ---------- */
|
| 190 |
+
.section-title {
|
| 191 |
+
color: #1e293b !important;
|
| 192 |
+
font-weight: 700 !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 193 |
}
|
| 194 |
|
| 195 |
+
/* ---------- All labels dark ---------- */
|
| 196 |
label span, .label-wrap span {
|
| 197 |
+
color: #1e293b !important;
|
| 198 |
}
|
| 199 |
|
| 200 |
+
/* ---------- Input hint text ---------- */
|
| 201 |
+
.input-hint {
|
| 202 |
+
font-size: 0.82rem;
|
| 203 |
+
color: #64748b;
|
| 204 |
+
margin-top: -0.25rem;
|
| 205 |
+
margin-bottom: 0.5rem;
|
| 206 |
+
padding-left: 2px;
|
| 207 |
}
|
| 208 |
|
| 209 |
+
/* ---------- Architecture diagram ---------- */
|
| 210 |
+
.arch-section {
|
| 211 |
+
padding: 1.5rem;
|
| 212 |
+
}
|
| 213 |
+
.arch-card {
|
| 214 |
+
background: #f8fafc;
|
| 215 |
+
border: 1px solid #e2e8f0;
|
| 216 |
+
border-radius: 14px;
|
| 217 |
+
padding: 1.5rem;
|
| 218 |
+
margin-bottom: 1rem;
|
| 219 |
+
}
|
| 220 |
+
.arch-card h3 {
|
| 221 |
+
color: #1e293b;
|
| 222 |
+
margin: 0 0 0.75rem 0;
|
| 223 |
+
font-size: 1.1rem;
|
| 224 |
+
}
|
| 225 |
+
.arch-card p, .arch-card li {
|
| 226 |
+
color: #475569;
|
| 227 |
+
font-size: 0.95rem;
|
| 228 |
+
line-height: 1.6;
|
| 229 |
+
}
|
| 230 |
+
.arch-card code {
|
| 231 |
+
background: #e0e7ff;
|
| 232 |
+
color: #3730a3;
|
| 233 |
+
padding: 0.15rem 0.45rem;
|
| 234 |
+
border-radius: 4px;
|
| 235 |
+
font-size: 0.85rem;
|
| 236 |
+
font-family: 'Fira Code', monospace;
|
| 237 |
+
}
|
| 238 |
+
.arch-grid {
|
| 239 |
+
display: grid;
|
| 240 |
+
grid-template-columns: 1fr 1fr;
|
| 241 |
+
gap: 1rem;
|
| 242 |
+
}
|
| 243 |
+
@media (max-width: 768px) {
|
| 244 |
+
.arch-grid { grid-template-columns: 1fr; }
|
| 245 |
}
|
| 246 |
|
| 247 |
+
/* Encoding reference table */
|
| 248 |
+
.encoding-table {
|
| 249 |
+
width: 100%;
|
| 250 |
+
border-collapse: separate;
|
| 251 |
+
border-spacing: 0;
|
| 252 |
+
border-radius: 10px;
|
| 253 |
+
overflow: hidden;
|
| 254 |
+
border: 1px solid #e2e8f0;
|
| 255 |
+
font-size: 0.9rem;
|
| 256 |
+
}
|
| 257 |
+
.encoding-table th {
|
| 258 |
+
background: #0f172a;
|
| 259 |
+
color: #e2e8f0;
|
| 260 |
+
padding: 0.7rem 1rem;
|
| 261 |
+
text-align: left;
|
| 262 |
+
font-weight: 600;
|
| 263 |
+
}
|
| 264 |
+
.encoding-table td {
|
| 265 |
+
padding: 0.6rem 1rem;
|
| 266 |
+
border-bottom: 1px solid #f1f5f9;
|
| 267 |
+
color: #334155;
|
| 268 |
+
}
|
| 269 |
+
.encoding-table tr:last-child td { border-bottom: none; }
|
| 270 |
+
.encoding-table tr:nth-child(even) td { background: #f8fafc; }
|
| 271 |
+
.encoding-table .mono {
|
| 272 |
+
font-family: 'Fira Code', monospace;
|
| 273 |
+
color: #667eea;
|
| 274 |
+
font-weight: 600;
|
| 275 |
font-size: 0.85rem;
|
| 276 |
}
|
| 277 |
+
|
| 278 |
+
/* Stats cards */
|
| 279 |
+
.stats-grid {
|
| 280 |
+
display: grid;
|
| 281 |
+
grid-template-columns: repeat(4, 1fr);
|
| 282 |
+
gap: 0.75rem;
|
| 283 |
+
margin: 1rem 0;
|
| 284 |
+
}
|
| 285 |
+
@media (max-width: 768px) {
|
| 286 |
+
.stats-grid { grid-template-columns: repeat(2, 1fr); }
|
| 287 |
+
}
|
| 288 |
+
.stat-card {
|
| 289 |
+
background: #f8fafc;
|
| 290 |
+
border: 1px solid #e2e8f0;
|
| 291 |
+
border-radius: 12px;
|
| 292 |
+
padding: 1.1rem;
|
| 293 |
+
text-align: center;
|
| 294 |
+
}
|
| 295 |
+
.stat-card .stat-value {
|
| 296 |
+
font-size: 1.6rem;
|
| 297 |
+
font-weight: 800;
|
| 298 |
+
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
| 299 |
+
-webkit-background-clip: text;
|
| 300 |
+
-webkit-text-fill-color: transparent;
|
| 301 |
+
}
|
| 302 |
+
.stat-card .stat-label {
|
| 303 |
+
font-size: 0.8rem;
|
| 304 |
+
color: #64748b;
|
| 305 |
+
font-weight: 600;
|
| 306 |
+
margin-top: 0.2rem;
|
| 307 |
+
text-transform: uppercase;
|
| 308 |
+
letter-spacing: 0.05em;
|
| 309 |
+
}
|
| 310 |
+
|
| 311 |
+
/* ---------- Footer ---------- */
|
| 312 |
+
.app-footer {
|
| 313 |
+
text-align: center;
|
| 314 |
+
padding: 1.5rem 1rem;
|
| 315 |
+
margin-top: 1rem;
|
| 316 |
+
border-top: 1px solid #e2e8f0;
|
| 317 |
+
color: #94a3b8;
|
| 318 |
+
font-size: 0.82rem;
|
| 319 |
+
}
|
| 320 |
+
.app-footer a {
|
| 321 |
color: #667eea;
|
| 322 |
+
text-decoration: none;
|
| 323 |
}
|
| 324 |
|
| 325 |
+
/* Hide default gradio footer */
|
| 326 |
footer { display: none !important; }
|