Skip to content
Merged
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
5 changes: 5 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ defaults:
path: "_posts"
values:
layout: post
toc: true
- scope:
path: "_projects"
values:
toc: true

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

Expand Down
2 changes: 1 addition & 1 deletion _gallery/ao-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ image: "/webp-gallery/ao_test.webp"
alt: "Ambient Occlusion Test"
---

## (WORK IN PROGRESS)
**(WORK IN PROGRESS)**
2 changes: 1 addition & 1 deletion _gallery/blahaj-on-the-road.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ image: "/webp-gallery/blahaj_on_the_road.webp"
alt: "Blahaj Shark on a Road Trip"
---

## (WORK IN PROGRESS)
**(WORK IN PROGRESS)**
2 changes: 1 addition & 1 deletion _gallery/blahaj.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ image: "/webp-gallery/blahaj_fixed.webp"
alt: "Blahaj the Shark"
---

## (WORK IN PROGRESS)
**(WORK IN PROGRESS)**
2 changes: 1 addition & 1 deletion _gallery/cat-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ image: "/webp-gallery/cat_on_laptop_fixed.webp"
alt: "Feline Code Review"
---

## (WORK IN PROGRESS)
**(WORK IN PROGRESS)**
2 changes: 1 addition & 1 deletion _gallery/cube-march.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ image: "/webp-gallery/cube_marcher.webp"
alt: "Cube Marching Algorithm"
---

## (WORK IN PROGRESS)
**(WORK IN PROGRESS)**
2 changes: 1 addition & 1 deletion _gallery/mars-probe-at-uzh.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ alt: "Mars Probe at University of Zurich"
---

A Mars probe exhibit or model at the University of Zurich. Where aerospace engineering meets computer science education.
## (WORK IN PROGRESS)
**(WORK IN PROGRESS)**
2 changes: 1 addition & 1 deletion _gallery/packing-day.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ image: "/webp-gallery/packing_day.webp"
alt: "Packing Day Photo"
---

## (WORK IN PROGRESS)
**(WORK IN PROGRESS)**
2 changes: 1 addition & 1 deletion _gallery/plushies.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ image: "/webp-gallery/plushees_fixed.webp"
alt: "Collection of Plush Toys"
---

## (WORK IN PROGRESS)
**(WORK IN PROGRESS)**
2 changes: 1 addition & 1 deletion _gallery/raymarching-artefacts.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ image: "/webp-gallery/raymarching_artefacts.webp"
alt: "Raymarching Artefacts"
---

## (WORK IN PROGRESS)
**(WORK IN PROGRESS)**
2 changes: 1 addition & 1 deletion _gallery/terrain-edges.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ image: "/webp-gallery/voxel_terrain_edge_detection.webp"
alt: "Voxel Terrain Edge Detection"
---

## (WORK IN PROGRESS)
**(WORK IN PROGRESS)**
2 changes: 1 addition & 1 deletion _gallery/tired-penguin-study.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ alt: "Tired Penguin with Calculator"
---

A tired penguin plushie sitting with a calculator during exam study season. A relatable companion for every student grinding through problem sets.
## (WORK IN PROGRESS)
**(WORK IN PROGRESS)**
2 changes: 1 addition & 1 deletion _gallery/transparency-issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ alt: "Transparency Rendering Issues"
---

Artifacts from transparency rendering - a notoriously tricky problem in real-time graphics. Shows the visual glitches that appear when transparent surfaces aren't sorted correctly.
## (WORK IN PROGRESS)
**(WORK IN PROGRESS)**
2 changes: 1 addition & 1 deletion _gallery/voxel-distance-map.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ image: "/webp-gallery/voxel_raymarching_distance_map.webp"
alt: "Voxel Raymarching Distance Map"
---

## (WORK IN PROGRESS)
**(WORK IN PROGRESS)**
25 changes: 25 additions & 0 deletions _layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,30 @@
}
pre code { background: transparent; padding: 0; }
main :is(h2,h3,h4,h5,h6)[id] > a { text-decoration: none; }
{% if page.toc %}
.article-toc { display: none; }
@media (min-width: 1120px) {
.article-toc {
display: block;
position: fixed;
top: 36px;
left: calc(50% + 33.5ch + 24px);
width: 220px;
max-height: calc(100vh - 72px);
overflow: auto;
font-size: 15px;
line-height: 1.45;
}
.article-toc-title,
.article-toc ol { font-size: 12px; }
.article-toc-title { font-weight: bold; }
.article-toc ol { margin: 0; padding: 0; list-style: none; }
.article-toc li { margin: .5em 0; }
.article-toc li:not([data-level="2"]) { padding-left: 1em; }
.toc-teaser { display: block; margin-left: 1em; }
}
@media print { .article-toc { display: none !important; } }
{% endif %}
@media (prefers-color-scheme: dark) {
html { color-scheme: dark; background: #000; }
body { background: #000; color: #fff; }
Expand Down Expand Up @@ -291,6 +315,7 @@
</header>

<main id="main-content" role="main">
{% if page.toc %}{{ content | table_of_contents }}{% endif %}
{{ content }}
<nav role="navigation" aria-label="Post navigation">
<hr>
Expand Down
35 changes: 35 additions & 0 deletions _plugins/table_of_contents.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
require "cgi"

module TableOfContents
HEADING = /<h([2-6])\b([^>]*)>(.*?)<\/h\1>/im
ID = /\s+id\s*=\s*(["'])(.*?)\1/m
TEASER = /\s+data-toc-teaser\s*=\s*(["'])(.*?)\1/m

def table_of_contents(html)
items = html.to_s.scan(HEADING).filter_map do |level, attributes, body|
id = attributes.match(ID)&.captures&.last
next unless id

label = CGI.unescapeHTML(body.gsub(/<[^>]*>/m, "")).strip
next if label.empty?

teaser = attributes.match(TEASER)&.captures&.last
link = %(<a href="##{CGI.escapeHTML(CGI.unescapeHTML(id))}">#{CGI.escapeHTML(label)}</a>)
text = teaser && !teaser.empty? ? %(#{link}<span class="toc-teaser">#{CGI.escapeHTML(CGI.unescapeHTML(teaser))}...</span>) : link

%(<li data-level="#{level}">#{text}</li>)
end
return "" if items.empty?

<<~HTML
<nav class="article-toc" aria-label="Table of contents">
<div class="article-toc-title">On this page</div>
<ol>
#{items.join("\n ")}
</ol>
</nav>
HTML
end
end

Liquid::Template.register_filter(TableOfContents)
2 changes: 1 addition & 1 deletion _threads/2026-04-10.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ seems like my physical health has finally caught up to my mental health. having

dug a bit into philosophers this week, mainly Socrates, Nietzsche, Singer. first time actually engaging with them. these are rough impressions, not (yet) positions.

### Thoughts
**Thoughts**

* starting to think knowledge might be one of the more honest ways to spend time
* been looking into nihilism for a while now, still seems like one of the more honest ways to look at things
Expand Down
1 change: 1 addition & 0 deletions pages/how-to-apporach.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: "How To Approach Dani"
description: "Communication defaults for less guessing."
permalink: /how-to-approach/
toc: true
---

# How To Approach Dani
Expand Down
31 changes: 8 additions & 23 deletions pages/threads.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ title: "Threads"
description: "Conversations, thoughts, half-ideas, things I am starting to explore."
permalink: /threads/
math: true
toc: true
---

# Threads
Expand All @@ -12,31 +13,15 @@ Conversations, thoughts, half-ideas, things I am starting to explore.
{% assign feedback_form = "https://docs.google.com/forms/d/e/1FAIpQLSeRD0Q9wYYZelAkRXEu2cCFN89-cvoAfOtyTY9vaz9-FUvYXQ/viewform?usp=pp_url&entry.2083454847=" %}
{% assign entries = site.threads | sort: "date" | reverse %}

<style>
.threads-toc { font-size: .9em; }
.threads-toc ul { list-style: none; padding-left: 1em; margin: .3em 0 .8em; }
</style>

{% assign months = entries | group_by_exp: "entry", "entry.date | date: '%B %Y'" %}
<nav class="threads-toc" aria-label="Entry index">
{%- for month in months %}
<b>{{ month.name }}</b>
<ul>
{%- for entry in month.items %}
{%- assign slug = entry.title | replace: ".", "" | slugify %}
{%- assign teaser = entry.content | strip_html | normalize_whitespace | truncatewords: 9, "" %}
{%- assign last_char = teaser | slice: -1, 1 %}
{%- if last_char == "." or last_char == "," or last_char == ";" or last_char == ":" %}
{%- assign trimmed_length = teaser | size | minus: 1 %}
{%- assign teaser = teaser | slice: 0, trimmed_length %}
{%- endif %}
<li><a href="#{{ slug }}" title="{{ entry.title }}">{{ entry.date | date: "%d" }}</a> {{ teaser | escape }}...</li>
{%- endfor %}
</ul>
{%- endfor %}
</nav>
{% for entry in entries %}
{% assign teaser = entry.content | strip_html | normalize_whitespace | truncatewords: 9, "" %}
{% assign last_char = teaser | slice: -1, 1 %}
{% if last_char == "." or last_char == "," or last_char == ";" or last_char == ":" %}
{% assign trimmed_length = teaser | size | minus: 1 %}
{% assign teaser = teaser | slice: 0, trimmed_length %}
{% endif %}
## {{ entry.title }}
{: data-toc-teaser="{{ teaser | escape }}" }

{::nomarkdown}
{{ entry.content }}
Expand Down
1 change: 1 addition & 0 deletions pages/til.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: "Today I Learned"
permalink: /til/
toc: true
---

# Today I Learned (TIL)
Expand Down
Loading