source: Klonkt/src/views/partials/shared-styles.ejs@ 1eff06a

main
Last change on this file since 1eff06a was 1eff06a, checked in by roboburr <roboburr@…>, 3 months ago

refactor(nav): Agenda as its own pill (separate from Timeline/Grid)

Agenda was INSIDE the view-switcher pill → the grey/white neutralisation clashed
with the feed toggle (Timeline/Grid stayed grey after htmx nav). Now Agenda is
its own pill (same look), visible in all modes, white on the calendar page. My
neutralisation CSS removed so Timeline/Grid have 100% their normal behaviour.

Co-Authored-By: Claude <noreply@…>

  • Property mode set to 100644
File size: 8.2 KB
Line 
1<style>
2/* ─────────────────────────────────────────────────
3 View switcher (timeline ↔ grid + grid-cols picker)
4 ───────────────────────────────────────────────── */
5.view-switcher-wrap {
6 border-bottom: 1px solid var(--rule);
7 background: var(--paper);
8 /* Geen extra margin-top: de pill wordt zo gecentreerd tussen de profielkop-
9 streep (boven) en de eigen border (onder). De gelijke lucht boven/onder de
10 pill komt uit de symmetrische container-padding hieronder. De margin-bottom
11 (1.5rem in style.css) blijft lucht naar de feed. */
12 margin-top: 0;
13}
14.view-switcher-wrap .container {
15 display: flex; align-items: center; justify-content: center; gap: 0.75rem;
16 /* Symmetrische padding → even veel lucht boven als onder de pill (≈8px),
17 gecentreerd tussen de twee lijnen. */
18 padding: 0.5rem 1rem;
19 max-width: 1200px; margin: 0 auto;
20 flex-wrap: wrap;
21}
22.view-switcher {
23 display: inline-flex;
24 background: var(--paper-2);
25 border: 1px solid var(--rule);
26 border-radius: 999px;
27 padding: 0.15rem;
28}
29.view-switch-btn {
30 display: inline-flex; align-items: center; gap: 0.35rem;
31 padding: 0.35rem 0.85rem;
32 border: 0; background: transparent; color: var(--ink-muted, var(--ink-soft));
33 cursor: pointer; border-radius: 999px;
34 font-size: 0.85rem; font-family: inherit;
35 transition: background 120ms, color 120ms;
36}
37.view-switch-btn:hover { color: var(--ink); }
38.view-switch-btn[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
39
40/* Agenda = een EIGEN pill (los van Tijdlijn/Grid, zodat de feed-toggle nooit
41 verstoord raakt). Zelfde look als de view-switcher-pill. Zichtbaar in alle modi. */
42.agenda-pill { display: inline-flex; background: var(--paper-2); border: 1px solid var(--rule); border-radius: 999px; padding: 0.15rem; }
43.vs-agenda {
44 display: inline-flex; align-items: center; gap: 0.35rem;
45 padding: 0.35rem 0.85rem;
46 border-radius: 999px;
47 color: var(--ink-muted, var(--ink-soft));
48 text-decoration: none;
49 font-size: 0.85rem; font-family: inherit;
50 transition: background 120ms, color 120ms;
51}
52.vs-agenda:hover { color: var(--ink); }
53/* Op de agendapagina = wit pilletje (zelfde actieve look als Tijdlijn/Grid). */
54body.on-shows .vs-agenda { background: var(--ink); color: var(--paper); }
55
56.grid-cols-picker {
57 display: none; /* desktop-only, see media query */
58 gap: 0.2rem;
59}
60.grid-cols-btn {
61 width: 28px; height: 28px;
62 border: 1px solid var(--rule);
63 background: var(--paper-2);
64 color: var(--ink-muted, var(--ink-soft));
65 border-radius: 4px;
66 font-size: 0.8rem; font-weight: 600;
67 cursor: pointer;
68 font-variant-numeric: tabular-nums;
69}
70.grid-cols-btn:hover { color: var(--ink); border-color: var(--accent); }
71.grid-cols-btn.is-active { background: var(--accent); color: white; border-color: var(--accent); }
72
73/* Show grid-cols picker only on grid view + desktop */
74@media (min-width: 720px) {
75 body[data-feed-view="grid"] .grid-cols-picker { display: inline-flex; }
76}
77
78/* Switcher is hidden only on admin pages — admin has a dedicated layout
79 and its own back-button flow where Tijdlijn/Grid is irrelevant. On
80 every other page (home, post, tag, archive, search, account) it stays
81 visible so the user keeps a consistent return-to-feed control. */
82.on-admin .view-switcher-wrap { display: none; }
83
84/* Op een losse post is er geen feed om te schakelen, dus geen knop hoort "actief"
85 (gekleurd) te ogen. De actieve staat zit in style.css op body[data-feed-view]
86 / body[data-grid-cols] (background:var(--ink)); we overrulen die SPECIFIEKER
87 via body.on-post zodat de knoppen neutraal/grijs worden — maar wél klikbaar
88 blijven (de klik-handler navigeert dan naar de feed in die weergave). De
89 body-class wisselt client-side bij HTMX-nav, dus dit werkt ook zonder reload. */
90body.on-post[data-feed-view="timeline"] .view-switch-btn[data-view="timeline"],
91body.on-post[data-feed-view="grid"] .view-switch-btn[data-view="grid"],
92body.on-post[data-grid-cols="2"] .grid-cols-btn[data-cols="2"],
93body.on-post[data-grid-cols="3"] .grid-cols-btn[data-cols="3"],
94body.on-post[data-grid-cols="4"] .grid-cols-btn[data-cols="4"] {
95 background: transparent;
96 color: var(--ink-muted, var(--ink-soft));
97 border-color: var(--rule);
98}
99
100/* Spacing between switcher-bar and the page content below.
101 .feed-timeline (used on home + archive + post-list pages) gets a top
102 margin so the first post doesn't collide with the switcher's border.
103 .feed-grid already has its own top spacing from grid-tile padding. */
104.view-switcher-wrap + #pcms-main .feed-timeline,
105.view-switcher-wrap + #pcms-main .container:first-child {
106 margin-top: 1.5rem;
107}
108
109/* Feed layout switching is in the v9 style.css (style.css):
110 .feed-timeline always rendered, .feed-grid hidden unless on-home + grid-mode. */
111
112/* ─────────────────────────────────────────────────
113 PWA install button (lives in topnav, hidden by default)
114 ───────────────────────────────────────────────── */
115#pwa-install-btn { color: var(--accent); }
116#pwa-install-btn:hover { background: var(--paper-2); }
117
118/* Shared button + form styles (used across pages) */
119.btn {
120 display: inline-flex;
121 align-items: center;
122 gap: 0.4rem;
123 padding: 0.55rem 1rem;
124 border: 1px solid var(--rule);
125 background: var(--paper-2);
126 color: var(--ink);
127 font-family: var(--font-ui, system-ui), sans-serif;
128 font-size: 0.9rem;
129 font-weight: 500;
130 text-decoration: none;
131 border-radius: 5px;
132 cursor: pointer;
133 transition: background 150ms, border-color 150ms;
134}
135.btn:hover { border-color: var(--accent); }
136.btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
137.btn-primary:hover { opacity: 0.92; border-color: var(--accent); }
138.btn-success { background: #16a34a; color: white; border-color: #16a34a; }
139.btn-danger { background: #dc2626; color: white; border-color: #dc2626; }
140
141.alert { padding: 0.75rem 1rem; border-radius: 5px; margin-bottom: 1rem; }
142.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
143.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
144
145.auth-page { max-width: 420px; margin: 3rem auto; padding: 0 1rem; }
146.auth-page h1 { font-family: var(--font-display, serif); text-align: center; margin: 0 0 1.5rem; }
147.auth-form { display: flex; flex-direction: column; gap: 1rem; }
148.auth-form label { display: flex; flex-direction: column; gap: 0.3rem; }
149.auth-form label > span { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
150.auth-form input { padding: 0.6rem 0.75rem; border: 1px solid var(--rule); border-radius: 4px; background: var(--paper); color: var(--ink); font-size: 1rem; }
151.auth-form .btn { justify-content: center; padding: 0.7rem; font-size: 1rem; margin-top: 0.5rem; }
152.auth-link { text-align: center; color: var(--ink-muted); font-size: 0.9rem; margin: 1rem 0 0; }
153.auth-link a { color: var(--accent); }
154.auth-google { align-items: stretch; }
155.auth-intro { text-align: center; color: var(--ink-muted); font-size: 0.95rem; margin: 0 0 1rem; }
156.btn-google {
157 display: flex; justify-content: center; gap: 0.6rem; padding: 0.7rem; font-size: 1rem;
158 background: #fff; color: #1f1f1f; border: 1px solid #dadce0;
159}
160.btn-google:hover { background: #f7f8f8; border-color: #dadce0; }
161.btn-google .g-icon { flex-shrink: 0; }
162.auth-divider { display: flex; align-items: center; gap: 0.75rem; margin: 1.25rem 0; color: var(--ink-muted); font-size: 0.85rem; }
163.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--rule); }
164
165/* HTMX loading indicator */
166.pcms-loading {
167 display: none;
168 position: fixed;
169 top: 60px;
170 right: 1rem;
171 width: 24px;
172 height: 24px;
173 border: 3px solid var(--paper-2);
174 border-top-color: var(--accent);
175 border-radius: 50%;
176 animation: spin 0.8s linear infinite;
177 z-index: 1000;
178}
179.htmx-request .pcms-loading { display: block; }
180@keyframes spin { to { transform: rotate(360deg); } }
181</style>
Note: See TracBrowser for help on using the repository browser.