diff options
Diffstat (limited to 'sass')
| -rw-r--r-- | sass/_archive.scss | 90 | ||||
| -rw-r--r-- | sass/_article.scss | 159 | ||||
| -rw-r--r-- | sass/_base.scss | 47 | ||||
| -rw-r--r-- | sass/_code.scss | 38 | ||||
| -rw-r--r-- | sass/_footer.scss | 29 | ||||
| -rw-r--r-- | sass/_header.scss | 77 | ||||
| -rw-r--r-- | sass/_layout.scss | 106 | ||||
| -rw-r--r-- | sass/_reset.scss | 41 | ||||
| -rw-r--r-- | sass/_software.scss | 70 | ||||
| -rw-r--r-- | sass/_taxonomy.scss | 19 | ||||
| -rw-r--r-- | sass/_theme.scss | 16 | ||||
| -rw-r--r-- | sass/_tokens.scss | 42 | ||||
| -rw-r--r-- | sass/_typography.scss | 42 | ||||
| -rw-r--r-- | sass/_utilities.scss | 25 | ||||
| -rw-r--r-- | sass/main.scss | 14 |
15 files changed, 815 insertions, 0 deletions
diff --git a/sass/_archive.scss b/sass/_archive.scss new file mode 100644 index 0000000..32318f5 --- /dev/null +++ b/sass/_archive.scss @@ -0,0 +1,90 @@ +.compact-list, +.archive, +.software-list-full { + border-top: var(--rule); +} + +.note-list-item { + display: grid; + grid-template-columns: 8rem minmax(0, 1fr); + gap: 1.5rem; + padding-block: 1.25rem; + border-bottom: var(--rule); +} + +.note-list-item time { + color: var(--color-muted); + font-size: 0.8rem; +} + +.note-list-item h3 { + margin-bottom: 0.25rem; +} + +.note-list-item h3 a, +.software-list-item h3 a { + color: var(--color-text); +} + +.note-list-item p, +.software-list-item p { + color: var(--color-muted); + font-size: 0.95rem; +} + +.tag-list { + display: flex; + flex-wrap: wrap; + gap: 0.3rem 0.8rem; + margin-top: 0.45rem; + list-style: none; + font-size: 0.75rem; +} + +.tag-list a { + color: var(--color-muted); +} + +.archive-year { + display: grid; + grid-template-columns: 7rem minmax(0, 1fr); + gap: 2rem; + padding-block: 2rem; + border-bottom: var(--rule); +} + +.archive-year > h2 { + font-family: var(--font-mono); + font-size: 1rem; + font-weight: 500; +} + +.archive-year .note-list-item:first-child { + padding-top: 0; +} + +.archive-year .note-list-item:last-child { + padding-bottom: 0; + border-bottom: 0; +} + +.empty-state { + padding-block: 2rem; + border-block: var(--rule); + color: var(--color-muted); +} + +@media (max-width: 40rem) { + .archive-year, + .note-list-item { + grid-template-columns: 1fr; + } + + .archive-year { + gap: 1rem; + } + + .note-list-item { + gap: 0.25rem; + } +} diff --git a/sass/_article.scss b/sass/_article.scss new file mode 100644 index 0000000..91a0ac4 --- /dev/null +++ b/sass/_article.scss @@ -0,0 +1,159 @@ +.article-header { + margin-bottom: 2.5rem; +} + +.article-header h1 { + margin-block: 0.7rem 1.25rem; +} + +.article-dates { + display: flex; + flex-wrap: wrap; + gap: 0.5rem 1.5rem; + margin-bottom: 1.5rem; + color: var(--color-muted); + font-size: 0.78rem; +} + +.article-dates div { + display: flex; + gap: 0.65rem; +} + +.toc { + margin-bottom: 3.5rem; + padding: 1.25rem 1.5rem; + border-block: var(--rule); + background: var(--color-surface); +} + +.toc h2 { + margin-bottom: 0.6rem; + font-size: 0.95rem; +} + +.toc ul { + padding-left: 1.2rem; +} + +.toc > ul { + padding-left: 0; + list-style: none; +} + +.toc li + li { + margin-top: 0.25rem; +} + +.toc a { + font-size: 0.9rem; +} + +.prose { + font-size: 1.03rem; +} + +.prose > * + * { + margin-top: 1.45em; +} + +.prose h2, +.prose h3 { + scroll-margin-top: 2rem; +} + +.prose h2 { + margin-top: 3.2em; + padding-top: 0.8em; + border-top: var(--rule); +} + +.prose h3 { + margin-top: 2.3em; +} + +.prose .zola-anchor { + color: inherit; + text-decoration: none; +} + +.prose ul, +.prose ol { + padding-left: 1.5rem; +} + +.prose li + li { + margin-top: 0.35rem; +} + +.prose blockquote { + padding-left: 1.25rem; + border-left: 3px solid var(--color-border); + color: var(--color-muted); +} + +.prose table { + display: block; + width: max-content; + max-width: 100%; + overflow-x: auto; + border-collapse: collapse; +} + +.prose th, +.prose td { + padding: 0.5rem 0.75rem; + border: var(--rule); + text-align: left; +} + +.prose figure, +.prose img { + margin-inline: auto; +} + +.prose img { + height: auto; + border: var(--rule); +} + +.footnote-definition, +[role="doc-endnotes"] { + color: var(--color-muted); + font-size: 0.9rem; +} + +.footnote-definition { + display: grid; + grid-template-columns: auto 1fr; + gap: 0.5rem; +} + +.footnote-definition p { + margin: 0; +} + +.related-content { + margin-top: 4rem; + padding-top: 1.5rem; + border-top: var(--rule); +} + +.related-content h2 { + margin-bottom: 1rem; + font-size: 1.1rem; +} + +.related-content ul { + list-style: none; +} + +.related-content li + li { + margin-top: 0.75rem; +} + +.related-content span { + display: block; + color: var(--color-muted); + font-size: 0.9rem; +} diff --git a/sass/_base.scss b/sass/_base.scss new file mode 100644 index 0000000..d460c41 --- /dev/null +++ b/sass/_base.scss @@ -0,0 +1,47 @@ +body { + min-height: 100vh; + overflow-x: hidden; + overflow-wrap: anywhere; + background: var(--color-bg); + color: var(--color-text); + font-family: var(--font-sans); + font-size: 1rem; + line-height: 1.75; + text-rendering: optimizeLegibility; +} + +main, +article, +section, +div { + min-width: 0; +} + +a { + color: var(--color-link); + text-decoration-line: underline; + text-decoration-thickness: 0.075em; + text-underline-offset: 0.18em; +} + +a:hover { + color: var(--color-link-hover); +} + +:focus-visible { + outline: 3px solid var(--color-focus); + outline-offset: 3px; +} + +::selection { + background: var(--color-link); + color: var(--color-bg); +} + +.external-link::after { + display: inline-block; + margin-left: 0.2em; + content: "↗"; + font-size: 0.78em; + text-decoration: none; +} diff --git a/sass/_code.scss b/sass/_code.scss new file mode 100644 index 0000000..bc83892 --- /dev/null +++ b/sass/_code.scss @@ -0,0 +1,38 @@ +code, +pre { + font-family: var(--font-mono); +} + +.prose code:not(pre code) { + padding: 0.1em 0.3em; + border: var(--rule); + background: var(--color-surface); + font-size: 0.88em; +} + +.prose pre { + width: 100%; + max-width: 100%; + overflow-x: auto; + padding: 1rem 1.15rem; + border: var(--rule); + background: var(--color-surface); + font-size: 0.88rem; + line-height: 1.65; +} + +.giallo-l { + display: inline-block; + min-height: 1lh; + width: 100%; +} + +.giallo-ln { + display: inline-block; + min-width: 3ch; + margin-right: 0.4em; + padding: 0.4em; + opacity: 0.8; + text-align: right; + user-select: none; +} diff --git a/sass/_footer.scss b/sass/_footer.scss new file mode 100644 index 0000000..2d5c475 --- /dev/null +++ b/sass/_footer.scss @@ -0,0 +1,29 @@ +.site-footer { + margin-top: 4rem; + border-top: var(--rule); + color: var(--color-muted); + font-size: 0.85rem; +} + +.footer-inner { + display: flex; + align-items: center; + justify-content: space-between; + gap: 1.5rem; + min-height: 5rem; +} + +.footer-inner nav { + display: flex; + gap: 1rem; +} + +@media (max-width: 32rem) { + .footer-inner { + align-items: flex-start; + flex-direction: column; + justify-content: center; + gap: 0.3rem; + padding-block: 1rem; + } +} diff --git a/sass/_header.scss b/sass/_header.scss new file mode 100644 index 0000000..8512a55 --- /dev/null +++ b/sass/_header.scss @@ -0,0 +1,77 @@ +.site-header { + border-bottom: var(--rule); +} + +.header-inner { + display: flex; + align-items: center; + gap: 1.5rem; + min-height: 3.8rem; +} + +.site-title { + margin-right: auto; + color: var(--color-text); + font-weight: 700; + text-decoration: none; +} + +.nav-list { + display: flex; + gap: 1.2rem; + list-style: none; +} + +.nav-list a { + color: var(--color-muted); + font-size: 0.9rem; + text-decoration: none; +} + +.nav-list a:hover, +.nav-list a[aria-current="page"] { + color: var(--color-text); + text-decoration: underline; + text-underline-offset: 0.3em; +} + +.theme-toggle { + display: none; + padding: 0.2rem 0; + border: 0; + border-bottom: 1px solid currentColor; + background: transparent; + color: var(--color-muted); + cursor: pointer; + font-size: 0.75rem; +} + +.theme-ready .theme-toggle { + display: block; +} + +@media (max-width: 42rem) { + .header-inner { + flex-wrap: wrap; + gap: 0.55rem 1rem; + padding-block: 0.8rem; + } + + .site-title { + flex: 1 1 auto; + } + + .header-inner nav { + order: 3; + width: 100%; + } + + .nav-list { + flex-wrap: wrap; + gap: 0.4rem 1.25rem; + } + + .theme-toggle { + margin-left: auto; + } +} diff --git a/sass/_layout.scss b/sass/_layout.scss new file mode 100644 index 0000000..126fa96 --- /dev/null +++ b/sass/_layout.scss @@ -0,0 +1,106 @@ +.site-container { + width: min(calc(100% - 2rem), var(--site-max)); + max-width: calc(100% - 2rem); + margin-inline: auto; +} + +.site-main { + min-height: 65vh; +} + +.narrow, +.prose, +.related-content { + width: min(100%, var(--content-max)); + margin-inline: auto; +} + +.home-intro { + padding-block: clamp(4rem, 10vw, 7rem); + border-bottom: var(--rule); +} + +.home-intro h1 { + margin-bottom: 1rem; +} + +.home-intro p { + max-width: 38rem; +} + +.home-sections, +.listing-page, +.editorial-page, +.article-page { + padding-block: clamp(3.5rem, 8vw, 6rem); +} + +.home-sections { + display: grid; + gap: clamp(4rem, 9vw, 7rem); +} + +.section-heading { + display: flex; + align-items: baseline; + justify-content: space-between; + gap: 1rem; + margin-bottom: 1.1rem; + padding-bottom: 0.75rem; + border-bottom: var(--rule); +} + +.section-heading a { + white-space: nowrap; +} + +.home-about { + width: min(100%, var(--content-max)); + padding-top: 2rem; + border-top: var(--rule); +} + +.home-about h2, +.home-about p { + margin-bottom: 0.8rem; +} + +.page-header { + margin-bottom: clamp(2.5rem, 6vw, 4.5rem); +} + +.page-header h1 { + margin-bottom: 0.8rem; +} + +.editorial-page .page-header { + margin-bottom: 2.5rem; +} + +.error-page { + padding-block: clamp(5rem, 14vw, 10rem); +} + +.error-page .error-code { + margin-bottom: 1rem; + color: var(--color-muted); + font-size: 0.9rem; +} + +.error-page h1, +.error-page > p { + margin-bottom: 1rem; +} + +.error-page nav { + display: flex; + gap: 1.25rem; + margin-top: 2rem; +} + +@media (max-width: 38rem) { + .section-heading { + align-items: flex-start; + flex-direction: column; + } +} diff --git a/sass/_reset.scss b/sass/_reset.scss new file mode 100644 index 0000000..72924c4 --- /dev/null +++ b/sass/_reset.scss @@ -0,0 +1,41 @@ +*, +*::before, +*::after { + box-sizing: border-box; +} + +html { + overflow-x: hidden; +} + +body, +h1, +h2, +h3, +p, +ul, +ol, +dl, +dd, +figure, +blockquote { + margin: 0; +} + +ul, +ol { + padding: 0; +} + +img, +svg { + display: block; + max-width: 100%; +} + +button, +input, +textarea, +select { + font: inherit; +} diff --git a/sass/_software.scss b/sass/_software.scss new file mode 100644 index 0000000..4ad6e42 --- /dev/null +++ b/sass/_software.scss @@ -0,0 +1,70 @@ +.software-list-item { + padding-block: 1.3rem; + border-bottom: var(--rule); +} + +.software-list-item h3 { + margin-bottom: 0.25rem; + font-family: var(--font-mono); +} + +.software-list-full .software-list-item { + display: grid; + grid-template-columns: minmax(10rem, 0.6fr) minmax(0, 1.4fr); + gap: 2rem; +} + +.source-note { + margin-top: 1.5rem; + color: var(--color-muted); + font-size: 0.9rem; +} + +.software-meta { + display: grid; + grid-template-columns: repeat(2, minmax(0, 1fr)); + margin-bottom: 3.5rem; + border-block: var(--rule); +} + +.software-meta div { + display: grid; + grid-template-columns: 7rem minmax(0, 1fr); + gap: 1rem; + padding-block: 0.75rem; + border-bottom: var(--rule); +} + +.software-meta div:nth-last-child(-n + 2) { + border-bottom: 0; +} + +.software-meta dt { + color: var(--color-muted); + font-size: 0.85rem; +} + +.software-meta dd { + font-family: var(--font-mono); + font-size: 0.82rem; +} + +@media (max-width: 42rem) { + .software-list-full .software-list-item, + .software-meta { + grid-template-columns: 1fr; + } + + .software-list-full .software-list-item { + gap: 0.3rem; + } + + .software-meta div, + .software-meta div:nth-last-child(-n + 2) { + border-bottom: var(--rule); + } + + .software-meta div:last-child { + border-bottom: 0; + } +} diff --git a/sass/_taxonomy.scss b/sass/_taxonomy.scss new file mode 100644 index 0000000..9f635bb --- /dev/null +++ b/sass/_taxonomy.scss @@ -0,0 +1,19 @@ +.taxonomy-list { + border-top: var(--rule); + list-style: none; +} + +.taxonomy-list li { + display: flex; + align-items: baseline; + justify-content: space-between; + gap: 1rem; + padding-block: 0.85rem; + border-bottom: var(--rule); +} + +.taxonomy-list span { + color: var(--color-muted); + font-family: var(--font-mono); + font-size: 0.78rem; +} diff --git a/sass/_theme.scss b/sass/_theme.scss new file mode 100644 index 0000000..ad39b22 --- /dev/null +++ b/sass/_theme.scss @@ -0,0 +1,16 @@ +:root[data-theme="light"] body, +:root[data-theme="dark"] body { + background: var(--color-bg); + color: var(--color-text); +} + +@media (prefers-reduced-motion: reduce) { + *, + *::before, + *::after { + scroll-behavior: auto !important; + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + transition-duration: 0.01ms !important; + } +} diff --git a/sass/_tokens.scss b/sass/_tokens.scss new file mode 100644 index 0000000..a0ed8f3 --- /dev/null +++ b/sass/_tokens.scss @@ -0,0 +1,42 @@ +:root { + color-scheme: light; + --color-bg: #f6f5f1; + --color-surface: #fbfaf7; + --color-text: #202124; + --color-muted: #666b70; + --color-border: #d6d8da; + --color-link: #315f82; + --color-link-hover: #244a67; + --color-focus: #1e668f; + --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", sans-serif; + --font-mono: ui-monospace, "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace; + --content-max: 72ch; + --site-max: 72rem; + --rule: 1px solid var(--color-border); +} + +:root[data-theme="dark"] { + color-scheme: dark; + --color-bg: #17191b; + --color-surface: #1d2022; + --color-text: #e9e9e6; + --color-muted: #a0a3a6; + --color-border: #363a3e; + --color-link: #86b6d8; + --color-link-hover: #add3ed; + --color-focus: #86b6d8; +} + +@media (prefers-color-scheme: dark) { + :root:not([data-theme="light"]) { + color-scheme: dark; + --color-bg: #17191b; + --color-surface: #1d2022; + --color-text: #e9e9e6; + --color-muted: #a0a3a6; + --color-border: #363a3e; + --color-link: #86b6d8; + --color-link-hover: #add3ed; + --color-focus: #86b6d8; + } +} diff --git a/sass/_typography.scss b/sass/_typography.scss new file mode 100644 index 0000000..4b11814 --- /dev/null +++ b/sass/_typography.scss @@ -0,0 +1,42 @@ +h1, +h2, +h3 { + overflow-wrap: anywhere; + color: var(--color-text); + font-weight: 650; + line-height: 1.3; + letter-spacing: -0.02em; +} + +h1 { + font-size: clamp(2rem, 5vw, 3.25rem); +} + +h2 { + font-size: clamp(1.35rem, 3vw, 1.7rem); +} + +h3 { + font-size: 1.08rem; +} + +time, +.article-kind, +.article-dates, +.theme-toggle, +.tag-list, +.error-code { + font-family: var(--font-mono); +} + +.article-kind { + font-size: 0.8rem; + letter-spacing: 0.06em; +} + +.article-description, +.page-header > p, +.home-intro > p { + color: var(--color-muted); + font-size: 1.08rem; +} diff --git a/sass/_utilities.scss b/sass/_utilities.scss new file mode 100644 index 0000000..0f9beef --- /dev/null +++ b/sass/_utilities.scss @@ -0,0 +1,25 @@ +.skip-link { + position: fixed; + z-index: 10; + top: 0.5rem; + left: 0.5rem; + padding: 0.45rem 0.7rem; + transform: translateY(-160%); + background: var(--color-text); + color: var(--color-bg); + font-weight: 700; +} + +.skip-link:focus { + transform: translateY(0); +} + +.visually-hidden { + position: absolute; + width: 1px; + height: 1px; + overflow: hidden; + clip: rect(0 0 0 0); + white-space: nowrap; + clip-path: inset(50%); +} diff --git a/sass/main.scss b/sass/main.scss new file mode 100644 index 0000000..7735763 --- /dev/null +++ b/sass/main.scss @@ -0,0 +1,14 @@ +@import "tokens"; +@import "reset"; +@import "base"; +@import "typography"; +@import "layout"; +@import "header"; +@import "footer"; +@import "archive"; +@import "article"; +@import "software"; +@import "taxonomy"; +@import "code"; +@import "theme"; +@import "utilities"; |
