refactor button elements; change button types for search and filter actions in admin pages
This commit is contained in:
parent
194442ec4c
commit
0dd258bd1d
6 changed files with 16 additions and 12 deletions
|
|
@ -95,27 +95,28 @@ header.app-header h1 span {
|
||||||
|
|
||||||
|
|
||||||
/* ── stats bar ── */
|
/* ── stats bar ── */
|
||||||
|
/* each .stat owns its own horizontal padding so the vertical separator
|
||||||
|
renders edge-to-edge; no margin gap between cells. */
|
||||||
|
|
||||||
.stats-bar {
|
.stats-bar {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 0;
|
|
||||||
background: var(--bg-card);
|
background: var(--bg-card);
|
||||||
border-bottom: 1px solid var(--border);
|
border-bottom: 1px solid var(--border);
|
||||||
padding: 0 24px;
|
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stat {
|
.stat {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 3px;
|
justify-content: center;
|
||||||
padding: 14px 28px 14px 0;
|
gap: 4px;
|
||||||
margin-right: 28px;
|
padding: 16px 32px;
|
||||||
border-right: 1px solid var(--border);
|
border-right: 1px solid var(--border);
|
||||||
padding-right: 28px;
|
flex: 0 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.stat:last-child { border-right: none; }
|
.stat:first-child { padding-left: 24px; }
|
||||||
|
.stat:last-child { border-right: none; }
|
||||||
|
|
||||||
.stat .label {
|
.stat .label {
|
||||||
color: var(--muted-dark);
|
color: var(--muted-dark);
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
</label>
|
</label>
|
||||||
<label>From <input type="date" id="f-from" /></label>
|
<label>From <input type="date" id="f-from" /></label>
|
||||||
<label>To <input type="date" id="f-to" /></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>
|
||||||
|
|
||||||
<div class="table-wrap">
|
<div class="table-wrap">
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
<option value="articles_asc">Fewest articles</option>
|
<option value="articles_asc">Fewest articles</option>
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</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>
|
||||||
|
|
||||||
<div class="table-wrap">
|
<div class="table-wrap">
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@
|
||||||
<option value="event_date">By event date</option>
|
<option value="event_date">By event date</option>
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</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>
|
||||||
|
|
||||||
<div class="table-wrap">
|
<div class="table-wrap">
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
<option value="event_date">By event date</option>
|
<option value="event_date">By event date</option>
|
||||||
</select>
|
</select>
|
||||||
</label>
|
</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>
|
||||||
|
|
||||||
<div class="table-wrap">
|
<div class="table-wrap">
|
||||||
|
|
|
||||||
|
|
@ -78,11 +78,14 @@ async function adminRoutes(fastify) {
|
||||||
});
|
});
|
||||||
|
|
||||||
// static assets (css + js) under /admin/assets/*
|
// 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, {
|
fastify.register(fastifyStatic, {
|
||||||
root: assetsDir,
|
root: assetsDir,
|
||||||
prefix: '/admin/assets/',
|
prefix: '/admin/assets/',
|
||||||
decorateReply: false,
|
decorateReply: false,
|
||||||
cacheControl: false,
|
cacheControl: true,
|
||||||
|
maxAge: 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
// top-level entry — redirect to articles
|
// top-level entry — redirect to articles
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue