krz/orgo

Lightning fast org-mode static site generator.

clone: git clone https://gitbay.org/krz/orgo.git

v0.22.0: themes/docs.css · raw

  1/* orgo built-in theme: docs
  2 *
  3 * A documentation site: a guide read in order, with a contents block that matters, code
  4 * blocks that carry as much of the meaning as the prose, and a `#+LEDE:` line under the
  5 * title. Cooler and more technical than `blog`, narrower and more designed than `wiki`.
  6 *
  7 * Every colour is a custom property on :root, so a stylesheet of your own loaded after
  8 * this one can retheme the site by redefining a handful of values. */
  9
 10:root {
 11  --orgo-ink: #1c1f24;
 12  --orgo-muted: #5b6472;
 13  --orgo-rule: #dfe3e8;
 14  --orgo-accent: #0b5fa5;
 15  --orgo-surface: #f6f8fa;
 16  --orgo-bg: #ffffff;
 17  --orgo-measure: 42rem;
 18  --orgo-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
 19  --orgo-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
 20  /* These three colour code *blocks* only; inline code follows the page. A block keeps
 21     a light surface in both colour schemes, because syntax.css is coloured by
 22     `highlight.theme` and that default (InspiredGitHub) is light. To let blocks follow
 23     prefers-color-scheme, set `highlight.theme_dark` to a dark theme and override these
 24     three in a dark query of your own. */
 25  --orgo-todo: #b02a37;
 26  --orgo-done: #2c7a4b;
 27  --orgo-code-bg: #f6f8fa;
 28  --orgo-code-fg: #323232;
 29  --orgo-code-rule: #e3e7ec;
 30}
 31
 32@media (prefers-color-scheme: dark) {
 33  :root {
 34    --orgo-ink: #dee3ea;
 35    --orgo-muted: #9aa4b2;
 36    --orgo-rule: #2b3138;
 37    --orgo-accent: #79b8ff;
 38    --orgo-surface: #171a1f;
 39    --orgo-todo: #f0909a;
 40    --orgo-done: #74c795;
 41    --orgo-bg: #0f1216;
 42  }
 43}
 44
 45* { box-sizing: border-box; }
 46
 47body {
 48  margin: 0;
 49  background: var(--orgo-bg);
 50  color: var(--orgo-ink);
 51  font: 16px/1.65 var(--orgo-font);
 52  /* A bare URL or a long identifier must wrap, not widen the page on a phone. */
 53  overflow-wrap: break-word;
 54}
 55
 56/* Header ------------------------------------------------------------------- */
 57
 58body > header {
 59  position: sticky;
 60  top: 0;
 61  z-index: 1;
 62  background: var(--orgo-bg);
 63  border-bottom: 1px solid var(--orgo-rule);
 64  padding: 1rem 1.5rem;
 65  display: flex;
 66  flex-wrap: wrap;
 67  gap: .5rem 1.5rem;
 68  align-items: baseline;
 69}
 70
 71.site-title {
 72  font-weight: 700;
 73  font-size: 1.05rem;
 74  color: var(--orgo-ink);
 75  text-decoration: none;
 76}
 77
 78body > header nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
 79body > header nav a {
 80  color: var(--orgo-muted);
 81  text-decoration: none;
 82  padding-bottom: .15rem;
 83  border-bottom: 2px solid transparent;
 84}
 85body > header nav a:hover { color: var(--orgo-ink); border-bottom-color: var(--orgo-accent); }
 86
 87/* Page body ---------------------------------------------------------------- */
 88
 89main {
 90  max-width: var(--orgo-measure);
 91  margin: 0 auto;
 92  padding: 2.5rem 1.5rem 5rem;
 93}
 94
 95h1 { font-size: 2rem; line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 .5rem; }
 96h2 { font-size: 1.35rem; letter-spacing: -0.01em; margin: 2.75rem 0 .75rem; }
 97h3 { font-size: 1.1rem; margin: 2rem 0 .5rem; }
 98h4, h5, h6 { font-size: 1rem; margin: 1.5rem 0 .5rem; }
 99
100[class^="section-number-"] { color: var(--orgo-muted); font-weight: 400; }
101
102a { color: var(--orgo-accent); }
103
104/* `#+LEDE:` reaches the layout as page.keywords.lede; page.date as the byline. */
105p.lede { font-size: 1.1rem; color: var(--orgo-muted); margin-top: 0; }
106p.page-date { color: var(--orgo-muted); font-size: .9rem; }
107
108img, video { max-width: 100%; height: auto; }
109
110figure { margin: 1.75rem 0; }
111figcaption { color: var(--orgo-muted); font-size: .9rem; margin-top: .4rem; }
112.figure-number, .table-number { font-weight: 600; }
113
114/* A quote block reads as a note or a caution in a documentation site. */
115blockquote {
116  margin: 1.5rem 0;
117  padding: .75rem 1rem;
118  background: var(--orgo-surface);
119  border-left: 3px solid var(--orgo-accent);
120  border-radius: 0 4px 4px 0;
121  color: var(--orgo-muted);
122}
123blockquote > :first-child { margin-top: 0; }
124blockquote > :last-child { margin-bottom: 0; }
125
126hr { border: 0; border-top: 1px solid var(--orgo-rule); margin: 2.5rem 0; }
127
128.center { text-align: center; }
129.verse { font-family: var(--orgo-mono); white-space: pre-wrap; }
130
131dt { font-weight: 600; margin-top: .75rem; font-family: var(--orgo-mono); font-size: .95rem; }
132dd { margin: 0 0 0 1.5rem; }
133
134/* Code --------------------------------------------------------------------- */
135
136/* Inline code is prose furniture, so it follows the page rather than the code blocks. */
137code {
138  font: .875em/1.5 var(--orgo-mono);
139  background: var(--orgo-surface);
140  color: inherit;
141  padding: .1em .35em;
142  border-radius: 3px;
143}
144
145pre {
146  background: var(--orgo-code-bg);
147  color: var(--orgo-code-fg);
148  border: 1px solid var(--orgo-code-rule);
149  border-radius: 6px;
150  padding: .9rem 1.1rem;
151  font-size: .9rem;
152  line-height: 1.55;
153  overflow-x: auto;
154}
155
156pre code { background: none; color: inherit; padding: 0; }
157
158/* Tables ------------------------------------------------------------------- */
159
160table {
161  border-collapse: collapse;
162  width: 100%;
163  margin: 1.5rem 0;
164  display: block;
165  overflow-x: auto;
166}
167caption { text-align: left; color: var(--orgo-muted); font-size: .9rem; padding-bottom: .4rem; }
168th, td { text-align: left; padding: .5rem .75rem; border-bottom: 1px solid var(--orgo-rule); }
169th {
170  font-size: .8rem;
171  text-transform: uppercase;
172  letter-spacing: .05em;
173  color: var(--orgo-muted);
174}
175
176/* Org-specific markup ------------------------------------------------------ */
177
178.tag {
179  font: .72rem/1.6 var(--orgo-mono);
180  color: var(--orgo-muted);
181  background: var(--orgo-surface);
182  border: 1px solid var(--orgo-rule);
183  border-radius: 999px;
184  padding: .05em .6em;
185  vertical-align: middle;
186}
187
188.todo, .done { font: .72rem/1.6 var(--orgo-mono); letter-spacing: .04em; }
189.todo { color: var(--orgo-todo); }
190.done { color: var(--orgo-done); }
191.priority { color: var(--orgo-muted); font-family: var(--orgo-mono); font-size: .8em; }
192
193time.timestamp { color: var(--orgo-muted); font-family: var(--orgo-mono); font-size: .9em; }
194
195li.on, li.trans { color: var(--orgo-muted); }
196li.on { text-decoration: line-through; }
197
198.footnotes { margin-top: 3rem; font-size: .9rem; color: var(--orgo-muted); }
199.footnote-ref a { text-decoration: none; }
200
201/* Table of contents: a card, because in a guide it is navigation ----------- */
202
203nav.toc {
204  background: var(--orgo-surface);
205  border: 1px solid var(--orgo-rule);
206  border-radius: 6px;
207  padding: .75rem 1.25rem 1rem;
208  margin: 1.75rem 0 2.5rem;
209}
210nav.toc h2 {
211  font-size: .8rem;
212  text-transform: uppercase;
213  letter-spacing: .06em;
214  color: var(--orgo-muted);
215  margin: .25rem 0 .5rem;
216}
217nav.toc ul { margin: 0; padding-left: 1.1rem; }
218nav.toc li { margin: .15rem 0; }
219
220/* Listing pages: a guide's contents page, a tag index ---------------------- */
221
222ul.post-list { list-style: none; padding: 0; }
223ul.post-list > li { padding: 1rem 0; border-bottom: 1px solid var(--orgo-rule); }
224ul.post-list a { font-weight: 600; font-size: 1.05rem; }
225ul.post-list time { color: var(--orgo-muted); font-size: .9rem; }
226p.excerpt { margin: .35rem 0 .2rem; color: var(--orgo-muted); }
227span.reading-time { font-size: .85rem; color: var(--orgo-muted); }
228
229ul.tag-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem 1.25rem; }
230
231nav.pagination {
232  display: flex;
233  gap: 1rem;
234  align-items: baseline;
235  margin-top: 2.5rem;
236  color: var(--orgo-muted);
237  font-size: .9rem;
238}
239
240/* Footer ------------------------------------------------------------------- */
241
242body > footer {
243  border-top: 1px solid var(--orgo-rule);
244  padding: 1.5rem;
245  color: var(--orgo-muted);
246  font-size: .9rem;
247  text-align: center;
248}