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
uses: https://github.com/taiki-e/install-action@v2
with:
tool: zola@0.22.1
tool: zola@0.23.6
- name: Build project
run: zola build

View file

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

View file

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

View file

@ -1,287 +1,448 @@
:root {
--background-color: #212529;
--text-color: #ededed;
--primary-color: #133b6e;
--accent-color: #dc7c28;
color-scheme: dark;
--background-color: #16191d;
--surface-color: #1e2328;
--text-color: #e9e7e2;
--muted-color: #a8afb6;
--code-color: #e1e4e8;
--accent-color: #f0902f;
--link-color: #70b3ff;
--border1-color: #dc7c28;
--border2-color: #3d444d;
--line-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;
background-color: var(--background-color);
color: var(--text-color);
font-family: sans-serif;
font-weight: 400;
line-height: 1.5;
margin: 0 auto;
}
html {
min-height: 100%;
scroll-behavior: smooth;
font-size: 100%;
-webkit-text-size-adjust: 100%;
}
h1 {
font-size: 1.8rem;
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
}
h2 {
font-size: 1.5rem;
body {
margin: 0;
background-color: var(--background-color);
color: var(--text-color);
font-family: var(--font-sans);
line-height: 1.6;
}
h3 {
font-size: 1.25rem;
.container {
width: min(100%, var(--content-width));
margin-inline: auto;
padding: var(--gutter);
}
h4 {
font-size: 1.1rem;
/* adjacent containers (header + main + footer) shouldn't stack their padding */
header.container {
padding-top: 0.4rem;
padding-bottom: 0;
}
h5 {
font-size: 1rem;
header + .container,
.container + .container {
padding-top: 0;
}
small {
font-size: 0.667rem; /* 10.72px */
main {
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,
h2,
h3,
h4,
h5,
h6 {
margin-top: 24px;
margin-bottom: 10px;
margin-top: 2rem;
margin-bottom: 0.6rem;
color: var(--text-color);
line-height: 1.2;
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 {
margin-top: 8px;
}
ul {
display: flex;
flex-direction: column;
list-style: none;
padding-left: 0;
margin-top: 0;
margin-bottom: 0;
}
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;
margin-bottom: 1.1rem;
text-wrap: pretty;
}
.title h1 {
margin-top: 0px;
margin-bottom: 0px;
margin: 0;
}
/* header/footer */
header {
color: var(--text-color);
margin-bottom: 5px;
/* ==========================================================================
Links
========================================================================== */
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 {
max-width: 1200px;
margin: 0 auto;
a:hover {
text-decoration-line: underline;
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 {
list-style-type: none;
flex-direction: row;
gap: 25px;
display: flex;
flex-wrap: wrap;
gap: 0.25rem 1.5rem;
margin: 0;
padding: 0;
list-style: none;
}
nav li {
font-weight: bold;
padding-top: 2px;
padding-bottom: 2px;
font-weight: 600;
}
nav a {
display: inline-block;
padding: 0.1rem 0;
}
footer {
display: flex;
justify-content: space-between;
margin-top: 20px;
margin-bottom: 20px;
padding-top: 10px;
padding-bottom: 10px;
border-top: 3px solid var(--border1-color);
color: var(--text-color);
gap: 1rem;
margin-block: 2.25rem 1.25rem;
color: var(--muted-color);
}
footer div {
width: 100%;
border-top: 3px solid var(--accent-color);
padding-top: 0.75rem;
}
/* blog-list */
/* ==========================================================================
Blog list
========================================================================== */
.blog-list {
display: flex;
flex-direction: column;
gap: 5px;
margin-top: 0;
margin-bottom: 10px;
list-style: none;
margin: 0 0 1rem;
padding: 0;
list-style: none;
}
.blog-item {
display: flex;
flex-direction: column;
gap: 2px;
padding: 6px 0px;
flex-wrap: wrap;
align-items: baseline;
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 {
font-size: 1.063rem;
font-weight: bold;
font-size: 1.1rem;
font-weight: 600;
line-height: 1.35;
}
.blog-item-meta {
flex-shrink: 0;
color: var(--muted-color);
font-size: 0.875rem;
font-variant-numeric: tabular-nums;
}
/* index content */
/* ==========================================================================
Home page
========================================================================== */
.index-content .title {
display: flex;
align-items: center;
gap: 16px;
margin-bottom: 20px;
gap: 1rem;
/* 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 {
width: 64px;
height: 64px;
border-radius: 5px;
border-radius: 8px;
}
/* blog content */
.blog-content .title {
margin-bottom: 10px;
.index-content h2 {
padding-top: 1.8rem;
border-top: 3px solid var(--accent-color);
}
/* ==========================================================================
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 {
display: flex;
flex-direction: column;
gap: 4px;
border-bottom: 3px solid var(--border1-color);
margin-bottom: 20px;
gap: 0.6rem;
margin-top: 1.8rem; /* same gap above the title as the blog index page */
margin-bottom: 1.5rem;
padding-bottom: 1rem;
border-bottom: 3px solid var(--accent-color);
}
.blog-page-content .title h1 {
margin-top: 0px;
margin-bottom: 0px;
margin: 0;
padding-bottom: 0;
border-bottom: none;
font-weight: 700;
}
.blog-page-content .title span {
margin-bottom: 10px;
font-size: 0.875rem;
font-weight: normal;
color: var(--text-color);
}
.blog-page-content p {
font-family: serif;
color: var(--muted-color);
font-size: 0.9rem;
}
/* long-form text: reset to 1rem (main's base is slightly larger) */
.blog-page-content p,
.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" %}
{% block title %}404 - {{ config.title }}{% endblock title %}
{% block content %}
<div class="404-content">
<div class="error-404-content">
<div class="title">
<h1>404 Page Not Found</h1>
</div>
<p>That page does not exist.</p>
</div>
{% endblock content %}

View file

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

View file

@ -1,12 +1,36 @@
{% extends "base.html" %}
{% block title %}{{ page.title }}{% endblock title %}
{% block content %}
<div class="blog-page-content">
<div class="title">
<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>
{{ 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>
{% endblock content %}

View file

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

View file

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