oficina / slides Public

Clone
git clone https://amadan.net/oficina/slides

Plain git — no account needed to clone.

Download

Download this file

1/* decks.css — GET /, the deck list (templates/decks.html). Docs' list
2 (its design/richer-ui list.html), for decks: the newest five as their
3 first slides lying on a desk, everything older as rows. The light on
4 them is brand/light.css's; this file is the still design. */
5
6/* The desk: the same grey the editor and the viewer sit on
7 (static/desk.css, estilo's --estilo-desk), plain, so going from the
8 list into a deck never changes the room. Painted on the body so it
9 reaches the bar and the edges without anything here overflowing. */
10body:has([slides-decks]) {
11 background: var(--slides-desk);
12}
13[slides-decks] {
14 padding-block: var(--rst-sp-4) var(--rst-sp-6);
15}
16/* A wider column than a form's: five slides across at 64rem were each
17 narrower than a phone's cover. Still well inside a laptop's width. */
18[rst-page]:has(> [slides-decks]) {
19 max-width: 72rem;
20}
21
22/* The header: the screen's name, large and set tight, with search and
23 New deck on the same line. On a phone the title and New deck share the
24 first line and search takes the whole second one. */
25[slides-decks-head] {
26 display: flex;
27 flex-wrap: wrap;
28 align-items: center;
29 justify-content: space-between;
30 gap: var(--rst-sp-3) var(--rst-sp-5);
31}
32[slides-decks-head] h1 {
33 margin: 0;
34 font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem);
35 font-weight: 700;
36 letter-spacing: -0.025em;
37 line-height: 1.1;
38}
39/* Search and create as one group. They stay two separate forms, never
40 one: unrelated actions with different methods and targets. */
41[slides-decks-actions] {
42 display: flex;
43 flex: 1 1 22rem;
44 justify-content: flex-end;
45 align-items: center;
46 gap: var(--rst-sp-3);
47 min-inline-size: 0;
48}
49/* Search is one field with its submit inside it, at the start, as the
50 magnifier, which keeps "Search decks" as its name. The field takes
51 whatever the row leaves it, down to nothing: min-inline-size: 0 lifts
52 a flex item's automatic minimum, which for an <input> is its content
53 and would otherwise push the page sideways at 320px (SC 1.4.10). */
54[slides-search] {
55 position: relative;
56 display: flex;
57 flex: 0 1 20rem;
58 min-inline-size: 0;
59}
60[slides-search] [rst-input] {
61 flex: 1 1 auto;
62 min-inline-size: 0;
63 min-block-size: 40px;
64 padding-inline-start: var(--rst-sp-6);
65 border-color: transparent;
66 border-radius: var(--rst-radius-pill);
67 background: light-dark(rgb(255 255 255 / 0.8), rgb(255 255 255 / 0.06));
68 box-shadow: inset 0 0 0 1px var(--rst-line-strong), 0 1px 2px light-dark(rgb(20 30 60 / 0.06), transparent);
69}
70[slides-search] [rst-input]:hover {
71 box-shadow: inset 0 0 0 1px var(--rst-text-muted);
72}
73[slides-search] [rst-input]:focus-visible {
74 outline: 2px solid var(--rst-accent);
75 outline-offset: 1px;
76}
77[slides-search-submit] {
78 position: absolute;
79 inset-block: 0;
80 inset-inline-start: 2px;
81 display: grid;
82 place-items: center;
83 inline-size: 38px;
84 padding: 0;
85 border: 0;
86 border-radius: var(--rst-radius-pill);
87 background: transparent;
88 color: var(--rst-text-muted);
89 cursor: pointer;
90}
91[slides-search-submit]:hover {
92 color: var(--rst-accent);
93}
94[slides-search-submit]:focus-visible {
95 outline: 2px solid var(--rst-accent);
96 outline-offset: -2px;
97}
98[slides-search-submit] svg,
99[slides-create] svg {
100 inline-size: 18px;
101 block-size: 18px;
102}
103[slides-create] {
104 flex: none;
105}
106[slides-create] button {
107 min-block-size: 40px;
108 padding-inline: var(--rst-sp-4) var(--rst-sp-5);
109 border-radius: var(--rst-radius-pill);
110 font-size: var(--rst-fs-base, 1rem);
111 white-space: nowrap;
112 box-shadow: 0 1px 0 rgb(255 255 255 / 0.18) inset, 0 6px 16px -6px color-mix(in oklab, var(--rst-accent) 70%, transparent);
113}
114@media (max-width: 36rem) {
115 [slides-decks-actions] {
116 display: contents;
117 }
118 /* As tall as New deck beside it, so search, on the line under
119 them, is one step below both. */
120 [slides-decks-head] h1 {
121 flex: 1 1 auto;
122 align-self: stretch;
123 display: flex;
124 align-items: center;
125 }
126 [slides-search] {
127 order: 3;
128 flex: 1 1 100%;
129 }
130}
131
132/* A cover: a deck's first slide, the server's own picture of it
133 (thumbs.go), at 16:9 like every slide. A deck with no slides is the
134 same sheet in its theme's background, set inline. The slide is its
135 own colours in either scheme, as a projected slide is. */
136[slides-cover] {
137 display: block;
138 flex: none;
139 aspect-ratio: 16 / 9;
140 border-radius: 4px;
141 background-color: #faf7f0;
142 overflow: hidden;
143 box-shadow:
144 0 0 0 1px light-dark(rgb(23 32 60 / 0.10), rgb(255 255 255 / 0.10)),
145 0 1px 2px rgb(23 32 60 / 0.08);
146}
147[slides-cover] > img {
148 display: block;
149 inline-size: 100%;
150 block-size: 100%;
151 object-fit: cover;
152}
153
154/* The shelf: the newest decks as their first slides, one row of them
155 across the column. Narrower, it is a row you swipe, a cover and a half
156 or more wide, so the rows below are still on the first screen. */
157[slides-shelf] {
158 display: grid;
159 grid-template-columns: repeat(5, minmax(0, 1fr));
160 gap: var(--rst-sp-5) var(--rst-sp-4);
161 padding: 0;
162 list-style: none;
163}
164@media (max-width: 56rem) {
165 [slides-shelf] {
166 grid-template-columns: none;
167 grid-auto-flow: column;
168 grid-auto-columns: 34%;
169 gap: var(--rst-sp-4);
170 overflow-x: auto;
171 overscroll-behavior-x: contain;
172 scroll-snap-type: x mandatory;
173 scrollbar-width: none;
174 /* Room for the covers' shadows and their lift inside the scroller,
175 which clips both. */
176 margin-inline: calc(var(--rst-sp-4) * -1);
177 padding: var(--rst-sp-2) var(--rst-sp-4) var(--rst-sp-4);
178 scroll-padding-inline: var(--rst-sp-4);
179 }
180 [slides-shelf] > li {
181 scroll-snap-align: start;
182 }
183}
184@media (max-width: 36rem) {
185 [slides-shelf] {
186 grid-auto-columns: 64%;
187 }
188}
189[slides-tile] {
190 display: flex;
191 flex-direction: column;
192 gap: var(--rst-sp-1);
193 min-inline-size: 0;
194 color: var(--rst-text);
195 text-decoration: none;
196 border-radius: var(--rst-radius-sm);
197}
198[slides-tile]:focus-visible {
199 outline: 2px solid var(--rst-accent);
200 outline-offset: 6px;
201}
202[slides-tile] [slides-cover] {
203 inline-size: 100%;
204 margin-block-end: var(--rst-sp-2);
205 border-radius: 6px;
206 box-shadow:
207 0 0 0 1px light-dark(rgb(23 32 60 / 0.08), rgb(255 255 255 / 0.08)),
208 0 1px 2px rgb(23 32 60 / 0.08),
209 0 10px 24px -12px light-dark(rgb(23 32 60 / 0.30), rgb(0 0 0 / 0.7));
210}
211[slides-tile-title] {
212 font-size: var(--rst-fs-sm, 0.875rem);
213 font-weight: 600;
214 line-height: 1.3;
215 overflow-wrap: anywhere;
216 display: -webkit-box;
217 -webkit-box-orient: vertical;
218 -webkit-line-clamp: 2;
219 line-clamp: 2;
220 overflow: hidden;
221}
222[slides-tile]:hover [slides-tile-title] {
223 color: var(--rst-accent);
224}
225[slides-tile-meta],
226[slides-tile-sub] {
227 color: var(--rst-text-muted);
228 font-size: var(--rst-fs-xs, 0.75rem);
229 line-height: 1.4;
230}
231[slides-tile-meta] {
232 display: flex;
233 flex-wrap: wrap;
234 gap: 0 var(--rst-sp-2);
235}
236/* The rung, on a cover, only when it is not private: a word, as Docs'
237 shared note, never a colour alone. */
238[slides-tile-rung]::before {
239 content: "·";
240 content: "·" / "";
241 margin-inline-end: var(--rst-sp-2);
242}
243[slides-tile-sub] {
244 overflow: hidden;
245 white-space: nowrap;
246 text-overflow: ellipsis;
247}
248
249/* The rows: everything older than the shelf, and every search result.
250 rastrillo's list and row, which already stretch the title link over
251 the whole row and tint it on hover; a small cover at the start of
252 each. */
253[slides-decks] [rst-list] {
254 box-shadow: 0 1px 2px light-dark(rgb(23 32 60 / 0.05), transparent);
255}
256[slides-decks] [rst-row] {
257 gap: var(--rst-sp-4);
258}
259[rst-row] [slides-cover] {
260 inline-size: 72px;
261 margin-block: var(--rst-sp-1);
262 box-shadow:
263 0 0 0 1px light-dark(rgb(23 32 60 / 0.10), rgb(255 255 255 / 0.10)),
264 0 1px 2px rgb(23 32 60 / 0.08),
265 0 4px 10px -6px rgb(23 32 60 / 0.25);
266}
267[slides-decks] [rst-row-main] > a {
268 font-weight: 600;
269}
270[slides-decks] [rst-row-sub] {
271 overflow: hidden;
272 white-space: nowrap;
273 text-overflow: ellipsis;
274}
275[slides-row-trail] {
276 display: flex;
277 flex: none;
278 align-items: center;
279 gap: var(--rst-sp-4);
280}
281[slides-row-when] {
282 flex: none;
283 min-inline-size: 6.5rem;
284 color: var(--rst-text-muted);
285 font-size: var(--rst-fs-sm);
286 font-variant-numeric: tabular-nums;
287 text-align: end;
288}
289/* A phone: the cover, then the title and its line, then the rung and
290 the date under them, so nothing is squeezed to a sliver at 320px. */
291@media (max-width: 36rem) {
292 [slides-decks] [rst-row] {
293 display: grid;
294 grid-template-columns: auto minmax(0, 1fr);
295 align-items: center;
296 gap: var(--rst-sp-1) var(--rst-sp-3);
297 }
298 [slides-decks] [rst-row] [slides-cover] {
299 grid-row: span 2;
300 inline-size: 88px;
301 }
302 [slides-row-trail] {
303 flex-wrap: wrap;
304 gap: var(--rst-sp-1) var(--rst-sp-3);
305 min-inline-size: 0;
306 }
307 [slides-row-when] {
308 min-inline-size: 0;
309 text-align: start;
310 font-size: var(--rst-fs-xs);
311 }
312}
313/* A heading inside the card: sentence case, the muted ink, weight doing
314 the work rather than capitals. */
315[slides-rows-label] {
316 margin: 0;
317 padding: var(--rst-sp-4) var(--rst-sp-4) var(--rst-sp-2);
318 font-size: var(--rst-fs-sm, 0.875rem);
319 font-weight: 600;
320 color: var(--rst-text-muted);
321}
322/* The way back out of a result page, under the results: it is about the
323 list being shown, not about the controls that produced it. */
324[slides-search-clear] {
325 font-size: var(--rst-fs-sm);
326}
327