source âź© hypertext âź© public âź© codex âź© en.pug

//- meta
	slug: codex
	translates: codex
	lang: en
	title: Codex Satyrorum
	pageCreated: "2021-11-28"
	pageUpdated: "2023-08-14"

extends ../../views/layout.pug

append presets
	- hasSidenotes = false
	- hasComments = true
	- og = true
	- licence = false
	- description = false
	- rootAttrs = {"codex-type": "garamond", "codex-theme": "bede"}

append cosmetics
	link(href="/codex/codex.css", rel="stylesheet")
	link(href="/codex/codex-index.css", rel="stylesheet")
	script(src="/codex/codex-themer.js")
	script(src="/codex/codex-sort.js")

mixin catItem(bookTitle, sortAuthor, sortYear)
	li(sortauthor=sortAuthor sortyear=sortYear)
		block
		.alexandrine= codexBooks[bookTitle].alexandrine
		+translations(bookTitle)

mixin translations(bookTitle)
	- const book = codexBooks[bookTitle];
	ul.translations
		if book.codexLink
			li: a(href=book.codexLink)= tr(`codex.${book.codexVerb}`)
		each ed in book.translations
			li
				a(href=`/codex/${ed.editionID}`, hreflang=ed.lang)
					+flag(grimm.dict[ed.lang].meta.flag)
					| 
					span(lang=`${ed.lang}`) #{grimm.dict[ed.lang].meta.name}

mixin selector(category, value, enabled = 0)
	if enabled
		button(selector-title=value onclick=`codex.switch('codex-${category}', '${value}')` selector-status=`enabled`)
			block
	else
		button(selector-title=value onclick=`codex.switch('codex-${category}', '${value}')`)
			block

block header
	:rubric-unsafe
		# Codex Satyro{{r}}um

block content
	p.has-drop-cap Welcome to the #[i Codex Satyrorum]! This is a compendium of texts and extracts that i either find important, interesting, or useful to have on hand. I hope they might be of some use to you as well.
	form.sort-by
		legend Sort by:
		input#sortbydecimal(checked type="radio" name="sorting" onclick="sortBy(decimalSort)")
		label(for="sortbydecimal") Alexandrine*
		input#sortbyyear(type="radio" name="sorting" onclick="sortBy(yearSort)")
		label(for="sortbyyear") Year
		input#sortbyauthor(type="radio" name="sorting" onclick="sortBy(authorSort)")
		label(for="sortbyauthor") Author
	ul.biglist
		+catItem("cosmou", "saloustios", 360)
			.title
				a(href="/codex/on-the-gods"): i On the Gods and the World
				div.byline Saloustios, c. 360
			.description Saloustios the Philosopher’s classic of Hellenic theology (theoilogy?), as translated by Arthur Nock in 1925. [Under construction!]
		+catItem("toolbag", "gooley tristan", 2014)
			.title
				a(href="/codex/toolbag") “Your Invisible Toolbag” #[small extracted from #[i The Walker’s Guide to Outdoor Clues and Signs]]
				div.byline Tristan Gooley, 2014
			.description A very useful book to have on hand if you’re ever out on a walk through nature — this extract is from the back part with all the appendices, summarising the listed techniques. These may or may not work if you’re outside the UK.
		+catItem("moon", "safire bill", 1969)
			.title
				a(href="/codex/moon") “In Event of Moon Disaster”
				div.byline Bill Safire, 1969
			.description
				| This speech was written for president Richard Nixon, to be used in the event that the astronauts aboard 
				span.theonym Apollo
				|  11 did not make it home.
		+catItem("furrycode", "smith ross", 1998)
			.title
				a(href="/codex/furrycode") The Code of the Furries
				div.byline Ross Smith, 1998
		+catItem("udhr", "zzz", 1948)
			.title
				a(href="/codex/udhr") The Universal Declaration of Human Rights
				div.byline 1948
			.description Mostly here as a stress test to see how the site handles multilingual text.
		+catItem("end", "gough julian", 2011)
			.title
				a(href="/codex/end") The End Poem
				div.byline Julian Gough, 2011
			.description
				| Written for the end credits of 
				i Minecraft
				|  in 2011, Julian Gough dedicated this cryptic and self-admittedly “ridiculous” work to the public domain after 
				a(href="https://theeggandtherock.substack.com/p/i-wrote-a-story-for-a-friend") a retreat to a Dutch shroom temple
				| .
		+catItem("carol", "dickens charles", 1843)
			.title
				a(href="/codex/carol"): i A Christmas Carol
				div.byline Charles Dickens, 1843
			.description
				| This “ghostly little book” is Dickens at his finest, 
				i i.e.
				|  Dickens not being paid by the word. Its message still resonates to this day, and it’s a lovely little read at any time and any age.


append timestampsInner
	li Photos: <a href="https://unsplash.com/photos/dsvJgiBJTOs">Wil van Wingerden</a>, <a href="https://unsplash.com/photos/sp-p7uuT0tw">Sebastian Unrau</a>

append footer
	#selector-buttons
		#codex-type.selector
			h2 Typography
			+selector('type', 'garamond', true) Garamond (serif)
			+selector('type', 'alegreya') Alegreya (sans)
			+selector('type', 'verdana') Verdana (system)
		#codex-theme.selector
			h2 Theme
			+selector('theme', 'bede', true) Bede
			+selector('theme', 'vrelant') Vrelant
			+selector('theme', 'muir') Muir
			+selector('theme', 'kroller') Kröller
			+selector('theme', 'turing') Turing
			+selector('theme', 'eisinga') Eisinga
		#codex-background.selector
			h2 Background
			+selector('background', 'default', true) Default
			+selector('background', 'niks') None
			+selector('background', 'rijksmuseum') Rijksmuseum
			+selector('background', 'forest') Forest