Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
ruby-version: "4.0"
bundler-cache: true
- run: bin/check_unicode
- run: bundle exec jekyll build
- run: bundle exec htmlproofer _site --disable-external --no-enforce-https
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.3"
ruby-version: "4.0"
bundler-cache: true
- run: bundle exec jekyll build
- uses: actions/configure-pages@v5
Expand Down
11 changes: 11 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
title: "404"
permalink: /404.html
sitemap: false
---

<h1>404</h1>

<p>No page here. Maybe it moved, maybe it never existed.</p>

<p><a href="/">Home</a>, <a href="/sitemap/">sitemap</a>, or <a href="/blog/">blog</a>.</p>
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source "https://rubygems.org"
gem "jekyll", "~> 4.3"
gem "htmlbeautifier"
gem "fastimage"
gem "html-proofer"

group :jekyll_plugins do
gem "jekyll-sitemap"
Expand Down
69 changes: 69 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,16 +1,32 @@
GEM
remote: https://rubygems.org/
specs:
Ascii85 (2.0.1)
addressable (2.8.8)
public_suffix (>= 2.0.2, < 8.0)
afm (1.0.0)
async (2.39.0)
console (~> 1.29)
fiber-annotation
io-event (~> 1.11)
metrics (~> 0.12)
traces (~> 0.18)
base64 (0.3.0)
benchmark (0.5.0)
bigdecimal (4.0.1)
colorator (1.1.0)
concurrent-ruby (1.3.6)
console (1.36.0)
fiber-annotation
fiber-local (~> 1.1)
json
csv (3.3.5)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
ethon (0.18.0)
ffi (>= 1.15.0)
logger
eventmachine (1.2.7)
fastimage (2.4.0)
ffi (1.17.3)
Expand All @@ -24,6 +40,10 @@ GEM
ffi (1.17.3-x86_64-darwin)
ffi (1.17.3-x86_64-linux-gnu)
ffi (1.17.3-x86_64-linux-musl)
fiber-annotation (0.2.0)
fiber-local (1.1.0)
fiber-storage
fiber-storage (1.0.1)
forwardable-extended (2.6.0)
google-protobuf (4.33.5)
bigdecimal
Expand Down Expand Up @@ -52,10 +72,22 @@ GEM
google-protobuf (4.33.5-x86_64-linux-musl)
bigdecimal
rake (>= 13)
hashery (2.1.2)
html-proofer (5.2.1)
addressable (~> 2.3)
async (~> 2.1)
benchmark (~> 0.5)
nokogiri (~> 1.13)
pdf-reader (~> 2.11)
rainbow (~> 3.0)
typhoeus (~> 1.3)
yell (~> 2.0)
zeitwerk (~> 2.5)
htmlbeautifier (1.4.3)
http_parser.rb (0.8.1)
i18n (1.14.8)
concurrent-ruby (~> 1.0)
io-event (1.16.1)
jekyll (4.4.1)
addressable (~> 2.4)
base64 (~> 0.2)
Expand Down Expand Up @@ -93,15 +125,45 @@ GEM
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.7.0)
mercenary (0.4.0)
metrics (0.15.0)
mini_portile2 (2.8.9)
nokogiri (1.19.3)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.19.3-aarch64-linux-gnu)
racc (~> 1.4)
nokogiri (1.19.3-aarch64-linux-musl)
racc (~> 1.4)
nokogiri (1.19.3-arm-linux-gnu)
racc (~> 1.4)
nokogiri (1.19.3-arm-linux-musl)
racc (~> 1.4)
nokogiri (1.19.3-arm64-darwin)
racc (~> 1.4)
nokogiri (1.19.3-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.19.3-x86_64-linux-gnu)
racc (~> 1.4)
nokogiri (1.19.3-x86_64-linux-musl)
racc (~> 1.4)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
pdf-reader (2.15.1)
Ascii85 (>= 1.0, < 3.0, != 2.0.0)
afm (>= 0.2.1, < 2)
hashery (~> 2.0)
ruby-rc4
ttfunk
public_suffix (7.0.2)
racc (1.8.1)
rainbow (3.1.1)
rake (13.3.1)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rexml (3.4.4)
rouge (4.7.0)
ruby-rc4 (0.1.5)
safe_yaml (1.0.5)
sass-embedded (1.97.3)
google-protobuf (~> 4.31)
Expand Down Expand Up @@ -136,8 +198,14 @@ GEM
google-protobuf (~> 4.31)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
traces (0.18.2)
ttfunk (1.7.0)
typhoeus (1.6.0)
ethon (>= 0.18.0)
unicode-display_width (2.6.0)
webrick (1.9.2)
yell (2.2.2)
zeitwerk (2.8.2)

PLATFORMS
aarch64-linux-android
Expand All @@ -162,6 +230,7 @@ PLATFORMS

DEPENDENCIES
fastimage
html-proofer
htmlbeautifier
jekyll (~> 4.3)
jekyll-sitemap
Expand Down
7 changes: 6 additions & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ collections:
output: true
permalink: /gallery/:slug/
sort_by: order
threads:
output: false
sort_by: date

defaults:
- scope:
Expand All @@ -26,6 +29,8 @@ defaults:

date_format: "%d.%m.%Y"

gallery_categories: ["Graphics", "Voxels", "Math & Noise", "Bugs", "Random", "Electronics", "ZHAW", "Adventures", "Personal"]

markdown: kramdown
kramdown:
syntax_highlighter: none
Expand All @@ -40,4 +45,4 @@ exclude:
- Gemfile
- Gemfile.lock
- bin/
- design.md
- gallery-variants/
27 changes: 0 additions & 27 deletions _headers

This file was deleted.

17 changes: 9 additions & 8 deletions _includes/collection_nav.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{%- assign _i = nil -%}
{%- for p in include.docs -%}
{%- if p.url == page.url -%}{%- assign _i = forloop.index0 -%}{%- endif -%}
{%- comment -%} Prev/next links for the current page within include.docs (an ordered list). {%- endcomment -%}
{%- assign current_index = nil -%}
{%- for doc in include.docs -%}
{%- if doc.url == page.url -%}{%- assign current_index = forloop.index0 -%}{%- endif -%}
{%- endfor -%}
{%- assign _prev_i = _i | minus: 1 -%}
{%- assign _next_i = _i | plus: 1 -%}
{%- for p in include.docs -%}
{%- if _i > 0 and forloop.index0 == _prev_i %} | <a href="{{ p.url }}" title="left arrow key">< {{ p.title }}</a>{%- endif -%}
{%- if forloop.index0 == _next_i %} | <a href="{{ p.url }}" title="right arrow key">{{ p.title }} ></a>{%- endif -%}
{%- assign prev_index = current_index | minus: 1 -%}
{%- assign next_index = current_index | plus: 1 -%}
{%- for doc in include.docs -%}
{%- if current_index > 0 and forloop.index0 == prev_index %} | <a href="{{ doc.url }}" title="left arrow key">< {{ doc.title }}</a>{%- endif -%}
{%- if forloop.index0 == next_index %} | <a href="{{ doc.url }}" title="right arrow key">{{ doc.title }} ></a>{%- endif -%}
{%- endfor -%}
12 changes: 6 additions & 6 deletions _includes/gallery_nav.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{%- assign categories = "Graphics,Voxels,Math & Noise,Bugs,Random,Electronics,ZHAW,Adventures,Personal" | split: "," -%}
{%- assign _sorted_all = "" | split: "" -%}
{%- for cat in categories -%}
{%- assign cat_items = site.gallery | where: 'category', cat | sort: 'order' | reverse -%}
{%- assign _sorted_all = _sorted_all | concat: cat_items -%}
{%- comment -%} Gallery items in display order: by category, newest first within each. {%- endcomment -%}
{%- assign gallery_in_display_order = "" | split: "" -%}
{%- for category in site.gallery_categories -%}
{%- assign category_items = site.gallery | where: "category", category | sort: "order" | reverse -%}
{%- assign gallery_in_display_order = gallery_in_display_order | concat: category_items -%}
{%- endfor -%}
{% include collection_nav.html docs=_sorted_all %}
{% include collection_nav.html docs=gallery_in_display_order %}
9 changes: 3 additions & 6 deletions _includes/post_nav.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
{% if page.previous %}
| <a href="{{ page.previous.url }}" title="left arrow key">< {{ page.previous.title }}</a>
{% endif %}
{% if page.next %}
| <a href="{{ page.next.url }}" title="right arrow key">{{ page.next.title }} ></a>
{% endif %}
{%- comment -%} site.posts is newest-first; reverse so "<" points to the older post. {%- endcomment -%}
{%- assign posts_oldest_first = site.posts | reverse -%}
{% include collection_nav.html docs=posts_oldest_first %}
58 changes: 58 additions & 0 deletions _includes/shared.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/* ===== shared house style for cb341.dev + utils =====
Canonical source: cb341.github.io/_includes/shared.css
Published at /assets/shared.css (hot-linked by github.com/cb341/utils).
Site inlines it into base.html via a Liquid include tag.
Tokens + element defaults only — layout containers stay per-project.
Values are the original cb341.dev palette; utils overrides its own
tokens (line/muted/code-bg/…) in its style.css. */

:root {
color-scheme: light; /* keep native form controls light even in OS dark mode */
--bg: #fff;
--fg: #1c1c1a;
--line: #e6e6e2;
--muted: #bbb;
--code-bg: #f1f1ee;
--accent: #3a5a8c; /* used by utils; site links stay browser default */
--accent-bg: #f3f3ef;
--border: var(--line); /* legacy alias used by tool JS */
}

html { overflow-y: scroll; } /* stable scrollbar so width never shifts */
body {
background: var(--bg);
color: var(--fg);
font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, ui-serif, serif;
font-size: 15px;
}

blockquote { margin: 1.2em 2em; font-style: italic; }

hr { border: 0; border-top: 1px solid var(--line); margin: .6em 0; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: .1em .5em; border: 0; text-align: left; }
tr { border-top: 1px solid black; }
@media (max-width: 600px) {
table { display: block; overflow-x: auto; max-width: 100%; }
th, td { min-width: 9rem; }
th:last-child, td:last-child { min-width: 18rem; }
}

code {
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: .88em;
background: var(--code-bg);
padding: 1px 4px;
border-radius: 2px;
}
pre {
overflow-x: auto;
border: 1px dashed var(--line);
padding: 10px 12px;
font-size: .88em;
line-height: 1;
}
pre code { background: transparent; padding: 0; }

abbr[title] { text-decoration: underline dashed; cursor: help; }
Loading
Loading