Watch
1
0
Fork
You've already forked rgebee-info
0

feat: Update templates and styling
All checks were successful
Build / build (push) Successful in 18s

This commit is contained in:
Chris 2026-10-29 20:37:59 +00:00
commit ab79feb4ab
11 changed files with 432 additions and 203 deletions

View file

@ -17,7 +17,7 @@ jobs:
- name: Set up zola - name: Set up zola
uses: https://github.com/taiki-e/install-action@v2 uses: https://github.com/taiki-e/install-action@v2
with: with:
tool: zola@0.22.1 tool: zola@0.23.6
- name: Build project - name: Build project
run: zola build run: zola build

View file

@ -7,9 +7,8 @@ compile_sass = false
generate_feeds = true generate_feeds = true
build_search_index = false build_search_index = false
[markdown] [[taxonomies]]
name = "tags"
[markdown.highlighting] [markdown.highlighting]
theme = "catppuccin-macchiato" theme = "catppuccin-macchiato"
[extra]

View file

@ -1,6 +1,9 @@
+++ +++
title = "Testing post content styles" title = "Testing post content styles"
date = 2026-01-03 date = 2026-01-03
[taxonomies]
tags = ["Test"]
+++ +++
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce bibendum neque eget Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce bibendum neque eget

View file

@ -1,287 +1,448 @@
:root { :root {
--background-color: #212529; color-scheme: dark;
--text-color: #ededed; --background-color: #16191d;
--primary-color: #133b6e; --surface-color: #1e2328;
--accent-color: #dc7c28; --text-color: #e9e7e2;
--muted-color: #a8afb6;
--code-color: #e1e4e8;
--accent-color: #f0902f;
--link-color: #70b3ff; --link-color: #70b3ff;
--border1-color: #dc7c28; --line-color: #3d444d;
--border2-color: #3d444d; --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
--font-mono: ui-monospace, SFMono-Regular, Menlo, "Cascadia Code", Consolas, "Liberation Mono", monospace;
--content-width: 42rem;
--logo-gap: 1.25rem;
--logo-nav-gap: 1.5rem;
--gutter: clamp(1rem, 4vw, 1.5rem);
} }
body { /* ==========================================================================
Base
========================================================================== */
*,
*::before,
*::after {
box-sizing: border-box; box-sizing: border-box;
background-color: var(--background-color);
color: var(--text-color);
font-family: sans-serif;
font-weight: 400;
line-height: 1.5;
margin: 0 auto;
} }
html { html {
min-height: 100%; min-height: 100%;
scroll-behavior: smooth; scroll-behavior: smooth;
font-size: 100%; font-size: 100%;
-webkit-text-size-adjust: 100%;
} }
h1 { @media (prefers-reduced-motion: reduce) {
font-size: 1.8rem; html {
scroll-behavior: auto;
}
} }
h2 { body {
font-size: 1.5rem; margin: 0;
background-color: var(--background-color);
color: var(--text-color);
font-family: var(--font-sans);
line-height: 1.6;
} }
h3 { .container {
font-size: 1.25rem; width: min(100%, var(--content-width));
margin-inline: auto;
padding: var(--gutter);
} }
h4 { /* adjacent containers (header + main + footer) shouldn't stack their padding */
font-size: 1.1rem; header.container {
padding-top: 0.4rem;
padding-bottom: 0;
} }
h5 { header + .container,
font-size: 1rem; .container + .container {
padding-top: 0;
} }
small { main {
font-size: 0.667rem; /* 10.72px */ font-size: 1.0625rem;
} }
main img {
display: block;
max-width: 100%;
height: auto;
border-radius: 6px;
}
figure {
margin: 1.5rem 0;
}
figcaption {
margin-top: 0.5rem;
color: var(--muted-color);
font-size: 0.875rem;
}
/* ==========================================================================
Headings
========================================================================== */
h1, h1,
h2, h2,
h3, h3,
h4, h4,
h5, h5,
h6 { h6 {
margin-top: 24px; margin-top: 2rem;
margin-bottom: 10px; margin-bottom: 0.6rem;
color: var(--text-color); color: var(--text-color);
line-height: 1.2;
font-weight: 700; font-weight: 700;
line-height: 1.2;
letter-spacing: -0.01em;
text-wrap: balance;
}
h1 {
font-size: 2rem;
}
h2 {
font-size: 1.5rem;
}
h3 {
font-size: 1.25rem;
}
h4 {
font-size: 1.1rem;
}
h5,
h6 {
font-size: 1rem;
}
small {
font-size: 0.875em;
color: var(--muted-color);
} }
p { p {
margin-top: 8px;
}
ul {
display: flex;
flex-direction: column;
list-style: none;
padding-left: 0;
margin-top: 0; margin-top: 0;
margin-bottom: 0; margin-bottom: 1.1rem;
} text-wrap: pretty;
ul,
ol {
list-style-position: inside;
padding-left: 0px;
}
ul {
list-style-type: disc;
}
ul ul {
list-style-type: disc;
padding-left: 10px;
}
.container {
max-width: 40rem;
width: 100%;
margin-right: auto;
margin-left: auto;
padding: 10px;
}
@media (min-width: 576px) {
.container {
width: 540px;
}
}
@media (min-width: 768px) {
.container {
width: 720px;
}
}
@media (min-width: 992px) {
.container {
width: 960px;
}
}
@media (min-width: 1200px) {
.container {
width: 1140px;
}
}
hr {
background-color: var(--border1-color);
}
blockquote {
border-left: 4px solid var(--border1-color);
margin-left: 0px;
padding-left: 10px;
}
a {
border-bottom: 2px solid transparent;
color: var(--link-color);
text-decoration: none;
}
a:hover {
border-bottom: 2px solid var(--link-color);
text-decoration: none;
}
main {
color: var(--text-color);
font-size: 1.1rem;
}
main img {
max-width: 100%;
}
/* code blocks */
figure {
margin: 0;
}
pre {
padding: 8px;
border: 1px solid var(--border2-color);
}
pre code {
overflow-x: scroll;
display: block;
border-radius: 0;
color: #e1e4e8;
} }
.title h1 { .title h1 {
margin-top: 0px; margin: 0;
margin-bottom: 0px;
} }
/* header/footer */ /* ==========================================================================
header { Links
color: var(--text-color); ========================================================================== */
margin-bottom: 5px; a {
color: var(--link-color);
text-decoration-line: none;
text-decoration-thickness: 1px;
text-decoration-color: color-mix(in srgb, var(--link-color) 75%, transparent);
text-underline-offset: 0.2em;
} }
nav { a:hover {
max-width: 1200px; text-decoration-line: underline;
margin: 0 auto; text-decoration-thickness: 2px;
text-decoration-color: currentColor;
} }
a:focus-visible {
outline: 2px solid var(--accent-color);
outline-offset: 3px;
border-radius: 2px;
}
/* ==========================================================================
Lists
========================================================================== */
main ul,
main ol {
margin: 0 0 1.1rem;
padding-left: 1.4rem;
list-style-position: outside;
}
main li + li {
margin-top: 0.35rem;
}
main li::marker {
color: var(--accent-color);
}
main ul ul,
main ol ol,
main ul ol,
main ol ul {
margin-top: 0.35rem;
margin-bottom: 0;
}
/* ==========================================================================
Rules, quotes, code, tables
========================================================================== */
hr {
margin: 2rem 0;
border: none;
border-top: 2px solid var(--line-color);
}
blockquote {
margin: 1.5rem 0;
padding: 0.25rem 0 0.25rem 1.1rem;
border-left: 4px solid var(--accent-color);
color: var(--muted-color);
font-style: italic;
}
blockquote p:last-child {
margin-bottom: 0;
}
code {
padding: 0.1em 0.35em;
border-radius: 4px;
background-color: var(--surface-color);
font-family: var(--font-mono);
font-size: 0.9em;
}
pre {
margin: 1.5rem 0;
padding: 1rem;
overflow-x: auto;
border: 1px solid var(--line-color);
border-radius: 6px;
background-color: var(--surface-color);
line-height: 1.5;
tab-size: 2;
}
pre code {
display: block;
padding: 0;
border-radius: 0;
background-color: transparent;
color: var(--code-color);
font-size: 0.875rem;
}
table {
display: block;
width: 100%;
max-width: 100%;
margin: 1.5rem 0;
overflow-x: auto;
border-collapse: collapse;
font-size: 0.95rem;
}
th,
td {
padding: 0.5rem 0.75rem;
border-bottom: 1px solid var(--line-color);
text-align: left;
}
th {
border-bottom-color: var(--accent-color);
font-weight: 700;
}
/* ==========================================================================
Header / nav / footer
========================================================================== */
nav ul { nav ul {
list-style-type: none; display: flex;
flex-direction: row; flex-wrap: wrap;
gap: 25px; gap: 0.25rem 1.5rem;
margin: 0;
padding: 0;
list-style: none;
} }
nav li { nav li {
font-weight: bold; font-weight: 600;
padding-top: 2px; }
padding-bottom: 2px;
nav a {
display: inline-block;
padding: 0.1rem 0;
} }
footer { footer {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: 20px; gap: 1rem;
margin-bottom: 20px; margin-block: 2.25rem 1.25rem;
padding-top: 10px; color: var(--muted-color);
padding-bottom: 10px;
border-top: 3px solid var(--border1-color);
color: var(--text-color);
} }
footer div {
width: 100%;
border-top: 3px solid var(--accent-color);
padding-top: 0.75rem;
}
/* blog-list */ /* ==========================================================================
Blog list
========================================================================== */
.blog-list { .blog-list {
display: flex;
flex-direction: column; flex-direction: column;
gap: 5px; margin: 0 0 1rem;
margin-top: 0;
margin-bottom: 10px;
list-style: none;
padding: 0; padding: 0;
list-style: none;
} }
.blog-item { .blog-item {
display: flex; display: flex;
flex-direction: column; flex-wrap: wrap;
gap: 2px; align-items: baseline;
padding: 6px 0px; justify-content: space-between;
gap: 0.15rem 1.5rem;
margin: 0;
padding: 0.55rem 0;
border-bottom: 2px solid var(--line-color);
} }
.blog-item a { .blog-item a {
font-size: 1.063rem; font-size: 1.1rem;
font-weight: bold; font-weight: 600;
line-height: 1.35;
} }
.blog-item-meta { .blog-item-meta {
flex-shrink: 0;
color: var(--muted-color);
font-size: 0.875rem; font-size: 0.875rem;
font-variant-numeric: tabular-nums;
} }
/* ==========================================================================
/* index content */ Home page
========================================================================== */
.index-content .title { .index-content .title {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 16px; gap: 1rem;
margin-bottom: 20px; /* space above (nav to logo) is slightly larger than below (logo to intro
text); the 0.1rem offsets the nav link's own vertical padding */
margin-top: calc(var(--logo-nav-gap) - 0.1rem);
margin-bottom: var(--logo-gap);
} }
.index-content .title img { .index-content .title img {
width: 64px; width: 64px;
height: 64px; height: 64px;
border-radius: 5px; border-radius: 8px;
} }
.index-content h2 {
/* blog content */ padding-top: 1.8rem;
.blog-content .title { border-top: 3px solid var(--accent-color);
margin-bottom: 10px;
} }
/* ==========================================================================
Blog index & 404 page
========================================================================== */
.blog .title,
.error-404 {
/* heading above the rule, same 1.8rem spacings as the home page divider */
margin-top: 1.8rem;
margin-bottom: 0.6rem;
padding-bottom: 1.8rem;
border-bottom: 3px solid var(--accent-color);
}
/* blog-page content */ .error-404 .title {
margin-bottom: 1.5rem;
}
/* ==========================================================================
Blog page
========================================================================== */
.blog-page-content .title { .blog-page-content .title {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 4px; gap: 0.6rem;
border-bottom: 3px solid var(--border1-color); margin-top: 1.8rem; /* same gap above the title as the blog index page */
margin-bottom: 20px; margin-bottom: 1.5rem;
padding-bottom: 1rem;
border-bottom: 3px solid var(--accent-color);
} }
.blog-page-content .title h1 { .blog-page-content .title h1 {
margin-top: 0px; margin: 0;
margin-bottom: 0px; padding-bottom: 0;
border-bottom: none;
font-weight: 700;
} }
.blog-page-content .title span { .blog-page-content .title span {
margin-bottom: 10px; color: var(--muted-color);
font-size: 0.875rem; font-size: 0.9rem;
font-weight: normal;
color: var(--text-color);
}
.blog-page-content p {
font-family: serif;
} }
/* long-form text: reset to 1rem (main's base is slightly larger) */
.blog-page-content p,
.blog-page-content li { .blog-page-content li {
font-family: serif; font-size: 1rem;
} }
/* in-post headings */
.blog-page-content h1,
.blog-page-content h2,
.blog-page-content h3,
.blog-page-content h4,
.blog-page-content h5,
.blog-page-content h6 {
margin: 1.25rem 0 0.5rem;
font-weight: 500;
}
/* headings get a subtle underline rule */
.blog-page-content h1,
.blog-page-content h2,
.blog-page-content h3,
.blog-page-content h4,
.blog-page-content h5 {
padding-bottom: 0.5rem;
border-bottom: 2px solid var(--line-color);
}
/* ==========================================================================
Post navigation
========================================================================== */
.post-nav {
display: flex;
justify-content: space-between;
gap: 1rem;
margin-top: 2rem;
padding-top: 0.75rem;
border-top: 2px solid var(--line-color);
font-size: 0.9375rem;
}
/* ==========================================================================
Small screens
========================================================================== */
@media (max-width: 30rem) {
main {
font-size: 1rem;
}
.blog-item {
flex-direction: column;
align-items: flex-start;
}
footer {
flex-direction: column;
}
}

View file

@ -1,9 +1,12 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}404 - {{ config.title }}{% endblock title %}
{% block content %} {% block content %}
<div class="404-content"> <div class="error-404-content">
<div class="title"> <div class="title">
<h1>404 Page Not Found</h1> <h1>404 Page Not Found</h1>
</div> </div>
<p>That page does not exist.</p>
</div> </div>
{% endblock content %} {% endblock content %}

View file

@ -2,48 +2,52 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title> <meta name="viewport" content="width=device-width, initial-scale=1">
{% if page.title %} <meta name="color-scheme" content="dark">
{{ page.title }} <meta name="theme-color" content="#16191d">
{% elif section.title %} <title>{% block title %}{{ config.title }}{% endblock title %}</title>
{{ config.title }} - {{ section.title }} {% set desc = config.description %}
{% else %} {% if page and page.description %}
{{ config.title }} {% set desc = page.description %}
{% endif %} {% endif %}
</title> <meta name="description" content="{{ desc }}">
<meta charset="utf-8"> {% if page %}
<meta name="viewport" content="width=device-width"> <link rel="canonical" href="{{ page.canonical_url | safe }}">
<meta name="description" content="{{ config.description }}"> <meta property="og:type" content="{% if page.kind == 'page' %}article{% else %}website{% endif %}">
<meta property="og:title" content="{{ page.title }}">
<meta property="og:description" content="{{ desc }}">
<meta property="og:url" content="{{ page.canonical_url | safe }}">
{% endif %}
<link rel="stylesheet" href="/global.css"> <link rel="stylesheet" href="/global.css">
<link rel="icon" type="image/svg+xml" href="/images/favicon.svg"> <link rel="icon" type="image/png" href="/images/favicon.svg">
<link <link rel="alternate" type="application/atom+xml" title="Atom" href="{{ config.base_url | safe }}/atom.xml">
rel="alternate"
type="application/atom+xml"
title="RSS"
href="{{ config.base_url }}/atom.xml"
>
</head> </head>
<body> <body>
{% set path = current_path | default(value="") %}
<header class="container"> <header class="container">
<nav> <nav aria-label="nav">
<ul> <ul>
<li> <li>
<a href="/">Home</a> <a href="/"{% if path == "/" %} aria-current="page"{% endif %}>Home</a>
</li> </li>
<li> <li>
<a href="/blog">Blog</a> <a href="/blog/"{% if path == "/blog/" %} aria-current="page"{% endif %}>Blog</a>
</li> </li>
</ul> </ul>
</nav> </nav>
</header> </header>
<main class="container"> <main class="container">
{% block content %} {% endblock content %} {% block content %}
{% endblock content %}
</main> </main>
<footer class="container"> <footer class="container">
<a href="/atom.xml" target="_blank" rel="noopener">RSS</a> <div>
<a href="/atom.xml" target="_blank" rel="noopener">RSS</a>
</div>
</footer> </footer>
</body> </body>
</html> </html>

View file

@ -1,12 +1,36 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}{{ page.title }}{% endblock title %}
{% block content %} {% block content %}
<div class="blog-page-content"> <div class="blog-page-content">
<div class="title"> <div class="title">
<h1>{{ page.title }}</h1> <h1>{{ page.title }}</h1>
<span>{{ page.date }}</span> <span>{{ page.date | date(format="%Y-%m-%d") }}</span>
{% if page.taxonomies.tags %}
<span class="tags">
{% for tag in page.taxonomies.tags %}
{% set t = get_taxonomy_term(kind="tags", term=tag) %}
<a href="{{ t.permalink | safe }}">{{ tag }}</a>{% if not loop.last %} · {% endif %}
{% endfor %}
</span>
{% endif %}
</div> </div>
{{ page.content | safe }} {{ page.content | safe }}
</div> {# adjacent posts: higher = older (below in the list), lower = newer (above) #}
{% if page.higher or page.lower %}
<nav class="post-nav" aria-label="Other posts">
{% if page.higher %}
<a href="{{ page.higher.permalink | safe }}">&lt;&lt; Previous</a>
{% else %}
<span></span>
{% endif %}
{% if page.lower %}
<a href="{{ page.lower.permalink | safe }}">Next &gt;&gt;</a>
{% else %}
<span></span>
{% endif %}
</nav>
{% endif %}
</div> </div>
{% endblock content %} {% endblock content %}

View file

@ -1,21 +1,19 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block title %}{{ section.title }} - {{ config.title }}{% endblock title %}
{% block content %} {% block content %}
<div class="blog-content"> <div class="blog">
<div class="title"> <div class="title">
<h1>{{ section.title }}</h1> <h1>{{ section.title }}</h1>
</div> </div>
<div> <ul class="blog-list">
<ul class="blog-list"> {% for page in section.pages %}
{% for page in section.pages %} <li class="blog-item">
<li class="blog-item"> <a href="{{ page.permalink | safe }}">{{ page.title }}</a>
<div> <span class="blog-item-meta">{{ page.date | date(format="%Y-%m-%d") }}</span>
<a href="{{ page.permalink | safe }}">{{ page.title }}</a> </li>
</div> {% endfor %}
<span class="blog-item-meta">{{ page.date }}</span> </ul>
</li>
{% endfor %}
</ul>
</div>
</div> </div>
{% endblock content %} {% endblock content %}

View file

@ -3,7 +3,7 @@
{% block content %} {% block content %}
<div class="index-content"> <div class="index-content">
<div class="title"> <div class="title">
<img src="/images/logo.png" alt="logo" /> <img src="/images/logo.png" alt="" />
<h1>{{ config.title }}</h1> <h1>{{ config.title }}</h1>
</div> </div>
<div> <div>
@ -15,13 +15,15 @@
<h2>Latest blog posts</h2> <h2>Latest blog posts</h2>
<ul class="blog-list"> <ul class="blog-list">
{% set blog = get_section(path="blog/_index.md") %} {% set blog = get_section(path="blog/_index.md") %}
{% for page in blog.pages | slice(end=5) %} {% for page in blog.pages %}
<li class="blog-item"> {% if loop.index <= 5 %}
<div> <li class="blog-item">
<a href="{{ page.permalink | safe }}">{{ page.title }}</a> <div>
</div> <a href="{{ page.permalink | safe }}">{{ page.title }}</a>
<span class="blog-item-meta">{{ page.date }}</span> </div>
</li> <span class="blog-item-meta">{{ page.date | date(format="%Y-%m-%d") }}</span>
</li>
{% endif %}
{% endfor %} {% endfor %}
</ul> </ul>
</div> </div>

View file

@ -0,0 +1,16 @@
{% extends "base.html" %}
{% block title %}Tags - {{ config.title }}{% endblock title %}
{% block content %}
<div class="blog">
<div class="title">
<h1>Tags</h1>
</div>
<p>
{% for term in terms %}
<a href="{{ term.permalink | safe }}">{{ term.name }}</a>{% if not loop.last %} · {% endif %}
{% endfor %}
</p>
</div>
{% endblock content %}

View file

@ -0,0 +1,19 @@
{% extends "base.html" %}
{% block title %}{{ term.name }} - {{ config.title }}{% endblock title %}
{% block content %}
<div class="blog">
<div class="title">
<h1>{{ term.name }}</h1>
</div>
<ul class="blog-list">
{% for page in term.pages %}
<li class="blog-item">
<a href="{{ page.permalink | safe }}">{{ page.title }}</a>
<span class="blog-item-meta">{{ page.date | date(format="%Y-%m-%d") }}</span>
</li>
{% endfor %}
</ul>
</div>
{% endblock content %}