refactor: split the site generator into templates and content, add news
- templates/ holds the page chrome (base, header, footer, badges, leads) - content/<lang>/ holds pages as HTML fragments with front matter and the chrome strings - content/site.toml holds shared values (contact, Bitcoin address, manifesto version) - static/style.css replaces the CSS embedded in the script - add news: Markdown posts in content/<lang>/news/, index page, latest posts on the home page - add [text](url) links and `code` to the Markdown renderer - copy favicons from logo/web so a fresh clone builds the whole site - build.py now uses the standard library only and fails on unknown placeholders
This commit is contained in:
parent
a93adca996
commit
c8b7b6a571
1 changed files with 931 additions and 487 deletions
129
static/style.css
Normal file
129
static/style.css
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
@font-face {
|
||||
font-family: "Terminess";
|
||||
src: url("/fonts/terminess.woff2") format("woff2");
|
||||
font-display: swap;
|
||||
}
|
||||
|
||||
:root {
|
||||
--bg: #F9F7ED;
|
||||
--surface: #F1EDE0;
|
||||
--border: #D9D3C2;
|
||||
--text: #111417;
|
||||
--muted: #5b564a;
|
||||
--accent: #D9480F;
|
||||
--link: #b13a0b;
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--bg: #111417;
|
||||
--surface: #1b1f23;
|
||||
--border: #5b564a;
|
||||
--text: #F9F7ED;
|
||||
--muted: #8a8473;
|
||||
--link: #f0683a;
|
||||
}
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0 auto;
|
||||
max-width: 40em;
|
||||
padding: 1em;
|
||||
background-color: var(--bg);
|
||||
color: var(--text);
|
||||
font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
margin: 2em 0 .5em;
|
||||
font-family: "Terminess", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
|
||||
font-weight: normal;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--link);
|
||||
}
|
||||
|
||||
a:visited {
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
a:hover, header a[aria-current] {
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
a:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
header {
|
||||
border-bottom: 1px solid var(--border);
|
||||
line-height: 2;
|
||||
}
|
||||
|
||||
header a[aria-current] {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
footer {
|
||||
margin-top: 3em;
|
||||
border-top: 1px solid var(--border);
|
||||
color: var(--muted);
|
||||
font-size: .875em;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
margin: 1.5em 0;
|
||||
padding: 0 1em;
|
||||
border-left: 4px solid var(--accent);
|
||||
}
|
||||
|
||||
code {
|
||||
background-color: var(--surface);
|
||||
color: var(--text);
|
||||
font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
|
||||
font-size: .9375em;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
|
||||
.hero {
|
||||
margin: .5em 0 .4em;
|
||||
font-size: 3em;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
@media (max-width: 30em) {
|
||||
.hero {
|
||||
font-size: 2em;
|
||||
}
|
||||
}
|
||||
|
||||
.logo {
|
||||
width: 7em;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
@media print {
|
||||
:root {
|
||||
--bg: #fff;
|
||||
--border: #000;
|
||||
--text: #000;
|
||||
--muted: #000;
|
||||
--link: #000;
|
||||
}
|
||||
|
||||
header, .badges {
|
||||
display: none;
|
||||
}
|
||||
|
||||
a[href^="http"]::after {
|
||||
content: " <" attr(href) ">";
|
||||
}
|
||||
|
||||
h1, h2, h3 {
|
||||
page-break-after: avoid;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue