source: Klonkt/src/views/partials/footer.ejs@ 37edecd

main
Last change on this file since 37edecd was 93d6345, checked in by roboburr <roboburr@…>, 3 months ago

Theme scrollbar + install button in the footer row (no longer a separate row)

  • Slim, rounded theme scrollbar (scrollbar-width/color + ::-webkit-scrollbar) instead of the default chunky browser scrollbar; works on page + internal scrollers.
  • "Install app" moved from its own row below the footer to the centre of the footer row (compact variant) → saves vertical space.

CSS cache-buster v8.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@…>

  • Property mode set to 100644
File size: 4.6 KB
Line 
1<footer class="site-footer">
2 <div class="container site-footer-inner">
3 <div>
4 <span>© <%= new Date().getFullYear() %> <%= (site && site.title) || 'Klonkt' %></span>
5 </div>
6 <%# Install-app knop — in de footer-rij (midden), bespaart een hele extra rij.
7 JS detecteert platform & opent een modal met PWA-install-stappen. %>
8 <button type="button" class="install-app-btn install-app-btn--footer" data-pcms-install-app>
9 <svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><path d="M5 20h14v-2H5v2zm7-18L5.33 9h3.84v6h5.66V9h3.84L12 2z" fill="currentColor"/></svg>
10 <span>Installeer app</span>
11 </button>
12 <div class="footer-meta">
13 <span>Klonkt Beta<%= (typeof appVersion !== 'undefined' && appVersion) ? ' v' + appVersion : '' %></span>
14 <%# Mobile-only theme toggle. On desktop the topnav has its own toggle
15 so we hide this one to avoid two visible toggles at once. The same
16 toggleTheme handler in topnav.ejs picks this button up by id. %>
17 <button type="button" class="footer-theme-toggle" id="theme-toggle-footer"
18 aria-label="Thema wisselen" title="Thema wisselen">
19 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
20 stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
21 <circle cx="12" cy="12" r="4"/>
22 <path d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"/>
23 </svg>
24 </button>
25 </div>
26 </div>
27
28</footer>
29
30<style>
31/* Make sure the page itself is at least viewport-tall so the flex sticky-
32 footer logic (body display:flex, main flex:1) can push the footer down.
33 100dvh is dynamic viewport height — handles mobile address-bar collapse. */
34html { min-height: 100dvh; }
35
36.site-footer {
37 border-top: 1px solid var(--rule);
38 margin-top: 4rem;
39 padding: 2rem 0;
40 padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0));
41 font-size: 0.85rem;
42 color: var(--ink-muted);
43 background: var(--paper);
44 /* When fixed bars (mini-player / bottom-tab) sit at the bottom of the
45 viewport they overlap the footer at scroll-end. The clearance below
46 mirrors the .pcms-main rule in audio.css — content goes at the top of
47 the footer, the player floats over the empty padding underneath. */
48 transition: padding-bottom .2s ease;
49}
50/* Audio player visible (desktop, no bottom-tab): clear ~80px */
51body.has-audio-player .site-footer {
52 padding-bottom: calc(2rem + 80px + env(safe-area-inset-bottom, 0));
53}
54@media (max-width: 767px) {
55 /* Bottom-tab visible alone: ~56px tab */
56 body.has-bottom-tab .site-footer {
57 padding-bottom: calc(2rem + 56px + env(safe-area-inset-bottom, 0));
58 }
59 /* Bottom-tab + audio-player stacked: ~56px tab + ~72px player */
60 body.has-bottom-tab.has-audio-player .site-footer {
61 padding-bottom: calc(2rem + 56px + 72px + env(safe-area-inset-bottom, 0));
62 }
63}
64.site-footer-inner {
65 max-width: 800px;
66 margin: 0 auto;
67 padding: 0 1rem;
68 display: flex;
69 justify-content: space-between;
70 align-items: center;
71 flex-wrap: wrap;
72 gap: 1rem;
73}
74.footer-meta {
75 font-size: 0.8rem; opacity: 0.7;
76 display: inline-flex; align-items: center; gap: 0.75rem;
77}
78.pcms-main { min-height: 50vh; }
79
80/* Mobile theme toggle in footer. Pill-style button matching topnav nav-btn.
81 Hidden on desktop; the topnav already has a toggle there. */
82.footer-theme-toggle {
83 display: none;
84 align-items: center; justify-content: center;
85 width: 36px; height: 36px;
86 padding: 0; margin: 0;
87 background: transparent; color: var(--ink);
88 border: 1px solid var(--rule); border-radius: 999px;
89 cursor: pointer;
90 transition: background-color 120ms, border-color 120ms;
91 -webkit-tap-highlight-color: transparent;
92 opacity: 1; /* override .footer-meta dim */
93}
94.footer-theme-toggle:hover { background: var(--paper-2); border-color: var(--accent); }
95.footer-theme-toggle:active { transform: scale(0.96); }
96.footer-theme-toggle svg { width: 18px; height: 18px; }
97
98@media (max-width: 768px) {
99 .footer-theme-toggle { display: inline-flex; }
100}
101
102/* Compacte install-knop ín de footer-rij (midden) i.p.v. een grote losse CTA
103 op een eigen regel — bespaart verticale ruimte. */
104.install-app-btn--footer {
105 flex: 0 0 auto;
106 width: auto !important; /* override de mobile .install-app-btn width:100% */
107 padding: 0.42rem 0.95rem;
108 font-size: 0.82rem;
109 gap: 0.4rem;
110}
111.install-app-btn--footer svg { width: 15px; height: 15px; }
112/* Op smal scherm: laat de drie items netjes centreren als ze wrappen. */
113@media (max-width: 600px) {
114 .site-footer-inner { justify-content: center; text-align: center; }
115}
116</style>
Note: See TracBrowser for help on using the repository browser.