quash: query parameters for just, has, and do, and some general simplification

This commit is contained in:
Lewis Wynne 2026-03-26 02:25:50 +00:00
parent f2f4e2e704
commit 4720d408f4
14 changed files with 156 additions and 164 deletions

View file

@ -5,17 +5,25 @@ interface Props {
title: string;
showHeader?: boolean;
isHome?: boolean;
urls?: string[];
}
const { title, showHeader = true, isHome = false } = Astro.props;
const { title, showHeader = true, isHome = false, urls = [] } = Astro.props;
---
<!DOCTYPE html>
<html>
<head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>{title}</title><link rel="alternate" type="application/rss+xml" title="wynne.rs" href="/feed.xml" /></head>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{title}</title>
<link rel="alternate" type="application/rss+xml" title="wynne.rs" href="/feed.xml" />
{urls.length > 0 && <script is:inline define:vars={{ urls }}>window.__urls = urls;</script>}
<script is:inline src="/js/params.js"></script>
</head>
<body>
{showHeader && (
<header>
<pre>{isHome ? 'lewis m.w.' : <a href="/">lewis m.w.</a>} <a href="mailto:lewis@wynne.rs">mail</a> <a href="https://github.com/llywelwyn">gh</a> <a href="/feed.xml">rss</a> <a href="/sitemap.txt">sitemap</a> <a href="/random">random</a></pre>
<pre>{isHome ? <Fragment><span class="home-name">lewis m.w.</span><a class="home-name-link" href="/">lewis m.w.</a></Fragment> : <a href="/">lewis m.w.</a>} <a href="mailto:lewis@wynne.rs">mail</a> <a href="https://github.com/llywelwyn">gh</a> <a href="/feed.xml">rss</a> <a href="/sitemap.txt">sitemap</a> <a href="/?do=random">random</a></pre>
</header>
)}
<slot />