basically releasable
This commit is contained in:
parent
04cf8eb646
commit
0314b6a427
41 changed files with 281 additions and 1760 deletions
32
site/_includes/-header.njk
Normal file
32
site/_includes/-header.njk
Normal file
|
@ -0,0 +1,32 @@
|
|||
<header>
|
||||
<nav>
|
||||
<div>
|
||||
<a href="{{ "/" | url }}">joshua.seigler.net</a>
|
||||
{% for name, collection in collections %}
|
||||
{% if name !== "all" %}
|
||||
<a href="{{ ["/", name ,"/"] | join("") | url }}">/{{name | capitalize }}</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<aside>
|
||||
Language:
|
||||
<label data-font="english">English <input type="radio" name="language" value="english"/></label>
|
||||
<label data-font="aurebesh">Aurebesh <input type="radio" name="language" value="aurebesh"/></label>
|
||||
<script type="text/javascript">
|
||||
const initialLanguage = localStorage.getItem("language") ?? 'english'
|
||||
document.body.setAttribute('data-font', initialLanguage);
|
||||
document.querySelectorAll("input[name=language]").forEach(input => {
|
||||
if (input.value === initialLanguage) {
|
||||
input.checked = true;
|
||||
}
|
||||
input.addEventListener('change', function () {
|
||||
const newValue = this.value;
|
||||
localStorage.setItem("language", newValue);
|
||||
document.body.setAttribute('data-font', newValue);
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</aside>
|
||||
</nav>
|
||||
<h1>{{ tag | capitalize if tag else title }}</h1>
|
||||
</header>
|
|
@ -7,15 +7,13 @@ title: Joshua's Homepage
|
|||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="{{ "/assets/tufte.css" | url }}"/>
|
||||
<title>{{ title }}</title>
|
||||
<link rel="stylesheet" href="{{ "/assets/site.css" | url }}"/>
|
||||
<title>{{ tag | capitalize if tag else title }} - joshua.seigler.net</title>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>
|
||||
{{ title }}
|
||||
</h1>
|
||||
</header>
|
||||
{{ content | safe }}
|
||||
<body data-font="english">
|
||||
{% include "-header.njk" %}
|
||||
<main>
|
||||
{{ content | safe }}
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
---
|
||||
layout: base.njk
|
||||
---
|
||||
{{ content | safe }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue