Skip to content

Commit 2bcd77f

Browse files
author
LinuxJava7
committed
new top bar
1 parent 09ed6a3 commit 2bcd77f

File tree

2 files changed

+86
-106
lines changed

2 files changed

+86
-106
lines changed

catppuccin.css

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137

138138
.view-switcher a,
139139
.view-switcher-narrow a {
140-
color: rgb(76, 79, 105, 0.9);
140+
color: rgb(76, 79, 105, 0.8);
141141
}
142142

143143
@media (prefers-color-scheme: dark) {
@@ -245,10 +245,17 @@
245245

246246
.view-switcher a,
247247
.view-switcher-narrow a {
248-
color: rgb(205, 214, 244, 0.9);
248+
color: rgb(205, 214, 244, 0.8);
249249
}
250250

251-
.view-switcher-bar {
251+
.view-switcher-narrow {
252+
box-shadow: 0 0.3rem 0.3rem rgba(0, 0, 0, 0.1),
253+
0 0 1rem rgba(0, 0, 0, 0.05),
254+
inset 0 1px 1px rgba(255, 255, 255, 0.1),
255+
inset 0 0 0.27rem rgba(255, 255, 255, 0.1);
256+
}
257+
258+
.view-switcher {
252259
box-shadow: 0 0.3rem 0.3rem rgba(0, 0, 0, 0.1),
253260
0 0 1rem rgba(0, 0, 0, 0.05),
254261
inset 0 1px 1px rgba(255, 255, 255, 0.1),

style.css

Lines changed: 76 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -300,165 +300,138 @@ a[href^="http"]:not(:has(.arrow)):not(:has(img)):not(:has(svg))::after {
300300
fill: currentColor;
301301
}
302302

303-
/* View Switcher Bar */
304-
.view-switcher-bar {
305-
display: none;
303+
/* View Switcher Shared Styles */
304+
.view-switcher,
305+
.view-switcher-narrow {
306306
justify-content: center;
307-
align-items: center;
308-
height: fit-content;
309-
width: fit-content;
310-
position: fixed;
311-
bottom: 0;
307+
padding: 0.25rem;
312308
background-color: var(--headerbar-backdrop-color);
313309
backdrop-filter: blur(12px);
314310
z-index: 9999;
315-
margin: 1rem;
316-
padding: 0.25rem;
317-
right: 0;
318-
left: 0;
319311
border-radius: var(--btnround);
320312
box-shadow: 0 0.3rem 0.3rem rgba(0, 0, 0, 0.1),
321313
0 0 1rem rgba(0, 0, 0, 0.05),
322314
inset 0 1px 1px rgba(255, 255, 255, 1),
323315
inset 0 0 0.27rem rgba(255, 255, 255, 1);
324316
}
325317

326-
/* View Switcher */
327-
.view-switcher-narrow {
328-
display: flex;
329-
justify-content: center;
330-
padding: 0;
331-
height: 100%;
332-
width: 100%;
333-
align-content: center;
334-
align-items: stretch;
335-
}
336-
318+
.view-switcher ul,
337319
.view-switcher-narrow ul {
338320
display: flex;
339321
list-style: none;
340322
margin: 0;
341323
padding: 0;
342-
width: 100%;
343-
height: 100%;
344-
justify-content: space-evenly;
345-
max-width: 28rem;
346324
gap: 0.25rem;
347-
align-items: stretch;
348-
}
349-
350-
.view-switcher-narrow li {
351-
display: flex;
352-
flex: 1;
353-
min-width: 0;
354-
align-items: stretch;
355325
}
356326

327+
.view-switcher a,
357328
.view-switcher-narrow a {
358329
display: flex;
359330
align-items: center;
360331
justify-content: center;
361-
flex-direction: column;
362-
width: 100%;
363-
height: 100%;
364-
font-weight: bold;
332+
padding: 0.15rem 1.25rem;
365333
text-decoration: none;
366334
border-radius: var(--btnround);
367335
transition: background-color 0.2s ease, color 0.2s ease;
336+
font-weight: bold;
337+
white-space: nowrap;
338+
height: 100%;
339+
}
340+
341+
/* View Switcher Specific */
342+
.view-switcher {
343+
width: fit-content;
344+
height: fit-content;
345+
margin-top: 1rem;
346+
}
347+
348+
.view-switcher a {
349+
gap: 0.4rem;
350+
}
351+
352+
.view-switcher svg {
353+
width: 1rem;
354+
height: 1rem;
355+
flex-shrink: 0;
356+
}
357+
358+
/* View Switcher Narrow Specific */
359+
.view-switcher-narrow {
360+
width: 100%;
361+
height: 100%;
362+
align-content: center;
363+
align-items: stretch;
364+
}
365+
366+
.view-switcher-narrow a {
367+
flex-direction: column;
368368
gap: 0.05rem;
369369
font-size: 0.8rem;
370-
padding: 0.15rem;
371-
padding-left: 1.25rem;
372-
padding-right: 1.25rem;
373-
white-space: nowrap;
374-
overflow: hidden;
375-
text-overflow: ellipsis;
376-
flex: 1;
377370
}
378371

379-
.view-switcher-narrow a:hover,
380-
.view-switcher-narrow a:focus,
372+
.view-switcher-narrow svg {
373+
margin-top: 0.25rem;
374+
width: 1.2rem;
375+
}
376+
377+
/* View Switcher States */
381378
.view-switcher a:hover,
382-
.view-switcher a:focus {
379+
.view-switcher a:focus,
380+
.view-switcher-narrow a:hover,
381+
.view-switcher-narrow a:focus {
383382
background-color: rgba(0, 0, 6, 0.03);
384383
color: var(--window-fg-color);
385-
386384
}
387385

388-
.view-switcher-narrow .current,
389-
.view-switcher .current {
386+
.view-switcher .current,
387+
.view-switcher-narrow .current {
390388
background-color: rgba(0, 0, 6, 0.05);
391-
color: var(--view-switcher-accent)
389+
color: var(--view-switcher-accent);
392390
}
393391

394-
.view-switcher-narrow .current:hover,
395-
.view-switcher-narrow .current:focus,
396392
.view-switcher .current:hover,
397-
.view-switcher .current:focus {
393+
.view-switcher .current:focus,
394+
.view-switcher-narrow .current:hover,
395+
.view-switcher-narrow .current:focus {
398396
background-color: rgba(0, 0, 6, 0.08);
399-
color: var(--view-switcher-accent)
400-
397+
color: var(--view-switcher-accent);
401398
}
402399

403-
.view-switcher-narrow svg {
404-
margin-top: 0.25rem;
405-
width: 1.2rem;
400+
/* View Switcher Bar */
401+
.view-switcher-bar {
402+
display: none;
403+
justify-content: center;
404+
align-items: center;
405+
height: fit-content;
406+
width: fit-content;
407+
position: fixed;
408+
bottom: 0;
409+
margin: 1rem;
410+
right: 0;
411+
left: 0;
412+
background-color: var(--headerbar-backdrop-color);
413+
backdrop-filter: blur(12px);
414+
z-index: 9999;
415+
border-radius: var(--btnround);
416+
box-shadow: 0 0.3rem 0.3rem rgba(0, 0, 0, 0.1),
417+
0 0 1rem rgba(0, 0, 0, 0.05),
418+
inset 0 1px 1px rgba(255, 255, 255, 1),
419+
inset 0 0 0.27rem rgba(255, 255, 255, 1);
406420
}
407421

408422
/* Header Bar */
409423
.headerbar {
410424
display: flex;
411425
justify-content: center;
412426
align-items: center;
413-
height: 3rem;
427+
height: fit-content;
414428
width: 100%;
415429
position: sticky;
416430
top: 0;
417431
padding: 0;
418-
background-color: var(--headerbar-backdrop-color);
419-
backdrop-filter: blur(12px);
420432
z-index: 9999;
421433
}
422434

423-
/* View Switcher */
424-
.view-switcher {
425-
display: flex;
426-
justify-content: center;
427-
padding: 0;
428-
height: 80%
429-
}
430-
431-
.view-switcher ul {
432-
display: flex;
433-
list-style: none;
434-
margin: 0;
435-
padding: 0;
436-
gap: 0.25rem;
437-
}
438-
439-
.view-switcher li {
440-
display: inline-block;
441-
}
442-
443-
.view-switcher a {
444-
display: flex;
445-
align-items: center;
446-
justify-content: center;
447-
width: 8.25rem;
448-
height: 100%;
449-
color: var(--window-fg-color);
450-
font-weight: bold;
451-
text-decoration: none;
452-
border-radius: var(--btnsqr);
453-
transition: background-color 0.2s ease, color 0.2s ease;
454-
gap: 0.4rem;
455-
}
456-
457-
.view-switcher svg {
458-
width: 1em;
459-
height: 1em;
460-
}
461-
462435
/* Footer */
463436
footer {
464437
background-color: var(--card-bg-color);

0 commit comments

Comments
 (0)