projects

saturn

My website

feat: add likes

daniel daum committed parent 82212d1 commit 7889e35Signed, not verified

SignedGitea couldn't verify the signature.

Showing 15 changed files with 640 additions and 1 deletion.

.gitignore +4 −0
@@ -4,3 +4,7 @@4455# deploy staging66dist/78# wrangler (local d1 + secrets)9.wrangler/10.dev.vars
_routes.jsonadded +5 −0
@@ -0,0 +1,5 @@1{2    "version": 1,3    "include": ["/about/*", "/now/*", "/blog/*", "/api/*"],4    "exclude": []5}
about/index.html +4 −0
@@ -124,6 +124,10 @@124124125125126126            </section>127128            <footer class="post-likes" id="likes" data-likes>129                <p class="meta">likes unavailable</p>130            </footer>127131        </article>128132129133        <nav class="pager" aria-label="post navigation">
functions/_lib/likes.jsadded +30 −0
@@ -0,0 +1,30 @@1// shared by _middleware.js and api/like.js23// pages that can carry likes: /about/, /now/, /now/<slug>/, /blog/<slug>/.4// never /blog/ itself5export function isLikeable(pathname) {6    return /^\/(about|now)\/$|^\/(blog|now)\/[a-z0-9-]+\/$/.test(pathname);7}89// one like per visitor per post per day, without cookies or stored ips:10// a keyed hash of ip + browser + today's date. it can't be reversed, and it11// stops matching at utc midnight.12export async function voterId(secret, request) {13    if (!secret) {14        throw new Error("SOCIAL_SECRET is not set");15    }16    const ip = request.headers.get("CF-Connecting-IP") || "";17    const ua = request.headers.get("User-Agent") || "";18    const day = new Date().toISOString().slice(0, 10);1920    const enc = new TextEncoder();21    const key = await crypto.subtle.importKey(22        "raw",23        enc.encode(secret),24        { name: "HMAC", hash: "SHA-256" },25        false,26        ["sign"]27    );28    const sig = await crypto.subtle.sign("HMAC", key, enc.encode(`${ip}|${ua}|${day}`));29    return [...new Uint8Array(sig)].map((b) => b.toString(16).padStart(2, "0")).join("");30}
functions/_middleware.jsadded +81 −0
@@ -0,0 +1,81 @@1// runs in front of /about/, /now/*, /blog/* and /api/* (see _routes.json).2// on likeable pages it reads the like count from d1 and writes the like3// button into the page's [data-likes] placeholder. if anything fails, the4// page is served untouched with its fallback text.56import { isLikeable, voterId } from "./_lib/likes.js";78export async function onRequest(context) {9    const { request, env } = context;10    const { pathname } = new URL(request.url);11    if (!isLikeable(pathname)) {12        return context.next();13    }1415    // drop conditional headers: the static file never changes, so the asset16    // server would answer 304 and the browser would show a stale count17    const fresh = new Request(request);18    fresh.headers.delete("If-None-Match");19    fresh.headers.delete("If-Modified-Since");20    const response = await context.next(fresh);2122    if (!(response.headers.get("content-type") || "").includes("text/html")) {23        return response;24    }2526    let voter;27    try {28        voter = await voterId(env.SOCIAL_SECRET, request);29    } catch {30        return response;31    }3233    const page = new HTMLRewriter()34        .on("[data-likes]", {35            async element(el) {36                // the placeholder can name another page's count, e.g. /now/37                // shares /now/sep-2026/'s. empty means this page.38                const key = el.getAttribute("data-likes") || pathname;39                if (!isLikeable(key)) {40                    return;41                }42                try {43                    const [count, liked] = await env.DB.batch([44                        env.DB.prepare("SELECT count FROM Likes WHERE page = ?").bind(key),45                        env.DB.prepare("SELECT 1 FROM LikeVoters WHERE page = ? AND voter = ?").bind(key, voter),46                    ]);47                    const likes = {48                        count: Number(count.results[0]?.count ?? 0),49                        liked: liked.results.length > 0,50                    };51                    el.setInnerContent(renderLikes(key, likes), { html: true });52                } catch {53                    // leave the fallback text54                }55            },56        })57        .transform(response);5859    // the count is per visitor and changes on submit, so the back button60    // must not show a cached copy61    const out = new Response(page.body, page);62    out.headers.set("Cache-Control", "private, no-cache");63    out.headers.delete("ETag");64    return out;65}6667// key already passed isLikeable(), so it is [a-z0-9-/] only and safe to68// write into the page as-is69function renderLikes(key, { count, liked }) {70    const noun = count === 1 ? "like" : "likes";71    const label = liked ? `you liked this post, ${count} ${noun}` : `like this post, ${count} ${noun}`;72    const state = liked ? ` disabled aria-pressed="true"` : "";73    return `<form class="like-form" method="POST" action="/api/like">74    <input type="hidden" name="path" value="${key}" />75    <button type="submit" class="like-button" aria-label="${label}"${state}>${HEART} ${count}</button>76</form>`;77}7879// outline by default, filled once liked (see .like-icon in global.css).80// path from feather icons, mit81const HEART = `<svg class="like-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" /></svg>`;
functions/api/like.jsadded +55 −0
@@ -0,0 +1,55 @@1// POST /api/like: records one like and sends the visitor back to the post.2// there is no GET handler on purpose, so crawlers and link prefetchers can3// never add a like.45import { isLikeable, voterId } from "../_lib/likes.js";67// voter rows only matter for the day they were made; keep two days so the8// purge never races utc midnight9const VOTER_TTL_MS = 2 * 24 * 60 * 60 * 1000;1011export async function onRequestPost(context) {12    const { request, env } = context;1314    let path;15    try {16        path = (await request.formData()).get("path");17    } catch {18        return plain("bad request", 400);19    }20    if (typeof path !== "string" || !isLikeable(path)) {21        return plain("bad request", 400);22    }2324    // no counter rows for pages that don't exist25    const { origin } = new URL(request.url);26    const exists = await env.ASSETS.fetch(new Request(origin + path));27    if (exists.status !== 200) {28        return plain("not found", 404);29    }3031    const now = new Date();32    const voter = await voterId(env.SOCIAL_SECRET, request);33    const cutoff = new Date(now.getTime() - VOTER_TTL_MS).toISOString();3435    const [inserted] = await env.DB.batch([36        env.DB37            .prepare("INSERT OR IGNORE INTO LikeVoters (page, voter, created_at) VALUES (?, ?, ?)")38            .bind(path, voter, now.toISOString()),39        env.DB.prepare("DELETE FROM LikeVoters WHERE created_at < ?").bind(cutoff),40    ]);4142    // a repeat like today is a silent no-op43    if (inserted.meta.changes === 1) {44        await env.DB45            .prepare("INSERT INTO Likes (page, count) VALUES (?, 1) ON CONFLICT(page) DO UPDATE SET count = count + 1")46            .bind(path)47            .run();48    }4950    return new Response(null, { status: 303, headers: { Location: path + "#likes" } });51}5253function plain(body, status) {54    return new Response(body, { status, headers: { "Content-Type": "text/plain; charset=utf-8" } });55}
global.css +78 −1
@@ -154,6 +154,7 @@ html {154154155155    /* dark theme (default) */156156    --background-dark: #141e15;157    --surface: #18231a;157158    --borders: #2e322e;158159    --text-headings: #f3f3ed;159160    --text-body: #c9ccbf;@@ -174,7 +175,7 @@ html {174175/*============================*/175176176177body {177    max-width: 72ch;178    max-width: 78ch;178179    min-height: 100vh;179180    min-height: 100svh;180181@@ -572,6 +573,19 @@ nav p {572573    letter-spacing: 0.06em;573574}574575576/* posts: bordered panel */577article:has(> .page-header--post) {578    padding: 1.25rem 1.5rem;579    background: var(--surface);580    border: 1px solid var(--borders);581}582583@media (max-width: 480px) {584    article:has(> .page-header--post) {585        padding: 1rem;586    }587}588575589/*============================*/576590/* components - meta line */577591/*============================*/@@ -639,6 +653,69 @@ nav p {639653    padding: 0;640654}641655656/*============================*/657/* components - likes */658/*============================*/659660/* filled in by functions/_middleware.js. right-aligned under a dashed661   rule; the comments heading will sit on its left */662.post-likes {663    display: flex;664    justify-content: flex-end;665    margin-top: 3rem;666    padding-top: 1.25rem;667    border-top: 1px dashed var(--borders);668}669670.post-likes .meta {671    margin: 0;672}673674.like-form {675    margin: 0;676}677678.like-button {679    display: inline-flex;680    align-items: center;681    gap: 0.4rem;682    padding: 0.3rem 0.75rem;683    border: 1px solid var(--borders);684    background: none;685    color: var(--text-secondary);686    font-size: 0.85rem;687    letter-spacing: 0.06em;688    cursor: pointer;689    transition:690        color 150ms ease,691        border-color 150ms ease;692}693694.like-button:hover {695    color: var(--accent);696    border-color: var(--accent);697}698699/* already liked today: a state, not an error */700.like-button:disabled {701    color: var(--accent);702    border-color: var(--borders);703    cursor: default;704}705706.like-icon {707    width: 0.95em;708    height: 0.95em;709    fill: none;710    stroke: currentColor;711    stroke-width: 2;712    stroke-linejoin: round;713}714715.like-button:disabled .like-icon {716    fill: currentColor;717}718642719/*============================*/643720/* components - pager */644721/*============================*/
internal/social/index.htmladded +342 −0
@@ -0,0 +1,342 @@1<!doctype html>2<html lang="en">34<head>5    <meta charset="UTF-8" />6    <meta name="viewport" content="width=device-width, initial-scale=1.0" />7    <meta name="description" content="daniel daum's now page - oakland based software engineer" />8    <meta http-equiv="Content-Security-Policy"9        content="default-src 'self'; style-src 'self' 'unsafe-inline'; font-src 'self'; img-src 'self' https://assets.danieldaum.net; media-src 'self' https://assets.danieldaum.net;" />10    <meta name="referrer" content="strict-origin-when-cross-origin" />11    <link rel="preload" href="/assets/fonts/ioskeleymono/IoskeleyMono-Regular.woff2" as="font" type="font/woff2" crossorigin />12    <link rel="preload" href="/assets/fonts/ioskeleymono/IoskeleyMono-Bold.woff2" as="font" type="font/woff2" crossorigin />13    <link rel="preload" href="/assets/fonts/ioskeleymono/IoskeleyMono-SemiBold.woff2" as="font" type="font/woff2" crossorigin />14    <link rel="preconnect" href="https://assets.danieldaum.net" />15    <link rel="stylesheet" href="/global.css" />16    <link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon/favicon-32x32.png" />17    <link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon/favicon-16x16.png" />18    <link rel="apple-touch-icon" sizes="180x180" href="/assets/favicon/apple-touch-icon.png" />19    <link rel="manifest" href="/assets/favicon/site.webmanifest" />20    <link rel="alternate" type="application/atom+xml" title="daniel daum" href="https://danieldaum.net/feed.xml" />21    <meta name="robots" content="noindex" />22    <title>daniel daum - now</title>2324    <meta property="og:type" content="website" />25    <meta property="og:site_name" content="daniel daum" />26    <meta property="og:title" content="daniel daum - now" />27    <meta property="og:description" content="daniel daum's now page - oakland based software engineer" />28    <meta property="og:url" content="https://danieldaum.net/now/sep-2026/" />29    <meta property="og:image" content="https://assets.danieldaum.net/img/misc/og.jpg" />30    <meta property="og:image:type" content="image/jpeg" />31    <meta property="og:image:width" content="1200" />32    <meta property="og:image:height" content="630" />33    <meta property="og:image:alt" content="daniel daum - software engineer, avid reader, aspiring game dev - danieldaum.net" />3435    <meta name="twitter:card" content="summary_large_image" />36    <meta name="twitter:title" content="daniel daum - now" />37    <meta name="twitter:description" content="daniel daum's now page - oakland based software engineer" />38    <meta name="twitter:image" content="https://assets.danieldaum.net/img/misc/og.jpg" />39    <meta name="twitter:image:alt" content="daniel daum - software engineer, avid reader, aspiring game dev - danieldaum.net" />40    <style>41        /* mock only: likes + comments inside the post panel */42        .post-social {43            margin-top: 3rem;44            padding-top: 1.25rem;45            border-top: 1px dashed var(--borders);46        }474849        .social-head {50            display: flex;51            justify-content: space-between;52            align-items: center;53            gap: 1rem;54            margin-bottom: 0.5rem;55        }5657        .social-title {58            margin: 0;59            font-size: 0.78rem;60            font-weight: 600;61            letter-spacing: 0.12em;62            text-transform: uppercase;63            color: var(--accent);64        }6566        .reply-thread {67            list-style: none;68            margin: 0;69            padding: 0;70        }7172        .reply-thread li {73            margin: 0;74        }7576        .reply-thread .reply-thread {77            margin-top: 0.25rem;78            padding-left: 1rem;79            border-left: 1px solid var(--borders);80        }8182        .reply {83            padding: 1rem 0;84        }8586        .reply-thread > li + li > .reply {87            border-top: 1px solid var(--borders);88        }8990        .reply .meta {91            display: flex;92            flex-wrap: wrap;93            gap: 0.25rem 0.75rem;94            margin: 0 0 0.5rem;95            font-size: 0.78rem;96            letter-spacing: 0.04em;97        }9899        .reply-name {100            color: var(--text-headings);101            font-weight: 600;102        }103104        .reply-author {105            padding: 0 0.35rem;106            border: 1px solid var(--borders);107            font-size: 0.7rem;108            letter-spacing: 0.08em;109            text-transform: uppercase;110            color: var(--accent);111        }112113        .reply-time {114            color: var(--text-secondary);115            text-transform: uppercase;116        }117118        .reply-body {119            margin: 0 0 0.5rem;120        }121122        .reply-link {123            font-size: 0.75rem;124            letter-spacing: 0.08em;125            text-transform: uppercase;126        }127128        .social-foot {129            display: flex;130            flex-wrap: wrap;131            justify-content: space-between;132            align-items: baseline;133            gap: 0.5rem 1rem;134            margin-top: 0.75rem;135            padding-top: 1rem;136            border-top: 1px solid var(--borders);137        }138139        .social-foot .meta {140            margin: 0;141            font-size: 0.75rem;142        }143    </style>144</head>145146<body>147    <a class="skip-link" href="#main">skip to content</a>148149    <!-- ===== HEADER ===== -->150    <header class="site-header">151        <a class="site-name" href="/">Daniel Daum</a>152        <nav aria-label="main navigation">153            <a href="/">home</a>154            <a href="/about/">about</a>155            <a href="/now/">now</a>156            <a href="/blog/">blog</a>157            <a href="/projects/">projects</a>158            <a href="/garden/">garden</a>159        </nav>160    </header>161162    <!-- ===== MAIN ===== -->163    <main id="main">164        <article>165            <header class="page-header page-header--post">166                <p class="page-header-kicker"><span aria-hidden="true">/</span>blog</p>167                <h1>Wake Me Up When September Ends</h1>168                <p class="meta caps"><time datetime="2026-09-03">3 September 2026</time></p>169            </header>170171            <section>172173                <blockquote>174                    This page highlights what I've been doing recently. It updates on occasion, so check back every now and175                    then, if you'd like. This is the september 2026 edition, 8 months on from my first update in <a176                        href="/now/jan-2026/">January</a>. The most current update can be found <a href="/now/">here</a>.177178                </blockquote>179180181                <h3>College</h3>182                <p>183                    This year, I finished the spring and summer semesters at Laney, a community college in Oakland, and I’m184                    starting the fall semester. I’m taking Discrete Mathematics, Data Structures and Algorithms, and a185                    history class—nothing too exciting. What’s exciting is that next spring will be my final semester at186                    community college before I transfer! I’m currently applying to transfer to a four-year university. My187                    hope is to transfer to UC Santa Cruz for a B.S. in Computer Science. It’s also internship application188                    season, so I’m hoping to pick up a summer software engineering internship next summer (if you know of189                    any, please reach out!).190                </p>191192                <h3>Coffee</h3>193                <p>194                    I recently started getting into coffee. I’ve been making espresso at home and got addicted. I didn’t195                    understand the coffee cult until recently, but drinking a warm espresso while reading the morning news196                    on the balcony brings me so much joy each morning. I found a local coffee shop nearby called <a197                        href="https://mothertongue.coffee">Mother Tongue</a>. They have great beans, and it’s women-owned!198                </p>199                <h3>Running</h3>200                <p>201                    I decided, for some reason, that I wanted to run a half marathon, so I’ve started training for it. yay.202                </p>203204                <h3>Gaming</h3>205                <p>206                    I’ve had less time for gaming lately. I recently finished the 2D platformer <a207                        href="https://playreplaced.com">REPLACED</a> <a class="rating rating--good" href="/ratings/"208                        aria-label="rated 3 out of 5, see my rating scale">(3/5)</a>. It’s209                    absolutely gorgeous and perfect for the Steam Deck. I was originally planning to play <a210                        href="https://www.alanwake.com">Alan Wake 2</a>, but211                    I’ve decided to wait for Spooky Season to really dive into it! If I have time I hope to also finally get212                    to the <a href="https://store.steampowered.com/app/1693980/Dead_Space/">Dead Space</a> Remake.213                </p>214215                <h3>Reading</h3>216                <p>217                    I wish I had more positive notes here. I recently finished <a218                        href="https://www.goodreads.com/book/show/10374.Hard_boiled_Wonderland_and_the_End_of_the_World">Hard-Boiled219                        Wonderland and the End220                        of the221                        World</a> <a class="rating rating--below-average" href="/ratings/"222                        aria-label="rated 2 out of 5, see my rating scale">(2/5)</a> by Haruki Murakami, <a223                        href="https://www.goodreads.com/en/book/show/48037.Carmilla">Carmilla</a> <a224                        class="rating rating--below-average" href="/ratings/"225                        aria-label="rated 2 out of 5, see my rating scale">(2/5)</a> by226                    Sheridan Le Fanu, and <a227                        href="https://www.goodreads.com/en/book/show/50659468-a-court-of-mist-and-fury">A Court of Mist and228                        Fury</a> <a class="rating rating--below-average" href="/ratings/"229                        aria-label="rated 2 out of 5, see my rating scale">(2/5)</a>230                    by231                    Sarah J. Maas. Nothing great to report here, so232                    on to the next one -> <a233                        href="https://www.goodreads.com/book/show/211721806-dungeon-crawler-carl">Dungeon Crawler Carl</a>234                </p>235                <h3>Listening</h3>236                <p>237                    <a href="https://music.apple.com/us/album/wor%24t-girl-in-america/1867530577">WOR$T GIRL IN AMERICA</a>238                    <a class="rating rating--great" href="/ratings/"239                        aria-label="rated 5 out of 5, see my rating scale">(5/5)</a>240                    (Pop) from Slayyyter is amazing and perfect. It feels241                    like this album was made specifically for242                    me, and I’m so excited to see her live in concert soon!243                </p>244                <p>245                    I’m also enjoying <a href="https://music.apple.com/us/album/navy-blue-ep/1845170440">Navy Blue</a> <a246                        class="rating rating--above-average" href="/ratings/"247                        aria-label="rated 4 out of 5, see my rating scale">(4/5)</a>248                    (alternative) by Porch Light, who will be releasing a new249                    album, <em>Hush</em>, later this month.250                </p>251252                <h3>Watching</h3>253                <p>254                    If you’re into comedy or horror, I can’t recommend <a255                        href="https://tv.apple.com/us/show/widows-bay/umc.cmc.1zzly0vah46bnvnwf0qkrjhh2">Widows256                        Bay</a> <a class="rating rating--great" href="/ratings/"257                        aria-label="rated 5 out of 5, see my rating scale">(5/5)</a> enough. It’s fantastic.258                </p>259260                <h3>This site</h3>261                <p>262                    I finally decided to put more effort into this site, so expect to see more frequent updates and changes263                    in the near future! Come back soon264                </p>265            </section>266267            <section class="post-social" id="comments" aria-label="comments">268                <div class="social-head">269                    <h2 class="social-title">3 comments</h2>270                    <form class="like-form" id="likes">271                        <button type="button" class="like-button" aria-label="like this post, 12 likes"><svg class="like-icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z" /></svg> 12</button>272                    </form>273                </div>274275                <ol class="reply-thread">276                    <li>277                        <article class="reply" id="reply-1">278                            <p class="meta">279                                <span class="reply-name">sam</span>280                                <a class="reply-time" href="#reply-1"><time datetime="2026-09-04T09:12:00-07:00">4 Sep 2026 &middot; 09:12</time></a>281                            </p>282                            <p class="reply-body">Good luck with the UCSC application! Mother Tongue is great, the cortado is worth the walk.</p>283                            <a class="reply-link" href="mailto:reply@replies.danieldaum.net?subject=re:%20https://danieldaum.net/blog/wake-me-up-when-september-ends/%23reply-1">reply &rarr;</a>284285                            <ol class="reply-thread">286                                <li>287                                    <article class="reply" id="reply-2">288                                        <p class="meta">289                                            <span class="reply-name">daniel</span>290                                            <span class="reply-author">author</span>291                                            <a class="reply-time" href="#reply-2"><time datetime="2026-09-04T18:40:00-07:00">4 Sep 2026 &middot; 18:40</time></a>292                                        </p>293                                        <p class="reply-body">Thank you! Adding the cortado to the list.</p>294                                        <a class="reply-link" href="mailto:reply@replies.danieldaum.net?subject=re:%20https://danieldaum.net/blog/wake-me-up-when-september-ends/%23reply-2">reply &rarr;</a>295                                    </article>296                                </li>297                            </ol>298                        </article>299                    </li>300                    <li>301                        <article class="reply" id="reply-3">302                            <p class="meta">303                                <span class="reply-name">alex</span>304                                <a class="reply-time" href="#reply-3"><time datetime="2026-09-06T21:03:00-07:00">6 Sep 2026 &middot; 21:03</time></a>305                            </p>306                            <p class="reply-body">Hard agree on Hard-Boiled Wonderland. Half of it is incredible and the other half I still don't understand.</p>307                            <a class="reply-link" href="mailto:reply@replies.danieldaum.net?subject=re:%20https://danieldaum.net/blog/wake-me-up-when-september-ends/%23reply-3">reply &rarr;</a>308                        </article>309                    </li>310                </ol>311312                <div class="social-foot">313                    <a class="reply-link" href="mailto:reply@replies.danieldaum.net?subject=re:%20https://danieldaum.net/blog/wake-me-up-when-september-ends/">reply by email &rarr;</a>314                    <p class="meta">replies arrive by email; your address is never shown or stored</p>315                </div>316            </section>317        </article>318319        <nav class="pager" aria-label="post navigation">320            <a class="pager-link pager-prev" href="/about/" rel="prev">321                <span class="pager-label">&larr; previous</span>322                <span class="pager-title">Let Me Introduce Myself</span>323            </a>324        </nav>325    </main>326327    <!-- ===== FOOTER ===== -->328    <footer>329        <nav aria-label="site links">330            <p aria-hidden="true">//</p>331            <a href="mailto:daniel@danieldaum.net">email</a>332            <a href="https://git.danieldaum.net/" aria-label="git (opens in new tab)" target="_blank"333                rel="noopener noreferrer">git</a>334            <a href="/pgp.asc" aria-label="PGP public key (516E97FF)">PGP</a>335            <a href="/changelog/">changelog</a>336            <a href="/privacy/">privacy</a>337            <a href="/feed.xml">feed</a>338        </nav>339    </footer>340</body>341342</html>
internal/template.html +4 −0
@@ -71,6 +71,10 @@7171                    Body copy goes here.7272                </p>7373            </section>7475            <footer class="post-likes" id="likes" data-likes>76                <p class="meta">likes unavailable</p>77            </footer>7478        </article>75797680        <nav class="pager" aria-label="post navigation">
now/index.html +4 −0
@@ -158,6 +158,10 @@158158                    in the near future! Come back soon159159                </p>160160            </section>161162            <footer class="post-likes" id="likes" data-likes="/now/sep-2026/">163                <p class="meta">likes unavailable</p>164            </footer>161165        </article>162166163167        <nav class="pager" aria-label="post navigation">
now/jan-2026/index.html +4 −0
@@ -196,6 +196,10 @@196196                            rel="noopener noreferrer">indika by odd meter</a> <a class="rating rating--good" href="/ratings/" aria-label="rated 3 out of 5, see my rating scale">(3/5)</a></li>197197                </ul>198198            </section>199200            <footer class="post-likes" id="likes" data-likes>201                <p class="meta">likes unavailable</p>202            </footer>199203        </article>200204201205        <nav class="pager" aria-label="post navigation">
now/sep-2026/index.html +4 −0
@@ -158,6 +158,10 @@158158                    in the near future! Come back soon159159                </p>160160            </section>161162            <footer class="post-likes" id="likes" data-likes>163                <p class="meta">likes unavailable</p>164            </footer>161165        </article>162166163167        <nav class="pager" aria-label="post navigation">
privacy/index.html +4 −0
@@ -63,6 +63,10 @@6363        <section>6464            <p>There is no analytics, no tracking, no cookies, and no ads. I don't know who visits this site.</p>656566            <p>If you like a post, I store a count for that page, and a scrambled code made from your IP, browser,67                and the date, so you can't like twice in a day. It can't be turned back into your IP, and it's68                deleted after two days.</p>696670            <p>This site is hosted on Cloudflare Pages, so Cloudflare sees your IP address and the page you asked6771                for. I haven't enabled request logging, so I never see it. Cloudflare's privacy policy is <a6872                    href="https://www.cloudflare.com/privacypolicy/">here</a>.</p>
schema.sqladded +13 −0
@@ -0,0 +1,13 @@1-- likes: one row per post2CREATE TABLE IF NOT EXISTS Likes (3    page TEXT PRIMARY KEY,4    count INTEGER NOT NULL DEFAULT 05);67-- who liked what today: a daily-rotating hash, never an ip or email8CREATE TABLE IF NOT EXISTS LikeVoters (9    page TEXT NOT NULL,10    voter TEXT NOT NULL,11    created_at TEXT NOT NULL,12    PRIMARY KEY (page, voter)13);
wrangler.tomladded +8 −0
@@ -0,0 +1,8 @@1name = "saturn"2pages_build_output_dir = "."3compatibility_date = "2026-09-01"45[[d1_databases]]6binding = "DB"7database_name = "saturn-social"8database_id = "2cc8bddd-d422-4d1e-8480-c1c75c8d02b0"