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 }}
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"layout": "post.njk",
|
||||
"permalink": "/posts/{{ title | slugify }}/",
|
||||
"tags": "posts"
|
||||
}
|
13
site/collections/collections.md
Normal file
13
site/collections/collections.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
layout: "base.njk"
|
||||
pagination:
|
||||
data: collections
|
||||
size: 1
|
||||
alias: tag
|
||||
filter:
|
||||
- all
|
||||
permalink: /{{ tag | slugify }}/
|
||||
---
|
||||
{% for item in collections[ tag ] | reverse %}
|
||||
- [{{ item.data.title }}]({{ item.url }}){% if item.data.dateString %}<aside>{{item.data.dateString}}</aside>{% endif %}
|
||||
{% endfor %}
|
|
@ -1,22 +0,0 @@
|
|||
---
|
||||
layout: base
|
||||
title: joshua.seigler.net
|
||||
---
|
||||
|
||||
## Posts
|
||||
|
||||
{% for post in collections.posts %}
|
||||
- [{{ post.data.title }}]({{ post.url }})
|
||||
{% endfor %}
|
||||
|
||||
## Music
|
||||
|
||||
{% for m in music %}
|
||||
- [{{ m }}](music/{{ m | slug }}.pdf)
|
||||
{% endfor %}
|
||||
|
||||
## Recipes
|
||||
|
||||
{% for recipe in collections.recipes %}
|
||||
- [{{ recipe.data.title }}]({{ recipe.url }})
|
||||
{% endfor %}
|
20
site/index.njk
Normal file
20
site/index.njk
Normal file
|
@ -0,0 +1,20 @@
|
|||
---
|
||||
layout: base
|
||||
title: Home
|
||||
---
|
||||
|
||||
{% for name, collection in collections %}
|
||||
{% if name !== "all" %}
|
||||
<h2>{{name | capitalize }}</h2>
|
||||
<ul>
|
||||
{% for item in collection %}
|
||||
<li>
|
||||
<a href="{{item.url}}">{{item.data.title}}</a>
|
||||
{% if item.data.dateString %}
|
||||
<aside>{{item.data.dateString}}</aside>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endfor %}
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: Hello world
|
||||
title: First post
|
||||
---
|
||||
|
||||
It's my first post!
|
10
site/posts/posts.11tydata.js
Normal file
10
site/posts/posts.11tydata.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
const { DateTime } = require("luxon");
|
||||
|
||||
module.exports = {
|
||||
layout: "post.njk",
|
||||
permalink: "/posts/{{ title | slugify }}/",
|
||||
tags: ["posts"],
|
||||
eleventyComputed: {
|
||||
dateString: ({ page }) => DateTime.fromJSDate(page.date, { zone: 'utc' }).toLocaleString(DateTime.DATE_FULL)
|
||||
}
|
||||
};
|
4
site/recipes/recipes.11tydata.js
Normal file
4
site/recipes/recipes.11tydata.js
Normal file
|
@ -0,0 +1,4 @@
|
|||
module.exports = {
|
||||
layout: "base.njk",
|
||||
tags: ["recipes"],
|
||||
};
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
"layout": "base.njk",
|
||||
"tags": "recipes"
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue