Add site search (Pagefind)

Client-side index generated after the Hugo build; search box in the
header, results page with a section filter.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YDRjtmAiNpo5mK5N3d7QwZ
This commit is contained in:
2026-10-11 20:31:00 +02:00
co-authored by Claude Opus 5.5
parent 8883befad8
commit fda5359932
17 changed files with 100 additions and 16 deletions
+29
View File
@@ -129,3 +129,32 @@ table { border-collapse: collapse; }
.post-summary p:last-child { margin-bottom: 0; }
.post-banner { display: block; width: 100%; max-height: 420px; object-fit: cover; margin: 0 0 16px; border-radius: 4px; }
@media (max-width: 600px) { .post-summary { grid-template-columns: 1fr; } }
.site-header .search { margin-left: auto; }
.site-header .search input {
width: 180px;
max-width: 100%;
padding: 4px 10px;
border: 1px solid transparent;
border-radius: 14px;
background: rgba(255, 255, 255, 0.12);
color: inherit;
font: inherit;
font-size: 0.9rem;
}
.site-header .search input::placeholder { color: inherit; opacity: 0.6; }
.site-header .search input:focus { outline: none; border-color: var(--accent); background: rgba(255, 255, 255, 0.2); }
/* Pagefind result list, in the site colours */
#search {
--pagefind-ui-primary: var(--accent);
--pagefind-ui-text: var(--text);
--pagefind-ui-background: var(--panel);
--pagefind-ui-border: var(--line);
--pagefind-ui-tag: var(--bg);
--pagefind-ui-border-width: 1px;
--pagefind-ui-border-radius: 4px;
--pagefind-ui-image-border-radius: 2px;
--pagefind-ui-font: inherit;
--pagefind-ui-scale: 0.85;
}
#search mark { background: none; color: inherit; font-weight: 700; }