styles.css

  1/*
  2 * SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
  3 *
  4 * SPDX-License-Identifier: CC0-1.0
  5 */
  6
  7@font-face {
  8	font-family: 'Atkinson Hyperlegible';
  9	font-weight: normal;
 10	font-style: normal;
 11	font-display: swap;
 12	src: url("/static/fonts/regular-102a.woff2") format("woff2");
 13}
 14
 15@font-face {
 16	font-family: 'Atkinson Hyperlegible';
 17	font-weight: normal;
 18	font-style: italic;
 19	font-display: swap;
 20	src: url("/static/fonts/regular-102a.woff2") format("woff2");
 21}
 22
 23@font-face {
 24	font-family: 'Atkinson Hyperlegible';
 25	font-weight: bold;
 26	font-style: normal;
 27	font-display: swap;
 28	src: url("/static/fonts/bold-102a.woff2") format("woff2");
 29}
 30
 31@font-face {
 32	font-family: 'Atkinson Hyperlegible';
 33	font-weight: bold;
 34	font-style: italic;
 35	font-display: swap;
 36	src: url("/static/fonts/bolditalic-102a.woff2") format("woff2");
 37}
 38
 39html {
 40	margin: auto auto;
 41	color: var(--text);
 42	background: var(--page-background);
 43	font-family: 'Atkinson Hyperlegible', sans-serif;
 44	scroll-behavior: smooth;
 45}
 46
 47a {
 48	color: var(--link);
 49}
 50
 51a:visited {
 52	color: var(--link);
 53}
 54
 55/* Grid layout */
 56body {
 57	width: auto;
 58	min-height: 100vh;
 59}
 60
 61@supports (display: grid) {
 62	body {
 63		display: grid;
 64		grid-template-rows: [header] auto [main] 1fr [footer] auto;
 65	}
 66
 67	body > header,
 68	body > main,
 69	body > footer {
 70		display: grid;
 71		grid-template-columns:
 72			[page-start] minmax(1em, 1fr) [content] minmax(240px, 100ch) [page-end] minmax(1em, 1fr);
 73	}
 74
 75	body > main {
 76		grid-template-rows: [top-gutter] 1em [content] 1fr [bottom-gutter] 1em;
 77	}
 78
 79	body > footer {
 80		grid-template-rows: [top-gutter] 2em [content] 1fr [bottom-gutter] 0.5em;
 81	}
 82
 83	body > header {
 84		grid-template-rows: [top-gutter] 0.5em [content] 1fr [bottom-gutter] 0.5em;
 85	}
 86
 87	header .wrapper,
 88	main .wrapper,
 89	footer .wrapper {
 90		grid-row: content;
 91		grid-column: content;
 92	}
 93}
 94
 95/* End grid layout */
 96
 97h3 {
 98	margin-block: 1rem 0.5rem;
 99}
100
101h2,
102p {
103	margin-block-start: 0;
104	margin-block-end: 1rem;
105}
106
107.two_column {
108	display: flex;
109	gap: 20px;
110	flex-direction: row;
111}
112
113.two_column > * > * {
114	margin: 20px 0;
115}
116
117.projects, .release_notes {
118	flex: 1 1 50%;
119}
120
121.release_note.card:not(:target) { display: none;  }
122.release_note.card:target       { display: block; }
123
124.return_to_project {
125	display: none;
126}
127
128.card {
129	position: relative;
130	border: 2px solid var(--card-border);
131	background: var(--card-background);
132	border-radius: 5px;
133	margin: 20px 0;
134	padding: 20px 20px 0 20px;
135	box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19);
136}
137
138.card > h3 {
139	margin-top: 0;
140}
141
142.card > p:first-of-type {
143	margin-bottom: 16px;
144}
145
146.card > p:last-of-type {
147	margin-bottom: 16px;
148}
149
150.delete {
151    float: right;
152    font-size: 12px;
153}
154
155.close {
156    position: absolute;
157    top: 2px;
158    right: 3px;
159}
160
161.close > a {
162    font-size: 1em;
163    text-decoration: none;
164    color: var(--card-border);
165}
166
167@media (prefers-color-scheme: dark) {
168	.close > a {
169		color: var(--text);
170	}
171}
172
173.card > pre, .card > div > pre { overflow: scroll; }
174
175header .wrapper {
176	display: flex;
177	flex-wrap: wrap;
178	justify-content: space-between;
179	align-content: center;
180}
181
182header h1 {
183	margin-block: 1.2rem;
184}
185
186header h1 a {
187	text-decoration: none;
188}
189
190/* On the home dashboard pretend 'Willow' is not a link
191   Relies on the dashboard page being the only one with
192   a div.projects */
193body:has(div.projects) header h1 a {
194	cursor: default;
195}
196
197header nav {
198	display: flex;
199	justify-content: flex-end;
200	align-content: baseline;
201	flex: 1 1 auto;
202	margin-block: 1.2rem;
203}
204
205header nav a,
206header nav a:visited {
207	display: block;
208	text-decoration: underline;
209	color: var(--text);
210	font-size: 1.2rem;
211	font-weight: bold;
212	line-height: 1;
213	border-radius: 0.5rem;
214	padding: 0.6rem 0.5rem 0.4rem;
215}
216
217header nav a + a {
218	margin-inline-start: 1rem;
219}
220
221header nav a:last-of-type {
222	padding-inline-end: 0;
223}
224
225header nav a[href="/new"],
226header nav a[href="/new"]:visited {
227	text-decoration: none;
228	color: var(--action);
229	border-color: var(--action);
230	background-color: transparent;
231	border: 1px solid var(--action);
232}
233
234
235footer .wrapper {
236	display: flex;
237	flex-wrap: wrap;
238	justify-content: space-between;
239	align-content: center;
240}
241
242@media only screen and (max-width: 1000px) {
243	div[id] {
244		display: block;
245	}
246
247	.two_column {
248		flex-direction: column;
249	}
250
251	.projects, .release_notes {
252		overflow: visible;
253		flex: 1 1 100%;
254	}
255
256	.return_to_project {
257		display: block;
258	}
259
260	.close {
261		display: none;
262	}
263}
264
265
266/* Forms */
267form {
268	width: 100%;
269	max-width: 50ch;
270	margin: 0 auto;
271	display: flex;
272	flex-direction: column;
273}
274
275form label {
276	font-weight: bold;
277	padding-block-end: 0.2rem;
278}
279
280fieldset {
281	position: relative;
282	border: 0 none;
283	background-color: var(--card-background);
284	margin-inline: -1px; /* Line up with input boxes */
285	margin-block-start: 1rem;
286	padding-inline: 1rem;
287}
288
289fieldset legend {
290	position: absolute;
291	top: -1.5rem;
292	left: 0;
293	margin-inline: 1px;
294	padding: 0;
295	font-weight: bold;
296}
297
298fieldset h4 {
299	margin-inline-start: 0.25rem;
300	margin-block: 0.5rem;
301}
302
303.input {
304	display: flex;
305	flex-direction: column;
306	margin-block-end: 1rem;
307}
308
309.input-wrapper label {
310	padding-inline-start: 0.5rem;
311}
312
313.select-release .input {
314  display: block;
315}
316
317.button {
318	line-height: 1;
319	padding: 0.6rem 0.5rem 0.4rem;
320	font-weight: bold;
321	font-size: 1.2rem;
322	color: var(--action);
323	background-color: var(--page-background);
324	border: 1px solid var(--action);
325	border-radius: 0.5rem;
326	cursor: pointer;
327}
328
329form.login .button {
330	margin-block-start: 0.75rem;
331}
332
333/* End Forms */
334
335@media (prefers-reduced-motion) {
336  *, *::before, *::after {
337    animation-duration: 0s !important;
338    transition: none !important;
339    scroll-behavior: auto !important;
340  }
341}