krz/orgo
Lightning fast org-mode static site generator.
clone: git clone https://gitbay.org/krz/orgo.git
1/* Documentation site styling.
2 *
3 * A plain asset, copied through the build untouched — which is also how any other CSS,
4 * image or font in a source directory reaches the output. */
5
6:root {
7 --ink: #1c1f24;
8 --muted: #5b6472;
9 --rule: #dfe3e8;
10 --accent: #0b5fa5;
11 --surface: #f6f8fa;
12 --measure: 42rem;
13}
14
15@media (prefers-color-scheme: dark) {
16 :root {
17 --ink: #dee3ea;
18 --muted: #9aa4b2;
19 --rule: #2b3138;
20 --accent: #79b8ff;
21 --surface: #171a1f;
22 }
23 body { background: #0f1216; }
24}
25
26* { box-sizing: border-box; }
27
28body {
29 margin: 0;
30 color: var(--ink);
31 font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
32}
33
34header.site {
35 border-bottom: 1px solid var(--rule);
36 padding: 1rem 1.5rem;
37 display: flex;
38 flex-wrap: wrap;
39 gap: 1rem 1.5rem;
40 align-items: baseline;
41}
42
43header.site .site-title {
44 font-weight: 700;
45 font-size: 1.05rem;
46 color: var(--ink);
47 text-decoration: none;
48}
49
50header.site nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
51header.site nav a { color: var(--muted); text-decoration: none; }
52header.site nav a:hover { color: var(--accent); }
53
54main {
55 max-width: var(--measure);
56 margin: 0 auto;
57 padding: 2.5rem 1.5rem 5rem;
58}
59
60h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -0.02em; }
61h2 { font-size: 1.35rem; margin: 2.5rem 0 .75rem; letter-spacing: -0.01em; }
62h3 { font-size: 1.1rem; margin: 2rem 0 .5rem; }
63
64p.page-date, p.lede { color: var(--muted); }
65p.lede { font-size: 1.1rem; margin-top: 0; }
66
67a { color: var(--accent); }
68
69code {
70 font: 0.875em/1.5 ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
71 background: var(--surface);
72 padding: .1em .35em;
73 border-radius: 3px;
74}
75
76/* Code blocks are dark in both colour schemes, matching the syntect theme named in
77 orgo.toml. One generated stylesheet cannot follow prefers-color-scheme, so the page
78 commits to the theme's palette instead of leaving highlighted code unreadable in one
79 of the two. */
80pre {
81 background: #2b303b;
82 color: #c0c5ce;
83 border: 1px solid #1f232b;
84 border-radius: 6px;
85 padding: .9rem 1rem;
86 overflow-x: auto;
87}
88
89pre code { background: none; padding: 0; }
90
91blockquote {
92 margin: 1.5rem 0;
93 padding: .25rem 0 .25rem 1rem;
94 border-left: 3px solid var(--rule);
95 color: var(--muted);
96}
97
98table { border-collapse: collapse; width: 100%; margin: 1.25rem 0; display: block; overflow-x: auto; }
99th, td { text-align: left; padding: .5rem .75rem; border-bottom: 1px solid var(--rule); }
100th { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
101
102hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
103
104/* Table of contents, emitted from page.toc */
105nav.toc {
106 background: var(--surface);
107 border: 1px solid var(--rule);
108 border-radius: 6px;
109 padding: .75rem 1.25rem 1rem;
110 margin: 1.5rem 0 2.5rem;
111}
112nav.toc h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; margin: .25rem 0 .5rem; color: var(--muted); }
113nav.toc ul { margin: 0; padding-left: 1.1rem; }
114nav.toc li { margin: .15rem 0; }
115
116ul.post-list { list-style: none; padding: 0; }
117ul.post-list > li { padding: 1rem 0; border-bottom: 1px solid var(--rule); }
118ul.post-list a { font-weight: 600; font-size: 1.05rem; }
119p.excerpt { margin: .35rem 0 .2rem; color: var(--muted); }
120span.reading-time { font-size: .85rem; color: var(--muted); }
121
122footer.site {
123 border-top: 1px solid var(--rule);
124 padding: 1.5rem;
125 color: var(--muted);
126 font-size: .9rem;
127 text-align: center;
128}
129
130.tag { font-size: .75rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 999px; padding: .1em .6em; color: var(--muted); }