source: Klonkt/src/views/partials/shared-styles.ejs@ 6eeb459

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

feat(agenda): rest grey on calendar/downloads + Agenda as standalone link + notify conditional

  • On the calendar and downloads pages: Solo/Circle + Timeline/Grid + cols all grey (!important, only on those body classes → doesn't leak to the feed). Agenda itself highlighted/white.
  • Agenda is now a standalone icon+text link (no pill box).
  • Calendar notify form only shown when the footer newsletter is off.

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

  • Property mode set to 100644
File size: 9.0 KB
RevLine 
[7bc636b]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);
[dc4c067]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;
[7bc636b]13}
14.view-switcher-wrap .container {
15 display: flex; align-items: center; justify-content: center; gap: 0.75rem;
[dc4c067]16 /* Symmetrische padding → even veel lucht boven als onder de pill (≈8px),
17 gecentreerd tussen de twee lijnen. */
18 padding: 0.5rem 1rem;
[7bc636b]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
[1eff06a]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. */
[6eeb459]42.agenda-pill { display: inline-flex; align-items: center; } /* geen box — losse icoon+tekst link */
[cf7c2d9]43.vs-agenda {
[6eeb459]44 display: inline-flex; align-items: center; gap: 0.4rem;
45 padding: 0.35rem 0.5rem;
[d7b5a6c]46 color: var(--ink-muted, var(--ink-soft));
47 text-decoration: none;
[6eeb459]48 font-size: 0.9rem; font-family: inherit;
49 transition: color 120ms;
[cf7c2d9]50}
[d7b5a6c]51.vs-agenda:hover { color: var(--ink); }
[6eeb459]52/* Op de agendapagina = helder/wit (geen pilletje, past bij de losse-link-look). */
53body.on-shows .vs-agenda { color: var(--ink); font-weight: 600; }
[cf7c2d9]54
[7bc636b]55.grid-cols-picker {
56 display: none; /* desktop-only, see media query */
57 gap: 0.2rem;
58}
59.grid-cols-btn {
60 width: 28px; height: 28px;
61 border: 1px solid var(--rule);
62 background: var(--paper-2);
63 color: var(--ink-muted, var(--ink-soft));
64 border-radius: 4px;
65 font-size: 0.8rem; font-weight: 600;
66 cursor: pointer;
67 font-variant-numeric: tabular-nums;
68}
69.grid-cols-btn:hover { color: var(--ink); border-color: var(--accent); }
70.grid-cols-btn.is-active { background: var(--accent); color: white; border-color: var(--accent); }
71
72/* Show grid-cols picker only on grid view + desktop */
73@media (min-width: 720px) {
74 body[data-feed-view="grid"] .grid-cols-picker { display: inline-flex; }
75}
76
77/* Switcher is hidden only on admin pages — admin has a dedicated layout
78 and its own back-button flow where Tijdlijn/Grid is irrelevant. On
79 every other page (home, post, tag, archive, search, account) it stays
80 visible so the user keeps a consistent return-to-feed control. */
81.on-admin .view-switcher-wrap { display: none; }
82
[af5407f]83/* Op een losse post is er geen feed om te schakelen, dus geen knop hoort "actief"
84 (gekleurd) te ogen. De actieve staat zit in style.css op body[data-feed-view]
85 / body[data-grid-cols] (background:var(--ink)); we overrulen die SPECIFIEKER
86 via body.on-post zodat de knoppen neutraal/grijs worden — maar wél klikbaar
87 blijven (de klik-handler navigeert dan naar de feed in die weergave). De
88 body-class wisselt client-side bij HTMX-nav, dus dit werkt ook zonder reload. */
89body.on-post[data-feed-view="timeline"] .view-switch-btn[data-view="timeline"],
90body.on-post[data-feed-view="grid"] .view-switch-btn[data-view="grid"],
91body.on-post[data-grid-cols="2"] .grid-cols-btn[data-cols="2"],
92body.on-post[data-grid-cols="3"] .grid-cols-btn[data-cols="3"],
[1eff06a]93body.on-post[data-grid-cols="4"] .grid-cols-btn[data-cols="4"] {
[af5407f]94 background: transparent;
95 color: var(--ink-muted, var(--ink-soft));
96 border-color: var(--rule);
[11a6871]97}
98
[6eeb459]99/* Op de agenda- én downloads-pagina is ALLES behalve de Agenda-pill neutraal/grijs
100 (je bent daar niet in een feed-weergave). !important + body.on-X (betrouwbaar
101 gezet/gestript via PAGE_CLASSES) → overrult de feed-active-regel ZONDER naar de
102 feed te lekken (de selector matcht alleen op die pagina's). */
103body.on-shows .view-switch-btn,
104body.on-downloads .view-switch-btn {
105 background: transparent !important;
106 color: var(--ink-muted, var(--ink-soft)) !important;
107 border-color: var(--rule) !important;
108}
109body.on-shows .feed-scope-btn.is-active,
110body.on-downloads .feed-scope-btn.is-active {
111 background: transparent !important;
112 color: var(--ink-muted, var(--ink-soft)) !important;
113}
114body.on-shows .grid-cols-btn.is-active,
115body.on-downloads .grid-cols-btn.is-active {
116 background: var(--paper-2) !important;
117 color: var(--ink-muted, var(--ink-soft)) !important;
118 border-color: var(--rule) !important;
119}
120
[7bc636b]121/* Spacing between switcher-bar and the page content below.
122 .feed-timeline (used on home + archive + post-list pages) gets a top
123 margin so the first post doesn't collide with the switcher's border.
124 .feed-grid already has its own top spacing from grid-tile padding. */
125.view-switcher-wrap + #pcms-main .feed-timeline,
126.view-switcher-wrap + #pcms-main .container:first-child {
127 margin-top: 1.5rem;
128}
129
130/* Feed layout switching is in the v9 style.css (style.css):
131 .feed-timeline always rendered, .feed-grid hidden unless on-home + grid-mode. */
132
133/* ─────────────────────────────────────────────────
134 PWA install button (lives in topnav, hidden by default)
135 ───────────────────────────────────────────────── */
136#pwa-install-btn { color: var(--accent); }
137#pwa-install-btn:hover { background: var(--paper-2); }
138
139/* Shared button + form styles (used across pages) */
140.btn {
141 display: inline-flex;
142 align-items: center;
143 gap: 0.4rem;
144 padding: 0.55rem 1rem;
145 border: 1px solid var(--rule);
146 background: var(--paper-2);
147 color: var(--ink);
148 font-family: var(--font-ui, system-ui), sans-serif;
149 font-size: 0.9rem;
150 font-weight: 500;
151 text-decoration: none;
152 border-radius: 5px;
153 cursor: pointer;
154 transition: background 150ms, border-color 150ms;
155}
156.btn:hover { border-color: var(--accent); }
157.btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
158.btn-primary:hover { opacity: 0.92; border-color: var(--accent); }
159.btn-success { background: #16a34a; color: white; border-color: #16a34a; }
160.btn-danger { background: #dc2626; color: white; border-color: #dc2626; }
161
162.alert { padding: 0.75rem 1rem; border-radius: 5px; margin-bottom: 1rem; }
163.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
164.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
165
166.auth-page { max-width: 420px; margin: 3rem auto; padding: 0 1rem; }
167.auth-page h1 { font-family: var(--font-display, serif); text-align: center; margin: 0 0 1.5rem; }
168.auth-form { display: flex; flex-direction: column; gap: 1rem; }
169.auth-form label { display: flex; flex-direction: column; gap: 0.3rem; }
170.auth-form label > span { font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); }
171.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; }
172.auth-form .btn { justify-content: center; padding: 0.7rem; font-size: 1rem; margin-top: 0.5rem; }
173.auth-link { text-align: center; color: var(--ink-muted); font-size: 0.9rem; margin: 1rem 0 0; }
174.auth-link a { color: var(--accent); }
[c80e78b]175.auth-google { align-items: stretch; }
176.auth-intro { text-align: center; color: var(--ink-muted); font-size: 0.95rem; margin: 0 0 1rem; }
177.btn-google {
[e2a8e31]178 display: flex; justify-content: center; gap: 0.6rem; padding: 0.7rem; font-size: 1rem;
[c80e78b]179 background: #fff; color: #1f1f1f; border: 1px solid #dadce0;
180}
181.btn-google:hover { background: #f7f8f8; border-color: #dadce0; }
182.btn-google .g-icon { flex-shrink: 0; }
[9e27d64]183.auth-divider { display: flex; align-items: center; gap: 0.75rem; margin: 1.25rem 0; color: var(--ink-muted); font-size: 0.85rem; }
184.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--rule); }
[7bc636b]185
186/* HTMX loading indicator */
187.pcms-loading {
188 display: none;
189 position: fixed;
190 top: 60px;
191 right: 1rem;
192 width: 24px;
193 height: 24px;
194 border: 3px solid var(--paper-2);
195 border-top-color: var(--accent);
196 border-radius: 50%;
197 animation: spin 0.8s linear infinite;
198 z-index: 1000;
199}
200.htmx-request .pcms-loading { display: block; }
201@keyframes spin { to { transform: rotate(360deg); } }
202</style>
Note: See TracBrowser for help on using the repository browser.