refactor button elements; change button types for search and filter actions in admin pages

This commit is contained in:
ImBenji 2026-04-23 23:24:36 +01:00
parent 194442ec4c
commit 0dd258bd1d
6 changed files with 16 additions and 12 deletions

View file

@ -95,26 +95,27 @@ header.app-header h1 span {
/* ── stats bar ── */
/* each .stat owns its own horizontal padding so the vertical separator
renders edge-to-edge; no margin gap between cells. */
.stats-bar {
display: flex;
gap: 0;
background: var(--bg-card);
border-bottom: 1px solid var(--border);
padding: 0 24px;
flex-wrap: wrap;
}
.stat {
display: flex;
flex-direction: column;
gap: 3px;
padding: 14px 28px 14px 0;
margin-right: 28px;
justify-content: center;
gap: 4px;
padding: 16px 32px;
border-right: 1px solid var(--border);
padding-right: 28px;
flex: 0 0 auto;
}
.stat:first-child { padding-left: 24px; }
.stat:last-child { border-right: none; }
.stat .label {

View file

@ -44,7 +44,7 @@
</label>
<label>From <input type="date" id="f-from" /></label>
<label>To <input type="date" id="f-to" /></label>
<button class="primary" id="searchBtn" style="align-self:flex-end">Search</button>
<button type="button" class="primary" id="searchBtn" style="align-self:flex-end">Search</button>
</div>
<div class="table-wrap">

View file

@ -43,7 +43,7 @@
<option value="articles_asc">Fewest articles</option>
</select>
</label>
<button class="primary" id="eSearchBtn" style="align-self:flex-end">Filter</button>
<button type="button" class="primary" id="eSearchBtn" style="align-self:flex-end">Filter</button>
</div>
<div class="table-wrap">

View file

@ -56,7 +56,7 @@
<option value="event_date">By event date</option>
</select>
</label>
<button class="primary" id="i-filter-btn" style="align-self:flex-end">Filter</button>
<button type="button" class="primary" id="i-filter-btn" style="align-self:flex-end">Filter</button>
</div>
<div class="table-wrap">

View file

@ -48,7 +48,7 @@
<option value="event_date">By event date</option>
</select>
</label>
<button class="primary" id="i-filter-btn" style="align-self:flex-end">Filter</button>
<button type="button" class="primary" id="i-filter-btn" style="align-self:flex-end">Filter</button>
</div>
<div class="table-wrap">

View file

@ -78,11 +78,14 @@ async function adminRoutes(fastify) {
});
// static assets (css + js) under /admin/assets/*
// use must-revalidate so the browser always checks for a newer copy;
// prevents the admin getting stuck on old js after a deploy.
fastify.register(fastifyStatic, {
root: assetsDir,
prefix: '/admin/assets/',
decorateReply: false,
cacheControl: false,
cacheControl: true,
maxAge: 0,
});
// top-level entry — redirect to articles