forge
Explore
Log in

Don't you dare go Hollow

iz

Clone
★ 0

0 watching0 forksRustAGPL-3.0567.3 KiB3950aceTahinli27 days ago34 commits

_layout.scss132 lines, 2.5 KiBHistoryRawDownload
1//! Page frame: the sticky top bar (wordmark, service switcher, right-hand slot) and the main column.
2//! Below 720 px the top bar wraps onto two rows and the card grid goes to one column.
3
4.topbar {
5 position: sticky;
6 top: 0;
7 z-index: 20;
8 display: flex;
9 align-items: center;
10 gap: var(--space-4);
11 min-height: 3.25rem;
12 padding: var(--space-2) var(--space-6);
13 background: var(--topbar);
14 backdrop-filter: saturate(1.4) blur(8px);
15 border-bottom: 1px solid var(--border);
16}
17
18.topbar-brand {
19 display: inline-flex;
20 align-items: baseline;
21 gap: var(--space-2);
22 color: var(--text);
23 font-weight: 700;
24 font-size: var(--text-lg);
25 text-decoration: none;
26 letter-spacing: -0.02em;
27}
28
29.topbar-brand:hover {
30 color: var(--accent);
31}
32
33// The service switcher fills the middle of the bar. It is empty until there are services to list.
34.switcher {
35 display: flex;
36 align-items: center;
37 flex: 1 1 auto;
38 gap: var(--space-1);
39 min-width: 0;
40 overflow-x: auto;
41}
42
43.switcher:empty {
44 display: none;
45}
46
47.switcher a {
48 padding: var(--space-1) var(--space-3);
49 border-radius: var(--radius-sm);
50 color: var(--muted);
51 text-decoration: none;
52 white-space: nowrap;
53}
54
55.switcher a[aria-current="true"],
56.switcher a:hover {
57 background: var(--surface-2);
58 color: var(--text);
59}
60
61.topbar-end {
62 display: flex;
63 align-items: center;
64 gap: var(--space-3);
65 margin-left: auto;
66 color: var(--muted);
67 font-size: var(--text-sm);
68}
69
70// The user menu: the name opens a small panel with the sign-out button. The panel is plain HTML
71// (a details element), so it works without script.
72.user-menu {
73 position: relative;
74}
75
76.user-menu > summary {
77 cursor: pointer;
78 list-style: none;
79}
80
81.user-menu-form {
82 position: absolute;
83 right: 0;
84 top: 100%;
85 margin-top: var(--space-2);
86 padding: var(--space-3);
87 background: var(--surface-2);
88 border-radius: var(--radius, 8px);
89 z-index: 10;
90}
91
92.page {
93 width: 100%;
94 max-width: var(--content-width);
95 margin: 0 auto;
96 padding: var(--space-8) var(--space-6) var(--space-8);
97}
98
99.page > * + * {
100 margin-top: var(--space-6);
101}
102
103.grid-cards {
104 display: grid;
105 grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
106 gap: var(--space-4);
107}
108
109@media (max-width: 720px) {
110 .topbar {
111 flex-wrap: wrap;
112 gap: var(--space-2) var(--space-3);
113 padding: var(--space-2) var(--space-4);
114 }
115
116 .switcher {
117 order: 3;
118 flex-basis: 100%;
119 }
120
121 .topbar-end {
122 margin-left: 0;
123 }
124
125 .page {
126 padding: var(--space-6) var(--space-4);
127 }
128
129 .grid-cards {
130 grid-template-columns: 1fr;
131 }
132}