Claude cleaning

This commit is contained in:
2026-01-16 23:17:05 -05:00
parent 76a1ff19b1
commit 7a28b1dc71
30 changed files with 493 additions and 505 deletions

View File

@@ -1,16 +0,0 @@
{{ define "main" }}
<div class="centered top-fade" style="height:100vh">
<div class="intro-content">
<h1 data-value="command not found" data-show="error-message" class="typewriter"></h1>
<div id="error-message">
<p data-value="Page not found, sorry about that"></p>
</div>
<div class="link-block">
<a href="javascript:history.back()">&lt;--&nbsp;Go back</a>
<p>&nbsp;|&nbsp;</p>
<a href="{{ .Site.BaseURL }}">Home&nbsp;--&gt;</a>
</div>
</div>
</div>
{{ end }}

View File

@@ -1,16 +0,0 @@
{{ define "main" }}
<div class="centered top-fade" style="height:100vh">
<div class="intro-content">
<h1 data-value="kernel panic!" data-show="error-message" class="typewriter"></h1>
<div id="error-message">
<p data-value="Error on our side, my bad"></p>
</div>
<div class="link-block">
<a href="javascript:history.back()">&lt;--&nbsp;Go back</a>
<p>&nbsp;|&nbsp;</p>
<a href="{{ .Site.BaseURL }}">Home&nbsp;--&gt;</a>
</div>
</div>
</div>
{{ end }}

View File

@@ -0,0 +1,5 @@
<h{{ .Level }} id="{{ .Anchor | safeURL }}">
<a href="#{{ .Anchor | safeURL }}" class="heading-anchor">
<span class="anchor-icon">#</span>{{ .Text | safeHTML }}
</a>
</h{{ .Level }}>

View File

@@ -1 +0,0 @@
<center><img src="{{ .Destination }}" title="{{ with .Title }}{{ . }} {{ else }}{{ .Text }}{{ end }}" alt="{{ .Text }}" /></center>

View File

@@ -1 +0,0 @@
<a href="{{ .Destination }}" title="{{ .Title }}" data-value="{{ .Text | safeHTML }}" class="scramble">{{ .Text | safeHTML }}</a>

View File

@@ -0,0 +1,272 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ .Site.Title }}</title>
<link rel="alternate" type="application/rss+xml" title="{{ .Site.Title }}" href="/index.xml">
<style>
:root {
--bg-color: #fff;
--text-color: #333;
--link-color: #0066cc;
--border-color: #ccc;
--secondary-color: #666;
--code-bg: #f4f4f4;
--code-border: #ddd;
}
[data-theme="dark"] {
--bg-color: #1a1a1a;
--text-color: #e0e0e0;
--link-color: #6ba3ff;
--border-color: #444;
--secondary-color: #999;
--code-bg: #2d2d2d;
--code-border: #444;
--shadow: 0 1px 3px rgba(0,0,0,0.4);
}
:root {
--shadow: 0 1px 3px rgba(0,0,0,0.1);
}
html {
scroll-behavior: smooth;
}
body {
font-family: Georgia, serif;
line-height: 1.6;
max-width: 650px;
margin: 40px auto;
padding: 0 20px;
color: var(--text-color);
background: var(--bg-color);
transition: background 0.3s, color 0.3s;
}
a {
color: var(--link-color);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
h1, h2, h3 {
line-height: 1.2;
}
header {
border-bottom: 1px solid var(--border-color);
padding-bottom: 10px;
margin-bottom: 30px;
display: flex;
justify-content: space-between;
align-items: center;
}
header h1 {
margin: 0;
font-size: 24px;
}
.header-right {
display: flex;
gap: 15px;
align-items: center;
}
nav a {
font-size: 14px;
}
.theme-toggle {
background: none;
border: 1px solid var(--border-color);
color: var(--text-color);
cursor: pointer;
padding: 5px 10px;
border-radius: 3px;
font-size: 14px;
}
.theme-toggle:hover {
background: var(--code-bg);
}
footer {
margin-top: 50px;
padding-top: 10px;
border-top: 1px solid var(--border-color);
font-size: 14px;
color: var(--secondary-color);
}
.date {
color: var(--secondary-color);
font-size: 14px;
}
img {
max-width: 100%;
height: auto;
display: block;
}
pre {
background: var(--code-bg);
border: 1px solid var(--code-border);
padding: 10px;
overflow-x: auto;
}
code {
background: var(--code-bg);
padding: 2px 5px;
}
pre code {
background: none;
padding: 0;
}
/* Heading anchors */
.heading-anchor {
color: var(--text-color);
text-decoration: none;
}
.heading-anchor:hover {
text-decoration: none;
}
.anchor-icon {
opacity: 0;
margin-right: 5px;
color: var(--link-color);
transition: opacity 0.2s;
}
.heading-anchor:hover .anchor-icon {
opacity: 1;
}
/* Sidenotes/Margin notes */
/* Hide sidenotes by default (except on single post pages) */
.sidenote-container {
display: none;
}
.post-content .sidenote-container {
display: inline;
}
.sidenote-ref {
color: var(--link-color);
text-decoration: none;
font-size: 0.85em;
vertical-align: super;
line-height: 0;
}
/* Mobile: sidenotes at the end */
@media (max-width: 1199px) {
.post-content .sidenote-container {
display: inline;
}
.post-content .sidenote {
display: none;
}
#footnotes-section {
margin-top: 20px;
}
#footnotes-section .sidenote {
display: block;
position: static;
margin-bottom: 15px;
font-size: 0.85em;
line-height: 1.4;
padding: 10px;
background: var(--code-bg);
border-left: 2px solid var(--link-color);
border-radius: 3px;
box-shadow: var(--shadow);
}
}
/* Desktop: sidenotes in right margin */
@media (min-width: 1200px) {
/* Only expand body width when sidenotes actually exist */
body:has(.sidenote) {
max-width: 1000px;
overflow-x: hidden;
}
.post-content {
position: relative;
}
.post-content .content-wrapper {
max-width: 650px;
position: relative;
}
.post-content .sidenote-container {
position: static;
}
.post-content .sidenote {
position: absolute;
left: 690px;
width: 250px;
font-size: 0.85em;
line-height: 1.4;
padding: 10px;
margin-top: 0;
background: var(--code-bg);
border-left: 2px solid var(--link-color);
border-radius: 3px;
box-shadow: var(--shadow);
}
#footnotes-section {
display: none;
}
#sidenotes-column {
display: none;
}
}
</style>
<script>
// Theme toggle - runs immediately to prevent flash
(function() {
const theme = localStorage.getItem('theme') || 'light';
document.documentElement.setAttribute('data-theme', theme);
})();
</script>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<script>
window.MathJax = {
tex: {
inlineMath: [['$', '$']],
displayMath: [['$$', '$$']],
processEscapes: true
}
};
</script>
</head>
<body>
<header>
<h1><a href="/">{{ .Site.Title }}</a></h1>
<div class="header-right">
<nav>
<a href="/resume.pdf">Resume</a>
</nav>
<button class="theme-toggle" onclick="toggleTheme()" aria-label="Toggle theme">
<span class="theme-icon"></span>
</button>
</div>
</header>
<main>
{{ block "main" . }}{{ end }}
</main>
<footer>
<p>&copy; {{ now.Year }} {{ .Site.Title }} | <a href="/index.xml">RSS</a> | <a href="/me.gpg">PGP Key</a> | <a href="/resume.pdf">Resume</a></p>
</footer>
<script>
function toggleTheme() {
const html = document.documentElement;
const currentTheme = html.getAttribute('data-theme');
const newTheme = currentTheme === 'dark' ? 'light' : 'dark';
html.setAttribute('data-theme', newTheme);
localStorage.setItem('theme', newTheme);
updateThemeIcon();
}
function updateThemeIcon() {
const theme = document.documentElement.getAttribute('data-theme');
const icon = document.querySelector('.theme-icon');
icon.textContent = theme === 'dark' ? '☀️' : '🌙';
}
updateThemeIcon();
</script>
</body>
</html>

View File

@@ -0,0 +1,12 @@
{{ define "main" }}
<h1>{{ .Title }}</h1>
{{ range .Pages }}
<article style="margin-bottom: 25px;">
<h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
<p class="date">{{ .Date.Format "January 2, 2006" }}</p>
</article>
{{ end }}
<p><a href="/">&larr; Back to home</a></p>
{{ end }}

View File

@@ -13,11 +13,11 @@
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Tyler's Posts</title>
<title>{{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }}</title>
<link>{{ .Permalink }}</link>
<description>Silly little posts I make for no one in particular</description>
<generator>Hugo -- gohugo.io</generator>
<language>en</language>{{ with .Site.Author.email }}
<description>Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }}</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
@@ -32,7 +32,7 @@
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{ .Content | html -}}</description>
<description>{{ .Summary | html }}</description>
</item>
{{ end }}
</channel>

View File

@@ -0,0 +1,98 @@
{{ define "main" }}
<article class="post-content">
<div class="content-wrapper">
<h1>{{ .Title }}</h1>
<p class="date">{{ .Date.Format "January 2, 2006" }}</p>
{{ .Content }}
<div id="footnotes-section"></div>
</div>
</article>
<p>
<a href="/">&larr; Back to home</a>
{{ with .OutputFormats.Get "markdown" }}
| <a href="{{ .RelPermalink }}" download>Download Markdown</a>
{{ end }}
</p>
<script>
// On mobile, collect sidenotes and display at the end
let sidenotesOrganized = false;
function positionSidenotes() {
if (window.innerWidth < 1200) return;
const contentWrapper = document.querySelector('.content-wrapper');
if (!contentWrapper) return;
const sidenotes = Array.from(document.querySelectorAll('.sidenote'));
const containers = Array.from(document.querySelectorAll('.sidenote-container'));
// Position each sidenote relative to its reference point
containers.forEach((container, index) => {
const sidenote = container.querySelector('.sidenote');
if (!sidenote) return;
const containerRect = container.getBoundingClientRect();
const wrapperRect = contentWrapper.getBoundingClientRect();
// Calculate position relative to content-wrapper
const topPosition = containerRect.top - wrapperRect.top;
sidenote.style.top = topPosition + 'px';
});
// Now check for overlaps and adjust
for (let i = 0; i < sidenotes.length - 1; i++) {
const current = sidenotes[i];
const next = sidenotes[i + 1];
const currentRect = current.getBoundingClientRect();
const nextRect = next.getBoundingClientRect();
// If next sidenote overlaps with current, push it down
if (nextRect.top < currentRect.bottom + 10) {
const currentTop = parseFloat(current.style.top) || 0;
const currentHeight = currentRect.height;
next.style.top = (currentTop + currentHeight + 10) + 'px';
}
}
}
function organizeSidenotes() {
const sidenotes = document.querySelectorAll('.sidenote');
const footnotesSection = document.getElementById('footnotes-section');
if (!footnotesSection) return;
if (window.innerWidth < 1200) {
// Mobile: show at bottom
if (!sidenotesOrganized) {
footnotesSection.innerHTML = '<hr style="margin-top: 40px; border: none; border-top: 1px solid var(--border-color);"><h3>Notes</h3>';
sidenotes.forEach((sidenote) => {
const clone = sidenote.cloneNode(true);
clone.style.display = 'block';
clone.style.position = 'static';
clone.style.width = 'auto';
clone.style.marginBottom = '15px';
footnotesSection.appendChild(clone);
});
sidenotesOrganized = true;
}
} else {
// Desktop: clear footnotes section and position sidenotes
if (sidenotesOrganized) {
footnotesSection.innerHTML = '';
sidenotesOrganized = false;
}
setTimeout(positionSidenotes, 100);
}
}
organizeSidenotes();
window.addEventListener('resize', organizeSidenotes);
window.addEventListener('load', positionSidenotes);
</script>
{{ end }}

View File

@@ -0,0 +1,7 @@
---
title: "{{ .Title }}"
date: {{ .Date.Format "2006-01-02" }}
{{ if .Draft }}draft: true{{ end }}
---
{{ .RawContent }}

View File

@@ -1,32 +1,17 @@
{{ define "main" }}
<div class="centered top-fade">
<div class="intro-content">
<h1 data-value="Hi, I'm Tyler" data-show="intro-tagline" class="typewriter"></h1>
<div id="intro-tagline">
<p data-value="Software engineer, aspiring polymath"></p>
</div>
</div>
</div>
<div class="homepage-card">
<div>
<h4 data-show="about-description" data-value="uname -a" class="typewriter card-title">~ $&nbsp;</h1>
<br/>
<small>About me</small>
</div>
<div class="about-grid">
<div id="about-description" class="about-description">
{{ range .Site.Data.index.About.Content }}
<p data-value="{{ .value }}"></p>
{{ end }}
</div>
<div class="mini-terminal">
<p data-show="about-interests" data-value="cat interests.txt | less" class="typewriter">~ $&nbsp;</p>
<div id="about-interests" class="terminal-contents">
{{ range .Site.Data.index.About.Interests }}
<p class="terminal-text" data-value="{{ .value }}"></p>
{{ end }}
</div>
</div>
</div>
</div>
{{ .Content }}
<h2>Recent Posts</h2>
{{ range first 10 (where .Site.RegularPages "Type" "posts") }}
<article style="margin-bottom: 30px;">
<h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
<p class="date">{{ .Date.Format "January 2, 2006" }}</p>
{{ if .Summary }}
<p>{{ .Summary }}</p>
{{ end }}
</article>
{{ end }}
<p><a href="/posts/">View all posts &rarr;</a></p>
{{ end }}

View File

@@ -1,21 +0,0 @@
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js"></script>
<script>
MathJax = {
tex: {
displayMath: [['\\[', '\\]'], ['$$', '$$']], // block
inlineMath: [['\\(', '\\)']] // inline
},
macros: {
vect: ["\\boldsymbol{#1}", 1]
},
chtml: {
scale: 1.2
}
};
</script>
<style>
.MathJax, .mjx-math {
color: white;
}
</style>

View File

@@ -0,0 +1,7 @@
{{- $id := .Ordinal -}}
<span class="sidenote-container">
<a href="#sn-{{ $id }}" id="snref-{{ $id }}" class="sidenote-ref">[{{ $id }}]</a>
<span id="sn-{{ $id }}" class="sidenote">
<a href="#snref-{{ $id }}" class="sidenote-ref">[{{ $id }}]</a> {{ .Inner | markdownify }}
</span>
</span>