Big steps towards mod sites

This commit is contained in:
2021-05-03 21:09:20 +02:00
parent 03f8c9eba2
commit ffa29a2ee4
10 changed files with 146 additions and 9 deletions

View File

@@ -39,6 +39,7 @@ collections:
mods:
output: true
permalink: /mods/:title
layout: mod
# Markdown settings
markdown: kramdown
@@ -53,6 +54,11 @@ defaults:
values:
layout: post
comments: false
- scope:
path: ""
type: mods
values:
layout: mod
# Jekyll Compose default front matter
jekyll_compose:

View File

@@ -3,7 +3,9 @@ layout: default
home: true
---
{%- if site.length > 0 -%}
<h3 class="posts-item-note" aria-label="Recent Posts">Recent Posts</h3>
{%- endif -%}
{%- for post in site.posts limit: site.number_of_posts -%}
<article class="post-item">
<span class="post-item-date">{{ post.date | date: "%b %d, %Y" }}</span>

98
_layouts/mod.html Normal file
View File

@@ -0,0 +1,98 @@
---
layout: compress
---
<!DOCTYPE html>
<html lang="{{ page.lang | default: site.lang | default: "en" }}">
{% include header.html %}
<body data-theme="{{ site.mode }}" class="notransition">
<script>
const body = document.body;
const data = body.getAttribute("data-theme");
const initTheme = (state) => {
if (state === "dark") {
body.setAttribute("data-theme", "dark");
} else if (state === "light") {
body.removeAttribute("data-theme");
} else {
localStorage.setItem("theme", data);
}
};
initTheme(localStorage.getItem("theme"));
setTimeout(() => body.classList.remove("notransition"), 75);
</script>
{% include navbar.html %}
<div class="wrapper post">
<main class="page-content" aria-label="Content">
<article itemscope itemtype="https://schema.org/BlogPosting">
<header class="header">
<img src="{{ site.url }}/assets/img/mods/{{ page.slug }}/logo.png" alt="Logo" height="200" class="header-image" />
<h1 class="header-title" itemprop="headline">
{{ page.title | escape }}
<span style="float:right">
{% if page.modrinth %}
<a href="https://modrinth.com/mod/{{ page.modrinth }}">
<svg viewBox="0 0 24 24" fill="currentColor" stroke="none" height="26" width="26"><path class="st0" d="m20.2 17.6c-0.5-0.2-0.9 0-1.2 0.3-1.2 1.4-2.8 2.5-4.8 3-3.1 0.8-6.2 0-8.4-1.9l3.6-3.2 2.1 1.9 4-1.8 2.1-3.3-0.8-1.6-2.3 1-1 1.3-1.5 0.7-1.2-1-0.8-1.5 1-1.3 1.5-0.7 1.6-2-1.3-1.2-3.8 1.3-2.7 3.5 1.3 2.5-3.7 3.2-0.5-0.8c-0.1-0.2-0.2-0.5-0.3-0.8 0-0.1-0.1-0.2-0.1-0.2-0.1-0.3-0.5-0.6-0.9-0.6-0.5 0-1 0.4-1 1 0.1 0.2 0.1 0.4 0.2 0.5 2 5.3 7.8 8.3 13.4 6.8 2.4-0.6 4.3-1.9 5.8-3.7 0.5-0.4 0.3-1.2-0.3-1.4zm2.6-8.5c-1.7-5.9-7.8-9.4-13.8-7.9-3.8 1-6.6 3.8-7.8 7.1-0.2 0.7 0.3 1.3 0.9 1.3 0.4 0 0.8-0.3 0.9-0.7 1-2.8 3.3-5 6.4-5.9 4.7-1.2 9.5 1.3 11.1 5.6l0.5 1.8c0.1 0.7 0.1 1.4 0.1 2.1v0.1c0 0.4 0.3 0.8 0.7 0.9 0.6 0.2 1.3-0.2 1.3-0.9 0.1-1 0-2.3-0.3-3.5z"/></svg>
</a>
{% endif %}
{% if page.curseforge %}
<a href="https://curseforge.com/minecraft/mc-mods/{{ page.curseforge }}">
<svg viewBox="-2017 853 43 23" fill="currentColor" stroke="none" height="26" width="26"><path d="M-2005.7,853l0.7,3c-3.5,0-12,0-12,0s0.2,0.9,0.3,1c0.3,0.5,0.6,1.1,1,1.5c1.9,2.2,5.2,3.1,7.9,3.6 c1.9,0.4,3.8,0.5,5.7,0.6l2.2,5.9h1.2l0.7,1.9h-1l-1.7,5.5h16.7l-1.7-5.5h-1l0.7-1.9h1.2c0,0,1-6.1,4.1-8.9c3-2.8,6.7-3.2,6.7-3.2 V853H-2005.7z M-1988.9,868.1c-0.8,0.5-1.7,0.5-2.3,0.9c-0.4,0.2-0.6,0.8-0.6,0.8c-0.4-0.9-0.9-1.2-1.5-1.4 c-0.6-0.2-1.7-0.1-3.2-1.4c-1-0.9-1.1-2.1-1-2.7v-0.1c0-0.1,0-0.1,0-0.2s0-0.2,0.1-0.3l0,0l0,0c0.2-0.6,0.7-1.2,1.7-1.6 c0,0-0.7,1,0,2c0.4,0.6,1.2,0.9,1.9,0.5c0.3-0.2,0.5-0.6,0.6-0.9c0.2-0.7,0.2-1.4-0.4-1.9c-0.9-0.8-1.1-1.9-0.5-2.6 c0,0,0.2,0.9,1.1,0.8c0.6,0,0.6-0.2,0.4-0.4c-0.1-0.3-1.4-2.2,0.5-3.6c0,0,1.2-0.8,2.6-0.7c-0.8,0.1-1.7,0.6-2,1.4c0,0,0,0,0,0.1 c-0.3,0.8-0.1,1.7,0.5,2.5c0.4,0.6,0.9,1.1,1.1,1.9c-0.3-0.1-0.5,0-0.7,0.2c-0.2,0.2-0.3,0.6-0.2,0.9c0.1,0.2,0.3,0.4,0.5,0.4 c0.1,0,0.1,0,0.2,0h0.1c0.3-0.1,0.5-0.5,0.4-0.8c0.2,0.2,0.3,0.7,0.2,1c0,0.3-0.2,0.6-0.3,0.8c-0.1,0.2-0.3,0.4-0.4,0.6 s-0.2,0.4-0.2,0.6c0,0.2,0,0.5,0.1,0.7c0.4,0.6,1.2,0,1.4-0.5c0.3-0.6,0.2-1.3-0.2-1.9c0,0,0.7,0.4,1.2,1.8 C-1987.4,866.2-1988.1,867.6-1988.9,868.1z"/></svg>
</a>
{% endif %}
</span>
</h1>
{% if page.date %}
<div class="post-meta">
<time hidden datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">
{{ page.date | date: "%b %d, %Y" }}
</time>
<span hidden itemprop="author" itemscope itemtype="https://schema.org/Person">
<span itemprop="name">{{ site.author.name }}</span>
</span>
<time hidden datetime="{{ page.modified | date_to_xmlschema }}" itemprop="dateModified">
{{ page.date | date: "%b %d, %Y" }}
</time>
<span hidden itemprop="publisher" itemtype="Person">{{ site.author.name }}</span>
<span hidden itemprop="image">{{ page.image }}</span>
<div itemprop="mainEntityOfPage">{{ page.excerpt }}</div>
</div>
{% endif %}
</header>
<div class="page-content" itemprop="articleBody">
{% include anchor_headings.html html=content anchorClass="anchor-head" beforeHeading=true h_min=1 h_max=4 %}
{% if page.tweet %}
<p>Comments this article on
<a href="https://twitter.com/{{site.twitter}}/status/{{page.tweet}}">Twitter</a>.
</p>
{% endif %}
</div>
</article>
{% if page.comments %}
{% include comments.html %}
{% endif %}
</main>
{% if page.modified %}
<small class="post-updated-at">updated_at {{page.modified | date: "%d-%m-%Y"}}</small>
{% endif %}
{% if page.next or page.previous %}
{% include navigation.html %}
{% endif %}
{% include footer.html %}
</div>
</body>
</html>

View File

@@ -25,6 +25,13 @@
}
}
.header-image {
height: 200px;
max-width: 100%;
margin: 0 auto 2rem auto;
display: block;
}
.header-title {
font-size: 2em;
line-height: 1.2;

View File

@@ -7,7 +7,7 @@ comments: false
Hi, I'm a German software developer currently studying Applied Informatics.
In my freetime I do quite [some modding]({% link modding.md %}) to the sandbox video game [Minecraft](https://en.wikipedia.org/wiki/Minecraft). I also do some more or less experimental projects with Python, PHP and Rust.
In my freetime I do quite [some modding]({% link modding.html %}) to the sandbox video game [Minecraft](https://en.wikipedia.org/wiki/Minecraft). I also do some more or less experimental projects with Python, PHP and Rust.
**Contact**

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@@ -2,7 +2,7 @@
title: Blog
permalink: /posts/
layout: page
excerpt: All post.
excerpt: All posts.
comments: false
---

View File

@@ -0,0 +1,8 @@
---
name: Mouse Wheelie
slug: mouse-wheelie
curseforge: mouse-wheelie
modrinth: mouse-wheelie
excerpt: A mod extending the mouse wheel and inventory interactions.
---

23
modding.html Normal file
View File

@@ -0,0 +1,23 @@
---
title: Minecraft modding
permalink: /mods/
layout: page
excerpt: My Minecraft mods.
comments: false
---
<p>In my freetime I work on several mods for the sandbox video game <a href="https://en.wikipedia.org/wiki/Minecraft">Minecraft</a>. I base these mods on the <a href="https://fabricmc.net">Fabric toolchain</a> but am kindly looking forward to the <a href="https://quiltmc.org">Quilt toolchain</a> officially launching :)</p>
<h1>My mods</h1>
{%- for mod in site.mods -%}
<article class="post-item">
<h3 class="post-item-title">
<a href="{{ mod.url }}">{{ mod.name }}</a>
</h3>
</article>
{%- else -%}
<div style="text-align:center">
No mods to see here yet.
</div>
{%- endfor -%}

View File

@@ -1,7 +0,0 @@
---
title: Minecraft modding
permalink: /mods/
layout: page
---
In my freetime I work on several mods for the sandbox video game [Minecraft](https://en.wikipedia.org/wiki/Minecraft). I base these mods on the [Fabric](https://fabricmc.net) toolchain but am kindly looking forward to the [Quilt](https://quiltmc.org) toolchain officially launching :)