Skip to content

Commit 5f7338c

Browse files
author
LinuxJava7
committed
bottom bar adaptive viewswitchernarrow width
1 parent f544e1c commit 5f7338c

File tree

1 file changed

+54
-38
lines changed

1 file changed

+54
-38
lines changed

style.css

Lines changed: 54 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,24 @@
1010
--ctp-antibase: var(--ctp-frappe-base-rgb);
1111
--ctp-antiblue: var(--ctp-frappe-blue-rgb);
1212
--ctp-antilavender: var(--ctp-frappe-lavender);
13-
13+
1414
/* Layout Variables */
1515
--pagewidth: 50rem;
1616
--grid-gap: 3rem;
1717
--pagegridwidth: calc(var(--pagewidth) + (6 * var(--grid-gap)));
1818
--narrowwidth: 60%;
1919
--defaultsize: 18px;
20-
--slickease: cubic-bezier(.17,.89,.32,1.28);
20+
--slickease: cubic-bezier(.17, .89, .32, 1.28);
2121
--max-width: 1200px;
22-
22+
2323
/* Component Variables */
2424
--rounded-corner: 12px;
2525
--btnround: 500px;
2626
--btnsqr: 0.8rem;
27-
27+
2828
/* Font Settings */
2929
font-family: Inter, sans-serif;
30-
font-feature-settings: 'liga' 1, 'calt' 1, 'ss04' 1;
30+
font-feature-settings: 'liga'1, 'calt'1, 'ss04'1;
3131
word-wrap: break-word;
3232
overflow-wrap: break-word;
3333
font-size: 18px;
@@ -37,7 +37,7 @@
3737
@supports (font-variation-settings: normal) {
3838
:root {
3939
font-family: InterVariable, sans-serif;
40-
font-feature-settings: 'liga' 1, 'calt' 1, 'ss04' 1;
40+
font-feature-settings: 'liga'1, 'calt'1, 'ss04'1;
4141
}
4242
}
4343

@@ -90,13 +90,21 @@ h1 {
9090
margin: 0 0 0.25em;
9191
}
9292

93-
h2:first-child {
94-
margin: 1rem 0 1rem;
93+
h2:first-child {
94+
margin: 1rem 0 1rem;
9595
}
9696

97-
h2 { font-size: 1.75em; }
98-
h3 { font-size: 1.45em; }
99-
h4 { font-size: 1.20em; }
97+
h2 {
98+
font-size: 1.75em;
99+
}
100+
101+
h3 {
102+
font-size: 1.45em;
103+
}
104+
105+
h4 {
106+
font-size: 1.20em;
107+
}
100108

101109
.note {
102110
margin: 1.5rem 0;
@@ -120,7 +128,7 @@ a {
120128
font-weight: 600;
121129
text-decoration: none;
122130
cursor: pointer;
123-
font-variation-settings: "wght" 600;
131+
font-variation-settings: "wght"600;
124132
}
125133

126134
a:hover {
@@ -148,14 +156,14 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
148156
flex: 1;
149157
display: grid;
150158
gap: 0 var(--grid-gap);
151-
grid-template-columns: [full-start] minmax(0, 1fr) [main-start] repeat(5,minmax(1rem,calc(var(--pagewidth)/5))) [main-end] minmax(0, 1fr) [full-end];
159+
grid-template-columns: [full-start] minmax(0, 1fr) [main-start] repeat(5, minmax(1rem, calc(var(--pagewidth)/5))) [main-end] minmax(0, 1fr) [full-end];
152160
max-width: var(--max-width);
153161
margin-left: auto;
154162
margin-right: auto;
155163
}
156164

157-
.container * {
158-
grid-column: main;
165+
.container * {
166+
grid-column: main;
159167
}
160168

161169
/* Tiles Grid */
@@ -192,8 +200,8 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
192200
overflow: hidden;
193201
}
194202

195-
.tile * {
196-
grid-column: auto;
203+
.tile * {
204+
grid-column: auto;
197205
}
198206

199207
.tile img {
@@ -250,7 +258,7 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
250258
margin-bottom: 18px;
251259
}
252260

253-
.tile p + p {
261+
.tile p+p {
254262
margin-top: 9px;
255263
}
256264

@@ -277,7 +285,7 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
277285
color: var(--ctp-antitext);
278286
opacity: 1;
279287
font-weight: 600;
280-
font-variation-settings: "wght" 600;
288+
font-variation-settings: "wght"600;
281289
padding: 0.6rem 1.5rem;
282290
display: inline-block;
283291
align-items: center;
@@ -320,14 +328,19 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
320328
background-color: rgba(var(--ctp-base) / 75%);
321329
backdrop-filter: blur(12px);
322330
z-index: 9999;
331+
padding-left: 8px;
332+
padding-right: 8px;
323333
}
324334

325335
/* View Switcher */
326336
.view-switcher-narrow {
327337
display: flex;
328338
justify-content: center;
329339
padding: 0;
330-
height: 85%
340+
height: 85%;
341+
width: 100%;
342+
align-content: center;
343+
align-items: center;
331344
}
332345

333346
.view-switcher-narrow ul {
@@ -336,18 +349,24 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
336349
margin: 0;
337350
padding: 0;
338351
gap: 0.25rem;
352+
width: 100%;
353+
justify-content: center;
354+
align-items: center;
355+
align-content: center;
339356
}
340357

341358
.view-switcher-narrow li {
342359
display: inline-block;
360+
width: 100%;
361+
max-width: 6.8rem;
343362
}
344363

345364
.view-switcher-narrow a {
346365
display: flex;
347366
align-items: center;
348367
justify-content: center;
349368
flex-direction: column;
350-
width: 6.8rem;
369+
width: auto;
351370
height: 100%;
352371
color: var(--ctp-text);
353372
font-weight: bold;
@@ -373,7 +392,6 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
373392
margin-top: 4px;
374393
}
375394

376-
377395
/* Header Bar */
378396
.headerbar {
379397
display: flex;
@@ -481,13 +499,11 @@ footer {
481499
.view-switcher a:hover,
482500
.view-switcher a:focus,
483501
.view-switcher-narrow a:hover,
484-
.view-switcher-narrow a:focus
485-
{
502+
.view-switcher-narrow a:focus {
486503
background-color: rgb(255 255 255 / 2.5%);
487504
}
488505

489-
.view-switcher .current
490-
.view-switcher-narrow .current{
506+
.view-switcher .current .view-switcher-narrow .current {
491507
background-color: rgb(255 255 255 / 5%);
492508
}
493509
}
@@ -512,44 +528,44 @@ footer {
512528
footer {
513529
padding-bottom: 5.5rem;
514530
}
515-
531+
516532
.container {
517-
grid-template-columns: [full-start] minmax(0, 1fr) [main-start] repeat(2,minmax(1rem,calc(var(--pagewidth)/2))) [main-end] minmax(0, 1fr) [full-end];
533+
grid-template-columns: [full-start] minmax(0, 1fr) [main-start] repeat(2, minmax(1rem, calc(var(--pagewidth)/2))) [main-end] minmax(0, 1fr) [full-end];
518534
}
519-
535+
520536
.tiles {
521537
grid-template-columns: 1fr;
522538
}
523-
539+
524540
.tile {
525541
grid-template-columns: 1fr;
526542
}
527-
543+
528544
.tile .description {
529545
padding: 1rem;
530546
}
531-
547+
532548
.tile .btn {
533549
margin: 0.5rem 0 0;
534550
display: block;
535-
max-width: 100%;
551+
max-width: 100%;
536552
border-radius: 6px;
537553
}
538-
554+
539555
h1 {
540556
font-size: 3rem;
541557
}
542-
558+
543559
h2 {
544560
font-size: 1.75rem;
545561
}
546-
562+
547563
.social {
548564
align-items: center;
549565
gap: 0.5rem;
550566
}
551-
567+
552568
.social li {
553569
margin: 0;
554570
}
555-
}
571+
}

0 commit comments

Comments
 (0)