Commit Graph

1456 Commits

Author SHA1 Message Date
svemagie
49322ee820 update reply post 2026-03-27 19:27:19 +01:00
svemagie
604e695777 create reply post 2026-03-27 19:26:22 +01:00
svemagie
7263614290 fix: sidenote positioning via data-fn-ref, not parentElement
Browsers re-parent <aside> out of <span class="sidenote-host"> when
parsing (block element inside phrasing content is invalid HTML). This
caused s.parentElement to be .e-content instead of .sidenote-host,
so getBoundingClientRect returned .e-content's top for every sidenote.

Fix: add data-fn-ref="fnrefN" to each <aside class="sidenote"> in the
PostHTML transform. JS looks up document.getElementById(data-fn-ref)
to find the .footnote-ref-num span still inside .sidenote-host, then
measures that element's top for correct vertical alignment.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 19:18:25 +01:00
svemagie
9871002232 fix: sidenote JS sets position/overflow directly, uses getBoundingClientRect
Instead of relying on CSS cascade to apply position:relative and overflow
to .e-content/.main-content (which may not fire in time or may be overridden),
the positioning script now sets these inline styles itself. Uses
getBoundingClientRect() subtraction (hRect.top - eRect.top) to measure
position of each .sidenote-host relative to .e-content — viewport-relative
and scroll-invariant. Clears inline styles on resize to < 1440px.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 18:57:36 +01:00
svemagie
8f28ee43ec fix: sidenote positioning uses offsetTop, not getBoundingClientRect
getBoundingClientRect() is viewport-relative; subtracting parent.top was
unreliable depending on scroll position at call time. Switch to
h.offsetTop, which gives distance from .sidenote-host to .e-content's
padding edge directly (because .e-content is position:relative = offsetParent).
Also replace DOMContentLoaded listener (already fired at script injection time)
with requestAnimationFrame for immediate post-paint positioning.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 18:44:42 +01:00
svemagie
0db48ac6fa fix: sidenotes use absolute positioning in page margin, not padding
Replace float+padding-left approach (which narrowed article text) with
position:absolute on each sidenote, placing it to the right of 100% of
.e-content so it paints in the existing left page margin. Text width is
unchanged. Requires viewport ≥ 1440px where the margin is 224px (210px
needed). JS sets each sidenote's top relative to its reference span via
getBoundingClientRect, with 8px overlap prevention.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 18:39:32 +01:00
svemagie
815bf67283 Merge branch 'feat/sidenotes' 2026-03-27 18:17:32 +01:00
svemagie
0b5d5ade37 chore: declare posthtml as explicit devDependency 2026-03-27 18:12:15 +01:00
svemagie
27cfa6ae17 feat: add sidenote CSS (left margin, float-based) 2026-03-27 18:02:39 +01:00
svemagie
cc9bd8794b fix: sidenote repeated-ref labels, orphan guards, tighter scope 2026-03-27 18:00:03 +01:00
svemagie
40ff45aec8 feat: add sidenotes HTML transform (PostHTML)
Adds a PostHTML transform that converts markdown-it-footnote output into
margin sidenotes. Replaces <sup class="footnote-ref"> with a sidenote-host
span containing a numbered inline marker and a floating <aside>. Also adds
has-sidenotes class to the parent <article> when sidenotes are present.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 17:56:01 +01:00
svemagie
ff9246ceea update page post 2026-03-27 10:54:44 +01:00
svemagie
c0d3fc2644 update page post 2026-03-27 10:51:29 +01:00
svemagie
f22c4b099c upload photo file 2026-03-27 09:56:28 +01:00
svemagie
8d694fb00b update bookmark post 2026-03-26 07:00:20 +01:00
svemagie
b66814864a update bookmark post 2026-03-26 06:59:52 +01:00
svemagie
50ef16cddd update bookmark post 2026-03-26 06:59:06 +01:00
svemagie
2c3a788da2 update bookmark post 2026-03-26 06:34:21 +01:00
svemagie
fd0fc3609a create bookmark post 2026-03-26 06:33:10 +01:00
svemagie
bab485d085 feat: more umami 2026-03-25 21:25:58 +01:00
svemagie
5bc5724249 update photo post 2026-03-25 19:49:35 +01:00
svemagie
9fc7e12523 update bookmark post 2026-03-25 19:35:54 +01:00
svemagie
7009b27bf7 create bookmark post 2026-03-25 19:34:38 +01:00
svemagie
882a5ceb6a fix: design of map matching the bright/dark mode 2026-03-25 16:44:17 +01:00
svemagie
97161ff53c fix: where deduplication 2026-03-25 16:40:06 +01:00
svemagie
383100815c fix: currently in 2026-03-25 16:35:35 +01:00
svemagie
d4a9b1565d fix: "home" locations not counted 2026-03-25 16:34:11 +01:00
svemagie
8783d80613 Merge branch 'main' of github.com:svemagie/blog 2026-03-25 16:30:12 +01:00
svemagie
c0ffe769fa fix: "I'm currently in" City 2026-03-25 16:30:09 +01:00
svemagie
6360556597 delete note post 2026-03-25 15:53:21 +01:00
svemagie
04468b303a update note post 2026-03-25 15:51:23 +01:00
svemagie
01e4489f9f create note post 2026-03-25 15:50:19 +01:00
svemagie
b1c5c5691c create note post 2026-03-25 15:38:53 +01:00
svemagie
0514786396 fix: umami proxy 2026-03-25 13:02:47 +01:00
svemagie
c77ba40835 fix: umami host 2026-03-25 12:11:03 +01:00
svemagie
89fbd222f2 feat: add Umami reader-source tracking tags
Classify visitors by referrer into segments (direct, search, fediverse,
bluesky, indieweb, web) via a custom umami.track('reader-source') event.
Add noscript pixels to RSS/JSON feeds so feed-reader activity appears
under virtual /rss/* paths in Umami.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-25 09:04:34 +01:00
svemagie
811a182540 Merge branch 'main' of github.com:svemagie/blog 2026-03-25 08:22:56 +01:00
svemagie
5e5c88c825 feat: umami tracking 2026-03-25 08:22:54 +01:00
svemagie
6ca311d0e7 update page post 2026-03-24 21:06:11 +01:00
svemagie
62a4dfd36f update reply post 2026-03-24 19:53:24 +01:00
svemagie
b02ad1d203 create reply post 2026-03-24 19:42:17 +01:00
svemagie
0378a1b240 update bookmark post 2026-03-24 19:21:21 +01:00
svemagie
8cdb7db8dd create bookmark post 2026-03-24 19:19:47 +01:00
svemagie
d435ce0539 update reply post 2026-03-24 19:10:49 +01:00
svemagie
d56b73807f update reply post 2026-03-24 19:07:32 +01:00
svemagie
6bc41bb59b update reply post 2026-03-24 18:59:59 +01:00
svemagie
5afe023709 create reply post 2026-03-24 18:58:48 +01:00
svemagie
14e75e38aa fix: deduplicate map markers for home cities Murnau and Garmisch
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 17:34:03 +01:00
svemagie
ec00adf11b fix: hide checkin count for home cities Murnau and Garmisch
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 17:30:50 +01:00
svemagie
6e79b947f1 fix: show only city in current location on where page
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 17:23:14 +01:00