TwoQuarks commited on
Commit
3c351b6
·
verified ·
1 Parent(s): 941a4e9

Update style.css

Browse files
Files changed (1) hide show
  1. style.css +46 -415
style.css CHANGED
@@ -1,24 +1,11 @@
1
- /* ===== TwoQuarks skin for Gradio ===== */
2
  *{margin:0;padding:0;box-sizing:border-box}
3
 
4
  :root{
5
- --bg:#000;
6
- --fg:#fff;
7
- --muted:rgba(255,255,255,.55);
8
-
9
- --card:rgba(255,255,255,.04);
10
- --card2:rgba(255,255,255,.08);
11
- --stroke:rgba(255,255,255,.10);
12
-
13
- /* glass needs to be visible but not milky */
14
- --glass:rgba(0,0,0,.32);
15
-
16
  --accent:#8cb4ff;
17
- --accentGlow: rgba(14,18,25,.10);
18
-
19
- --rSm:10px;
20
- --rMd:12px;
21
- --rLg:14px;
22
  }
23
 
24
  html,body{height:100%}
@@ -29,152 +16,20 @@ body, .gradio-container{
29
  overflow-x:hidden;
30
  }
31
 
32
- /* Starfield canvas (keep it inside stacking context) */
33
  #quantumField{
34
  position:fixed; inset:0;
35
  width:100vw; height:100vh;
36
  z-index:0;
37
  background:#000;
38
  pointer-events:none;
39
- opacity:.80;
40
- }
41
-
42
- /* Nav */
43
- #tqNav{
44
- position: fixed;
45
- top: 0; left: 0; right: 0;
46
- z-index: 999;
47
- padding: 12px 22px;
48
- background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.22));
49
- backdrop-filter: blur(12px);
50
- border-bottom: 1px solid rgba(255,255,255,.06);
51
- }
52
-
53
- #tqNav .nav-inner{
54
- max-width: 980px;
55
- margin: 0 auto;
56
- display:flex;
57
- align-items:center;
58
- gap: 12px;
59
- }
60
-
61
- #tqNav .brand{
62
- font-weight: 700;
63
- font-size: 1.05rem;
64
- letter-spacing: .22px;
65
- opacity: .82;
66
- }
67
-
68
- #tqNav .nav-links{
69
- display:flex;
70
- gap:10px;
71
- margin-left: 14px;
72
- flex-wrap: wrap;
73
- }
74
-
75
- #tqNav .nav-links a{
76
- text-decoration:none;
77
- color: var(--fg);
78
- padding: 8px 12px;
79
- border: 1px solid rgba(255,255,255,.12);
80
- border-radius: 999px;
81
- font-size: .9rem;
82
- opacity: .78;
83
- transition: .15s ease;
84
- white-space: nowrap;
85
- background: rgba(255,255,255,.02);
86
- }
87
-
88
- #tqNav .nav-links a:hover{
89
- opacity: 1;
90
- background: rgba(255,255,255,.06);
91
- border-color: rgba(255,255,255,.18);
92
- }
93
-
94
- #tqNav .spacer{ flex:1; }
95
-
96
- /* Hamburger button */
97
- #tqNav .menu-btn{
98
- width: 34px;
99
- height: 34px;
100
- display:flex;
101
- align-items:center;
102
- justify-content:center;
103
- border: 1px solid rgba(255,255,255,.14);
104
- border-radius: 12px;
105
- cursor: pointer;
106
- background: rgba(255,255,255,.03);
107
- transition: .15s ease;
108
- }
109
- #tqNav .menu-btn:hover{
110
- background: rgba(255,255,255,.06);
111
- border-color: rgba(255,255,255,.20);
112
- }
113
-
114
- #tqNav .menu-btn span{
115
- display:block;
116
- width:16px;
117
- height:2px;
118
- background: var(--fg); /* FIX: was black */
119
- position:relative;
120
- opacity:.7;
121
- }
122
-
123
- #tqNav .menu-btn span::before,
124
- #tqNav .menu-btn span::after{
125
- content:"";
126
- position:absolute;
127
- left:0;
128
- width:16px;
129
- height:2px;
130
- background: var(--fg); /* FIX: was black */
131
- opacity:.7;
132
- }
133
-
134
- #tqNav .menu-btn span::before{ top:-6px; }
135
- #tqNav .menu-btn span::after{ top: 6px; }
136
-
137
- #tqNav .menu{
138
- position:absolute;
139
- top: 60px;
140
- right: 24px;
141
- min-width: 220px;
142
- padding: 10px;
143
- border-radius: var(--rLg);
144
- background: var(--glass);
145
- backdrop-filter: blur(14px);
146
- border: 1px solid rgba(255,255,255,.10);
147
- box-shadow: 0 0 28px rgba(0,0,0,.6);
148
- display:none;
149
- }
150
-
151
- #tqNav .menu.open{ display:block; }
152
-
153
- #tqNav .menu a{
154
- display:block;
155
- padding: 10px 10px;
156
- border-radius: 10px;
157
- text-decoration:none;
158
- color: var(--fg);
159
- opacity: .7;
160
  }
161
 
162
- #tqNav .menu a:hover{
163
- background: rgba(255,255,255,.06);
164
- opacity: 1;
165
- }
166
-
167
- #tqNav .menu .sep{
168
- height:1px;
169
- background: rgba(255,255,255,.10);
170
- margin: 8px 2px;
171
- }
172
-
173
- /* Make app sit above canvas and below fixed nav */
174
  #tqApp{
175
  position:relative;
176
- z-index:1; /* above canvas */
177
- padding-top: 84px;
178
  }
179
 
180
  /* Hero / header panel (glass) */
@@ -184,22 +39,36 @@ body, .gradio-container{
184
  background: var(--glass);
185
  backdrop-filter: blur(12px);
186
  border: 1px solid rgba(255,255,255,.06);
187
- border-radius: var(--rMd); /* FIX: 10x -> 10px */
188
- box-shadow: 0 12px 34px rgba(0,0,0,.35);
189
  }
190
-
191
  .tq-hero .brand{
192
- font-weight:700;
193
- letter-spacing:.22px;
194
- font-size:1.08rem;
195
- opacity:.7;
196
  }
197
-
198
  .tq-hero .desc{
199
  margin-top:8px;
200
  color: var(--muted);
201
  font-size: .98rem;
202
- line-height: 1.45;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
203
  }
204
 
205
  /* Cards / panels */
@@ -208,79 +77,64 @@ body, .gradio-container{
208
  .gradio-container .wrap{
209
  border:1px solid var(--stroke) !important;
210
  background: var(--card) !important;
211
- backdrop-filter: blur(10px) !important;
212
- border-radius: var(--rMd) !important;
213
  }
214
 
215
- /* Hover effect */
216
  .gradio-container .gr-panel:hover{
217
  background: var(--card2) !important;
218
- border-color: rgba(255,255,255,.14) !important;
219
  }
220
 
221
- /* Tabs (pill vibe) */
222
  .gradio-container .gr-tab-nav{
223
  background: transparent !important;
224
  border: none !important;
225
  gap: 10px !important;
226
  }
227
-
228
  .gradio-container .gr-tab-nav button{
229
  border:1px solid rgba(255,255,255,.12) !important;
230
  border-radius:999px !important;
231
  padding:8px 12px !important;
232
  color: var(--fg) !important;
233
- opacity:.78 !important;
234
- background: rgba(255,255,255,.02) !important;
235
  transition:.18s ease !important;
236
  }
237
-
238
  .gradio-container .gr-tab-nav button:hover{
239
  opacity:1 !important;
240
  background: rgba(255,255,255,.06) !important;
241
- border-color: rgba(255,255,255,.18) !important;
242
  }
243
-
244
  .gradio-container .gr-tab-nav button.selected{
245
  opacity: 1 !important;
246
- border-color: rgba(14,18,25,.45) !important;
247
- box-shadow:
248
- 0 0 0 1px rgba(14,18,25,.18) inset,
249
- 0 0 20px var(--accentGlow) !important;
250
  }
251
 
252
  /* Inputs */
253
  .gradio-container input,
254
  .gradio-container textarea{
255
  background: rgba(255,255,255,.03) !important;
256
- border:1px solid rgba(255,255,255,.12) !important;
257
  color: var(--fg) !important;
258
- border-radius: var(--rMd) !important;
259
  }
260
 
261
- /* Buttons */
262
  .gradio-container button,
263
  .gradio-container .gr-button{
264
  color: var(--fg) !important;
265
- border:1px solid rgba(255,255,255,.12) !important;
266
- background: rgba(255,255,255,.04) !important;
267
  border-radius:999px !important;
268
  padding:10px 14px !important;
269
- opacity:.86 !important;
270
  transition:.15s ease !important;
271
  }
272
-
273
  .gradio-container button:hover,
274
  .gradio-container .gr-button:hover{
275
  opacity:1 !important;
276
- background: rgba(255,255,255,.08) !important;
277
- border-color: rgba(14,18,25,.35) !important;
278
- box-shadow: 0 0 18px var(--accentGlow);
279
- }
280
-
281
- /* Gallery tweaks */
282
- .gradio-container .gallery{
283
- border-radius: var(--rMd) !important;
284
  }
285
 
286
  /* Range accent */
@@ -288,226 +142,3 @@ input[type="range"]{ accent-color: var(--accent); }
288
 
289
  /* Optional: hide Gradio footer */
290
  footer{ display:none !important; }
291
-
292
-
293
-
294
- /* ============================================================
295
- FIX PACK — Gallery Carousel + Button Width (Gradio 4.44.x)
296
- REQUIRES: elem_id="down_gallery" and elem_id="strange_gallery"
297
- ============================================================ */
298
-
299
- /* ----------------------------
300
- 1) Buttons: stop banner mode
301
- ---------------------------- */
302
-
303
- /* Gradio often forces buttons to 100% width via wrapper rules */
304
- .gradio-container :is(button, .gr-button){
305
- width: fit-content !important;
306
- min-width: 180px !important;
307
- max-width: 320px !important;
308
-
309
- display: inline-flex !important;
310
- align-items: center !important;
311
- justify-content: center !important;
312
-
313
- flex: 0 0 auto !important;
314
- }
315
-
316
- /* If the parent is a flex/column that stretches, align to start */
317
- .gradio-container :is(.gr-panel, .block, .wrap, .container, .gr-form) :is(button, .gr-button){
318
- align-self: flex-start !important;
319
- }
320
-
321
- /* Some Gradio themes wrap buttons inside a full-width container */
322
- .gradio-container :is(button, .gr-button){
323
- white-space: nowrap !important;
324
- }
325
-
326
-
327
- /* ----------------------------
328
- 2) Gallery: kill “round giant”
329
- ---------------------------- */
330
-
331
- /* Neutralize mask/clip and ensure thumbnails, not posters */
332
- #down_gallery img,
333
- #strange_gallery img{
334
- border-radius: 12px !important;
335
- clip-path: none !important;
336
- mask-image: none !important;
337
-
338
- width: 100% !important;
339
- height: 140px !important;
340
- object-fit: contain !important;
341
-
342
- background: rgba(255,255,255,.02) !important;
343
- }
344
-
345
- /* Sometimes the radius is on wrapper elements, not the <img> */
346
- #down_gallery :is(figure, li, .gallery-item, .thumbnail-item, .item, .card),
347
- #strange_gallery :is(figure, li, .gallery-item, .thumbnail-item, .item, .card){
348
- border-radius: 14px !important;
349
- overflow: hidden !important;
350
- background: rgba(255,255,255,.03) !important;
351
- border: 1px solid rgba(255,255,255,.10) !important;
352
- padding: 8px !important;
353
- }
354
-
355
- /* Hide captions/filename vibe */
356
- #down_gallery :is(figcaption, .caption, .filename),
357
- #strange_gallery :is(figcaption, .caption, .filename){
358
- display:none !important;
359
- }
360
-
361
-
362
- /* ----------------------------
363
- 3) Gallery: force carousel
364
- ---------------------------- */
365
-
366
- /* Ensure the internal container can scroll horizontally */
367
- #down_gallery,
368
- #strange_gallery{
369
- width: 100% !important;
370
- }
371
-
372
- /* The direct child often holds the grid/list */
373
- #down_gallery > div,
374
- #strange_gallery > div{
375
- overflow-x: auto !important;
376
- overflow-y: hidden !important;
377
- -webkit-overflow-scrolling: touch;
378
- }
379
-
380
- /* Cover multiple possible DOM structures across Gradio builds */
381
- #down_gallery :is(.grid, .wrap, .gallery, .container, ul, .items, .thumbnails),
382
- #strange_gallery :is(.grid, .wrap, .gallery, .container, ul, .items, .thumbnails){
383
- display: flex !important;
384
- flex-wrap: nowrap !important;
385
- gap: 14px !important;
386
- align-items: stretch !important;
387
-
388
- padding: 12px !important;
389
-
390
- scroll-snap-type: x mandatory;
391
- }
392
-
393
- /* Each slide width */
394
- #down_gallery :is(figure, li, .gallery-item, .thumbnail-item, .item, .card),
395
- #strange_gallery :is(figure, li, .gallery-item, .thumbnail-item, .item, .card){
396
- flex: 0 0 auto !important;
397
- width: 240px !important;
398
- scroll-snap-align: start;
399
- }
400
-
401
- /* Sleek scrollbar */
402
- #down_gallery *::-webkit-scrollbar,
403
- #strange_gallery *::-webkit-scrollbar{
404
- height: 6px;
405
- }
406
- #down_gallery *::-webkit-scrollbar-thumb,
407
- #strange_gallery *::-webkit-scrollbar-thumb{
408
- background: rgba(255,255,255,.14);
409
- border-radius: 999px;
410
- }
411
- /* ============================================================
412
- LAYOUT PATCH — center + compact cards + clean gallery
413
- ============================================================ */
414
-
415
- /* 1) Center everything with a max width */
416
- #tqApp{
417
- max-width: 980px;
418
- margin: 0 auto;
419
- padding-left: 18px;
420
- padding-right: 18px;
421
- }
422
-
423
- /* 2) Make panels feel tighter */
424
- .gradio-container .gr-panel,
425
- .gradio-container .block,
426
- .gradio-container .wrap{
427
- padding: 12px !important;
428
- }
429
-
430
- /* 3) Headings spacing */
431
- #tqApp h2{
432
- margin-top: 6px !important;
433
- margin-bottom: 10px !important;
434
- }
435
-
436
- /* 4) Make markdown paragraphs not too wide */
437
- #tqApp .prose, #tqApp .markdown{
438
- max-width: 860px;
439
- }
440
-
441
- /* 5) Center buttons + make them look like buttons */
442
- #btn_down, #btn_strange{
443
- margin: 10px auto 6px auto !important;
444
- display: inline-flex !important;
445
- }
446
-
447
- #btn_down button, #btn_strange button{
448
- min-width: 220px !important;
449
- height: 44px !important;
450
- padding: 10px 18px !important;
451
- border-radius: 999px !important;
452
- }
453
-
454
- /* In case Gradio wraps button into a full-width row */
455
- #btn_down, #btn_strange{
456
- width: 100% !important;
457
- display: flex !important;
458
- justify-content: center !important;
459
- }
460
-
461
- /* 6) Slider: keep it centered and not mega wide */
462
- #tqApp .gr-slider{
463
- max-width: 860px !important;
464
- margin: 0 auto !important;
465
- }
466
-
467
- /* 7) JSON status: make it compact */
468
- #tqApp .json{
469
- max-width: 860px !important;
470
- margin: 0 auto !important;
471
- }
472
-
473
- /* 8) Gallery container centered */
474
- #down_gallery, #strange_gallery{
475
- max-width: 980px !important;
476
- margin: 0 auto !important;
477
- }
478
-
479
- /* 9) Force a clean grid of small cards (until carousel is perfect) */
480
- #down_gallery :is(ul, .grid, .wrap, .items),
481
- #strange_gallery :is(ul, .grid, .wrap, .items){
482
- display: grid !important;
483
- grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
484
- gap: 14px !important;
485
- align-items: start !important;
486
- }
487
-
488
- /* 10) Ensure thumbnails are same size and NOT circular */
489
- #down_gallery img, #strange_gallery img{
490
- width: 100% !important;
491
- height: 160px !important;
492
- object-fit: contain !important;
493
- border-radius: 12px !important;
494
- clip-path: none !important;
495
- mask-image: none !important;
496
- background: rgba(255,255,255,.02) !important;
497
- }
498
-
499
- /* 11) Card wrapper style */
500
- #down_gallery :is(li, figure, .gallery-item, .thumbnail-item, .item, .card),
501
- #strange_gallery :is(li, figure, .gallery-item, .thumbnail-item, .item, .card){
502
- background: rgba(255,255,255,.03) !important;
503
- border: 1px solid rgba(255,255,255,.10) !important;
504
- border-radius: 14px !important;
505
- padding: 10px !important;
506
- overflow: hidden !important;
507
- }
508
-
509
- /* 12) Hide filenames/captions */
510
- #down_gallery :is(figcaption, .caption, .filename),
511
- #strange_gallery :is(figcaption, .caption, .filename){
512
- display: none !important;
513
- }
 
1
+ /* ===== TwoQuarks skin for Gradio (ported from index.html) ===== */
2
  *{margin:0;padding:0;box-sizing:border-box}
3
 
4
  :root{
5
+ --bg:#000; --fg:#fff; --muted:rgba(255,255,255,.55);
6
+ --card:rgba(255,255,255,.04); --card2:rgba(255,255,255,.08);
7
+ --stroke:rgba(255,255,255,.10); --glass:rgba(0,0,0,.38);
 
 
 
 
 
 
 
 
8
  --accent:#8cb4ff;
 
 
 
 
 
9
  }
10
 
11
  html,body{height:100%}
 
16
  overflow-x:hidden;
17
  }
18
 
19
+ /* Starfield canvas like your site */
20
  #quantumField{
21
  position:fixed; inset:0;
22
  width:100vw; height:100vh;
23
  z-index:0;
24
  background:#000;
25
  pointer-events:none;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  }
27
 
28
+ /* Make app sit above canvas */
 
 
 
 
 
 
 
 
 
 
 
29
  #tqApp{
30
  position:relative;
31
+ z-index:1;
32
+ padding-top: 10px;
33
  }
34
 
35
  /* Hero / header panel (glass) */
 
39
  background: var(--glass);
40
  backdrop-filter: blur(12px);
41
  border: 1px solid rgba(255,255,255,.06);
42
+ border-radius: 14px;
 
43
  }
 
44
  .tq-hero .brand{
45
+ font-weight:700; letter-spacing:.2px; font-size:1.1rem;
 
 
 
46
  }
 
47
  .tq-hero .desc{
48
  margin-top:8px;
49
  color: var(--muted);
50
  font-size: .98rem;
51
+ line-height: 1.55;
52
+ }
53
+
54
+ /* Pills navigation (like your nav-links a) */
55
+ .tq-pills{
56
+ display:flex; gap:10px; flex-wrap:wrap;
57
+ margin-top:12px;
58
+ }
59
+ .tq-pill{
60
+ text-decoration:none; color:var(--fg);
61
+ padding:8px 12px;
62
+ border:1px solid rgba(255,255,255,.12);
63
+ border-radius:999px;
64
+ font-size:.9rem; opacity:.86;
65
+ transition:.18s ease;
66
+ white-space:nowrap;
67
+ }
68
+ .tq-pill:hover{opacity:1;background:rgba(255,255,255,.06)}
69
+ .tq-pill.active{
70
+ border-color:rgba(140,180,255,.55);
71
+ box-shadow:0 0 0 1px rgba(140,180,255,.20) inset;
72
  }
73
 
74
  /* Cards / panels */
 
77
  .gradio-container .wrap{
78
  border:1px solid var(--stroke) !important;
79
  background: var(--card) !important;
80
+ backdrop-filter: blur(8px) !important;
81
+ border-radius: 12px !important;
82
  }
83
 
84
+ /* Hover effect on panels that look like cards */
85
  .gradio-container .gr-panel:hover{
86
  background: var(--card2) !important;
 
87
  }
88
 
89
+ /* Tabs (match pill vibe) */
90
  .gradio-container .gr-tab-nav{
91
  background: transparent !important;
92
  border: none !important;
93
  gap: 10px !important;
94
  }
 
95
  .gradio-container .gr-tab-nav button{
96
  border:1px solid rgba(255,255,255,.12) !important;
97
  border-radius:999px !important;
98
  padding:8px 12px !important;
99
  color: var(--fg) !important;
100
+ opacity:.86 !important;
101
+ background: rgba(255,255,255,.00) !important;
102
  transition:.18s ease !important;
103
  }
 
104
  .gradio-container .gr-tab-nav button:hover{
105
  opacity:1 !important;
106
  background: rgba(255,255,255,.06) !important;
 
107
  }
 
108
  .gradio-container .gr-tab-nav button.selected{
109
  opacity: 1 !important;
110
+ border-color: rgba(140,180,255,.55) !important;
111
+ box-shadow: 0 0 0 1px rgba(140,180,255,.20) inset !important;
 
 
112
  }
113
 
114
  /* Inputs */
115
  .gradio-container input,
116
  .gradio-container textarea{
117
  background: rgba(255,255,255,.03) !important;
118
+ border:1px solid rgba(255,255,255,.14) !important;
119
  color: var(--fg) !important;
120
+ border-radius: 12px !important;
121
  }
122
 
123
+ /* Buttons like your .btn */
124
  .gradio-container button,
125
  .gradio-container .gr-button{
126
  color: var(--fg) !important;
127
+ border:1px solid rgba(255,255,255,.14) !important;
128
+ background: rgba(255,255,255,.03) !important;
129
  border-radius:999px !important;
130
  padding:10px 14px !important;
131
+ opacity:.92 !important;
132
  transition:.15s ease !important;
133
  }
 
134
  .gradio-container button:hover,
135
  .gradio-container .gr-button:hover{
136
  opacity:1 !important;
137
+ background: rgba(255,255,255,.07) !important;
 
 
 
 
 
 
 
138
  }
139
 
140
  /* Range accent */
 
142
 
143
  /* Optional: hide Gradio footer */
144
  footer{ display:none !important; }