Skip to content

Commit 5c9bac2

Browse files
committed
typography styles, renamed layout/posts to layout/notes for consistency
1 parent 586af34 commit 5c9bac2

759 files changed

Lines changed: 1002 additions & 789 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eleventy.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@ const markdownIt = require("markdown-it");
55
const markdownItAnchor = require("markdown-it-anchor");
66

77
const pluginRss = require("@11ty/eleventy-plugin-rss");
8-
// const pluginSyntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
8+
const pluginSyntaxHighlight = require("@11ty/eleventy-plugin-syntaxhighlight");
99
const pluginNavigation = require("@11ty/eleventy-navigation");
1010

1111
module.exports = function (eleventyConfig) {
1212
eleventyConfig.addPassthroughCopy("images");
1313
eleventyConfig.addPassthroughCopy("css");
1414
eleventyConfig.addPassthroughCopy("fonts");
1515

16-
// Add plugins
1716
eleventyConfig.addPlugin(pluginRss);
18-
// eleventyConfig.addPlugin(pluginSyntaxHighlight);
17+
eleventyConfig.addPlugin(pluginSyntaxHighlight);
1918
eleventyConfig.addPlugin(pluginNavigation);
2019

2120
eleventyConfig.addFilter("readableDate", (dateObj) => {

_includes/layouts/base.njk

Lines changed: 215 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,32 @@
1010
{# <link rel="stylesheet" href="{{ '/css/index.css' | url }}"> #}
1111
<style>
1212
:root {
13-
--color-gray: #777;
13+
--color-gray: #888;
14+
--space-5: 96px;
15+
--space-4: 48px;
1416
--space-3: 24px;
1517
--space-2: 16px;
1618
--space-1: 8px;
19+
--font-size-small: 14px;
1720
}
1821
1922
img, iframe {
2023
max-width: 100%;
2124
}
2225
2326
{# Dangit, Safari. This was so close to being cool. #}
24-
{# html {
25-
color-scheme: light dark;
26-
} #}
27+
html {
28+
margin: 0;
29+
padding: 0;
30+
}
2731
2832
*, *:after, *:before {
2933
box-sizing: border-box;
3034
}
3135
3236
body {
33-
padding: 0;
37+
padding: 0 0 var(--space-5) 0;
38+
margin: 0;
3439
font: clamp(1rem, 3vw, 1.2rem)/1.4 system-ui, sans-serif;
3540
width: min(95%, 50ch);
3641
margin-inline: auto;
@@ -41,6 +46,12 @@
4146
line-height: 1.2;
4247
}
4348
49+
blockquote {
50+
margin-left: 0;
51+
padding-left: var(--space-2);
52+
border-left: 1px solid var(--color-gray);
53+
}
54+
4455
pre code {
4556
white-space: pre-wrap;
4657
}
@@ -82,6 +93,205 @@
8293
color: var(--color-gray);
8394
}
8495
</style>
96+
{# Note styles #}
97+
<style>
98+
.note-header {
99+
margin-bottom: var(--space-3);
100+
}
101+
102+
.note-meta {
103+
font-size: var(--font-size-small);
104+
color: var(--color-gray);
105+
}
106+
107+
.note-title {
108+
margin-bottom: 0;
109+
}
110+
</style>
111+
112+
{# Code Styles #}
113+
<style>
114+
/*
115+
Name: Duotone Dark
116+
Author: Simurai, adapted from DuoTone themes for Atom (http://simurai.com/projects/2016/01/01/duotone-themes)
117+
Conversion: Bram de Haan (http://atelierbram.github.io/Base2Tone-prism/output/prism/prism-base2tone-evening-dark.css)
118+
Generated with Base16 Builder (https://github.com/base16-builder/base16-builder)
119+
*/
120+
121+
code[class*="language-"],
122+
pre[class*="language-"] {
123+
font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace;
124+
font-size: 14px;
125+
line-height: 1.375;
126+
direction: ltr;
127+
text-align: left;
128+
white-space: pre;
129+
word-spacing: normal;
130+
word-break: normal;
131+
132+
-moz-tab-size: 4;
133+
-o-tab-size: 4;
134+
tab-size: 4;
135+
136+
-webkit-hyphens: none;
137+
-moz-hyphens: none;
138+
-ms-hyphens: none;
139+
hyphens: none;
140+
background: #2a2734;
141+
color: #9a86fd;
142+
}
143+
144+
pre > code[class*="language-"] {
145+
font-size: 1em;
146+
}
147+
148+
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
149+
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
150+
text-shadow: none;
151+
background: #6a51e6;
152+
}
153+
154+
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
155+
code[class*="language-"]::selection, code[class*="language-"] ::selection {
156+
text-shadow: none;
157+
background: #6a51e6;
158+
}
159+
160+
/* Code blocks */
161+
pre[class*="language-"] {
162+
padding: 1em;
163+
margin: .5em 0;
164+
overflow: auto;
165+
}
166+
167+
/* Inline code */
168+
:not(pre) > code[class*="language-"] {
169+
padding: .1em;
170+
border-radius: .3em;
171+
}
172+
173+
.token.comment,
174+
.token.prolog,
175+
.token.doctype,
176+
.token.cdata {
177+
color: #6c6783;
178+
}
179+
180+
.token.punctuation {
181+
color: #6c6783;
182+
}
183+
184+
.token.namespace {
185+
opacity: .7;
186+
}
187+
188+
.token.tag,
189+
.token.operator,
190+
.token.number {
191+
color: #e09142;
192+
}
193+
194+
.token.property,
195+
.token.function {
196+
color: #9a86fd;
197+
}
198+
199+
.token.tag-id,
200+
.token.selector,
201+
.token.atrule-id {
202+
color: #eeebff;
203+
}
204+
205+
code.language-javascript,
206+
.token.attr-name {
207+
color: #c4b9fe;
208+
}
209+
210+
code.language-css,
211+
code.language-scss,
212+
.token.boolean,
213+
.token.string,
214+
.token.entity,
215+
.token.url,
216+
.language-css .token.string,
217+
.language-scss .token.string,
218+
.style .token.string,
219+
.token.attr-value,
220+
.token.keyword,
221+
.token.control,
222+
.token.directive,
223+
.token.unit,
224+
.token.statement,
225+
.token.regex,
226+
.token.atrule {
227+
color: #ffcc99;
228+
}
229+
230+
.token.placeholder,
231+
.token.variable {
232+
color: #ffcc99;
233+
}
234+
235+
.token.deleted {
236+
text-decoration: line-through;
237+
}
238+
239+
.token.inserted {
240+
border-bottom: 1px dotted #eeebff;
241+
text-decoration: none;
242+
}
243+
244+
.token.italic {
245+
font-style: italic;
246+
}
247+
248+
.token.important,
249+
.token.bold {
250+
font-weight: bold;
251+
}
252+
253+
.token.important {
254+
color: #c4b9fe;
255+
}
256+
257+
.token.entity {
258+
cursor: help;
259+
}
260+
261+
pre > code.highlight {
262+
outline: .4em solid #8a75f5;
263+
outline-offset: .4em;
264+
}
265+
266+
/* overrides color-values for the Line Numbers plugin
267+
* http://prismjs.com/plugins/line-numbers/
268+
*/
269+
.line-numbers.line-numbers .line-numbers-rows {
270+
border-right-color: #2c2937;
271+
}
272+
273+
.line-numbers .line-numbers-rows > span:before {
274+
color: #3c3949;
275+
}
276+
277+
/* overrides color-values for the Line Highlight plugin
278+
* http://prismjs.com/plugins/line-highlight/
279+
*/
280+
.line-highlight.line-highlight {
281+
background: rgba(224, 145, 66, 0.2);
282+
background: -webkit-linear-gradient(left, rgba(224, 145, 66, 0.2) 70%, rgba(224, 145, 66, 0));
283+
background: linear-gradient(to right, rgba(224, 145, 66, 0.2) 70%, rgba(224, 145, 66, 0));
284+
}
285+
286+
{# Code generated from markdown back ticks: `<html>` #}
287+
code {
288+
font-family: Consolas, Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace;
289+
font-size: 14px;
290+
background: rgba(224, 145, 66, 0.2);
291+
padding: 2px 3px;
292+
border-radius: 3px;
293+
}
294+
</style>
85295
</head>
86296
<body>
87297
{#- Read more about `eleventy-navigation` at https://www.11ty.dev/docs/plugins/navigation/ #}
Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
layout: layouts/base.njk
33
templateClass: tmpl-post
44
---
5-
<h1>{{ title }}</h1>
6-
7-
<time datetime="{{ page.date | htmlDateString }}">{{ page.date | readableDate }}</time> / {{city}}, {{country}}
5+
<header class="note-header">
6+
<h1 class="note-title">{{ title }}</h1>
87

98

9+
<div class="note-meta">
10+
<time datetime="{{ page.date | htmlDateString }}">{{ page.date | readableDate }}</time> / {{city}}, {{country}}
11+
</div>
12+
</header>
1013

1114
{# {%- for tag in tags | filterTagList -%}
1215
{%- set tagUrl %}/tags/{{ tag | slug }}/{% endset -%}

adventures/8-8.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: layouts/post.njk
2+
layout: layouts/note.njk
33
title: 8 × 8
44
date: 2020-02-06
55
---

adventures/a-great-flowering.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: layouts/post.njk
2+
layout: layouts/note.njk
33
title: A Great Flowering
44
date: 2016-09-25 16:38:00 -07:00
55
Country: California

adventures/a-new-home.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: layouts/post.njk
2+
layout: layouts/note.njk
33
title: A New Home
44
date: 2019-07-05
55
---

adventures/all-things-brighter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: layouts/post.njk
2+
layout: layouts/note.njk
33
title: All things brighter
44
date: 2019-11-06
55
---

adventures/ampersand.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: layouts/post.njk
2+
layout: layouts/note.njk
33
title: Ampersand
44
date: 2018-01-29
55
tags:

adventures/archiving-typographic-delights-and-the-doosmday-vault.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: layouts/post.njk
2+
layout: layouts/note.njk
33
title: Archiving, Typographic Delights and the Doomsday Vault
44
date: 2016-07-31 21:21:00 -07:00
55
Country: California

adventures/behold-the-glorious-faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
layout: layouts/post.njk
2+
layout: layouts/note.njk
33
title: Behold the Glorious FAQ
44
date: 2020-03-04
55
---

0 commit comments

Comments
 (0)