source: Klonkt/src/views/pages/hub-home.ejs@ cb6b1ad

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

feat: directory URL /artiesten -> /leden + count 'N Klonkt's'

  • Route mounted at /leden; /artiesten 301-redirects (query preserved) for old links. 'leden' added to reserved slugs (both lists).
  • Internal links (hub-home more-link, directory search action + clear) -> /leden.
  • Directory count 'N PrutFolio's' -> 'N Klonkt's'.

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

  • Property mode set to 100644
File size: 12.7 KB
Line 
1<div class="hub<%= hub.heroImage ? ' hub--img' : '' %>">
2
3 <%# ── Minimale nav (alleen auth) — over de hero, geen brand/switcher ── %>
4 <nav class="hub-nav">
5 <div class="hub-nav-inner container">
6 <% if (user) { %>
7 <% if (typeof canSeeBeheer !== 'undefined' && canSeeBeheer) { %>
8 <a class="hub-nav-link" href="/admin">Beheer</a>
9 <% } %>
10 <a class="hub-nav-link" href="/account"><%= user.username %></a>
11 <a class="hub-nav-link" href="/auth/logout">Uitloggen</a>
12 <% } else { %>
13 <a class="hub-nav-link" href="/auth/login">Inloggen</a>
14 <% } %>
15 </div>
16 </nav>
17
18 <%# ── HERO (label) — de pagina begint hier, geen header erboven ────── %>
19 <header class="hub-hero<%= hub.heroImage ? ' has-img' : '' %>"<% if (hub.heroImage) { %> style="--hero-img:url('<%= hub.heroImage %>')"<% } %>>
20 <div class="hub-hero-inner container">
21 <h1 class="hub-hero-title"><%= hub.title %></h1>
22 <% if (hub.tagline) { %>
23 <p class="hub-hero-tag"><%= hub.tagline %></p>
24 <% } %>
25 <% if (hub.intro) { %>
26 <p class="hub-hero-desc"><%= hub.intro %></p>
27 <% } %>
28 </div>
29 </header>
30
31 <div class="container hub-body">
32
33 <%# ── HOOFDPAGINA (label-/hoofdaccount — geen artiest) ──────────── %>
34 <% if (mainSite) { %>
35 <section class="hub-sec hub-sec-main">
36 <a class="hub-main-card" href="/user/<%= mainSite.slug %>">
37 <% var _mAva = mainSite.profile_photo || mainSite.owner_avatar; %>
38 <span class="hub-main-avatar"<% if (_mAva) { %> style="background-image:url('<%= _mAva %>')"<% } else { %> style="background:<%= mainSite.accent || 'var(--accent)' %>;color:#fff"<% } %>>
39 <% if (!_mAva) { %><%= (mainSite.title || mainSite.slug).charAt(0).toUpperCase() %><% } %>
40 </span>
41 <span class="hub-main-info">
42 <span class="hub-main-badge">Hoofdpagina</span>
43 <span class="hub-main-name"><%= mainSite.title %></span>
44 <% if (mainSite.tagline) { %><span class="hub-main-tag"><%= mainSite.tagline %></span><% } %>
45 </span>
46 <span class="hub-main-cta">Bekijk de pagina <span aria-hidden="true">→</span></span>
47 </a>
48 </section>
49 <% } %>
50
51 <%# ── ARTIESTEN-ROSTER ─────────────────────────────────────────── %>
52 <% if (artists && artists.length) { %>
53 <% var _total = (typeof totalArtists !== 'undefined') ? totalArtists : artists.length; %>
54 <% var _hasMore = _total > artists.length; %>
55 <section class="hub-sec">
56 <h2 class="hub-sec-title">
57 Leden
58 <% if (_hasMore) { %><span class="hub-sec-count"><%= _total %></span><% } %>
59 </h2>
60 <div class="roster">
61 <% artists.forEach(function(a){ %>
62 <a class="roster-card" href="/user/<%= a.slug %>">
63 <% var _ava = a.profile_photo || a.owner_avatar; %>
64 <span class="roster-avatar"<% if (_ava) { %> style="background-image:url('<%= _ava %>')"<% } else { %> style="background:<%= a.accent || 'var(--accent)' %>;color:#fff"<% } %>>
65 <% if (!_ava) { %><%= (a.title || a.slug).charAt(0).toUpperCase() %><% } %>
66 </span>
67 <span class="roster-name"><%= a.title %></span>
68 <% if (a.tagline) { %><span class="roster-tag"><%= a.tagline %></span><% } %>
69 <span class="roster-count"><%= a.post_count %> post<%= a.post_count === 1 ? '' : 's' %></span>
70 </a>
71 <% }); %>
72 </div>
73 <% if (_hasMore) { %>
74 <div class="hub-more">
75 <a class="hub-more-link" href="/leden">Alle <%= _total %> leden <span aria-hidden="true">→</span></a>
76 </div>
77 <% } %>
78 </section>
79 <% } %>
80
81 <%# ── LAATSTE POSTS ────────────────────────────────────────────── %>
82 <% if (posts && posts.length) { %>
83 <section class="hub-sec">
84 <h2 class="hub-sec-title">Laatste posts van onze leden.</h2>
85 <div class="hub-feed">
86 <% posts.forEach(function(p){ %>
87 <a class="feed-item" href="/user/<%= p.site_slug %>/<%= p.slug %>">
88 <% if (p.cover_image_url) { %>
89 <span class="feed-cover" style="background-image:url('<%= p.cover_image_url %>')"></span>
90 <% } %>
91 <span class="feed-body">
92 <span class="feed-meta"><%= p.site_title %> · <%= formatDate(p.published_at || p.created_at) %></span>
93 <span class="feed-title"><%= p.title %></span>
94 <% if (p.excerpt) { %><span class="feed-excerpt"><%= p.excerpt %></span><% } %>
95 </span>
96 <span class="feed-arrow" aria-hidden="true">→</span>
97 </a>
98 <% }); %>
99 </div>
100 </section>
101 <% } %>
102
103 </div>
104</div>
105
106<style>
107.hub { width: 100%; position: relative; }
108
109/* ── Minimale auth-nav (over de hero) ─────────────────────────────── */
110.hub-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 5; padding: 1rem 0; }
111.hub-nav-inner { display: flex; justify-content: flex-end; align-items: center; gap: 1.4rem; }
112.hub-nav-link {
113 color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.9rem; opacity: 0.85;
114}
115.hub-nav-link:hover { opacity: 1; color: var(--accent); }
116.hub--img .hub-nav-link { color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
117.hub--img .hub-nav-link:hover { color: #fff; opacity: 1; }
118
119/* ── Hero ─────────────────────────────────────────────────────────── */
120.hub-hero {
121 display: flex; align-items: center; justify-content: center;
122 min-height: clamp(340px, 58vh, 560px);
123 text-align: center;
124 background:
125 radial-gradient(130% 130% at 50% -10%, color-mix(in srgb, var(--accent) 26%, var(--paper)) 0%, var(--paper) 62%);
126 border-bottom: 1px solid var(--rule);
127}
128.hub-hero.has-img {
129 background:
130 linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.55) 100%),
131 var(--hero-img) center / cover no-repeat;
132 border-bottom: 0;
133 color: #fff;
134}
135.hub-hero-inner { padding: 3.5rem 1rem; }
136.hub-hero-title {
137 font-family: var(--font-display, serif);
138 font-size: clamp(2.6rem, 7vw, 4.4rem);
139 line-height: 1.02; margin: 0; letter-spacing: -0.015em;
140}
141.hub-hero-tag {
142 margin: 0.7rem 0 0; font-size: 1.05rem; font-weight: 600;
143 text-transform: uppercase; letter-spacing: 0.1em;
144 color: var(--accent);
145}
146.hub-hero.has-img .hub-hero-tag { color: #fff; opacity: 0.92; }
147.hub-hero-desc {
148 margin: 1.1rem auto 0; max-width: 48ch;
149 font-size: 1.1rem; line-height: 1.55; color: var(--ink-muted);
150}
151.hub-hero.has-img .hub-hero-desc { color: rgba(255,255,255,.9); }
152
153.hub-body { padding-bottom: 4.5rem; }
154.hub-sec { margin-top: 3rem; }
155.hub-sec-title {
156 font-family: var(--font-display, serif);
157 font-size: 1.5rem; margin: 0 0 1.2rem;
158 display: flex; align-items: center; gap: 0.75rem;
159}
160.hub-sec-title::after { content: ''; flex: 1; height: 1px; background: var(--rule); }
161.hub-sec-count {
162 font-family: var(--font-ui, system-ui); font-size: 0.8rem; font-weight: 700;
163 color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
164 padding: 0.1rem 0.55rem; border-radius: 99px; order: 1;
165}
166.hub-more { margin-top: 1.25rem; text-align: center; }
167.hub-more-link {
168 display: inline-flex; align-items: center; gap: 0.4rem;
169 padding: 0.6rem 1.3rem; border: 1px solid var(--rule); border-radius: 99px;
170 background: var(--paper-2); color: var(--ink); text-decoration: none;
171 font-weight: 600; font-size: 0.92rem; transition: border-color 140ms, background 140ms;
172}
173.hub-more-link:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--paper-2)); }
174
175/* ── Hoofdpagina-kaart (label-/hoofdaccount, apart van de artiesten) ── */
176.hub-sec-main { margin-top: 2.25rem; }
177.hub-main-card {
178 display: flex; align-items: center; gap: 1.25rem;
179 padding: 1.2rem 1.5rem;
180 border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--rule));
181 border-radius: 18px;
182 background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 11%, var(--paper-2)) 0%, var(--paper-2) 72%);
183 color: var(--ink); text-decoration: none;
184 transition: border-color 140ms, transform 140ms, box-shadow 140ms;
185}
186.hub-main-card:hover {
187 border-color: var(--accent); transform: translateY(-2px);
188 box-shadow: 0 12px 30px -16px color-mix(in srgb, var(--accent) 60%, transparent);
189}
190.hub-main-avatar {
191 width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0;
192 background-size: cover; background-position: center;
193 display: inline-flex; align-items: center; justify-content: center;
194 font-family: var(--font-display, serif); font-size: 1.8rem; font-weight: 700; color: #fff;
195 box-shadow: inset 0 0 0 2px rgba(255,255,255,.18);
196}
197.hub-main-info { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; flex: 1; }
198.hub-main-badge {
199 align-self: flex-start; font-size: 0.65rem; font-weight: 700;
200 text-transform: uppercase; letter-spacing: 0.08em;
201 color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent);
202 padding: 0.12rem 0.55rem; border-radius: 99px;
203}
204.hub-main-name { font-family: var(--font-display, serif); font-size: 1.5rem; font-weight: 700; line-height: 1.1; }
205.hub-main-tag { color: var(--ink-muted); font-size: 0.9rem; }
206.hub-main-cta { color: var(--accent); font-weight: 600; font-size: 0.9rem; white-space: nowrap; flex-shrink: 0; }
207@media (max-width: 560px) {
208 .hub-main-card { flex-direction: column; text-align: center; }
209 .hub-main-info { align-items: center; }
210 .hub-main-badge { align-self: center; }
211 .hub-main-cta { display: none; }
212}
213
214/* ── Roster (artiesten) ───────────────────────────────────────────── */
215.roster {
216 display: grid;
217 grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
218 gap: 1rem;
219}
220.roster-card {
221 display: flex; flex-direction: column; align-items: center; text-align: center;
222 gap: 0.4rem; padding: 1.6rem 1rem 1.3rem;
223 border: 1px solid var(--rule); border-radius: 16px;
224 background: var(--paper-2); color: var(--ink); text-decoration: none;
225 transition: border-color 140ms, transform 140ms, box-shadow 140ms;
226}
227.roster-card:hover {
228 border-color: var(--accent); transform: translateY(-3px);
229 box-shadow: 0 10px 28px -14px color-mix(in srgb, var(--accent) 55%, transparent);
230}
231.roster-avatar {
232 width: 88px; height: 88px; border-radius: 50%; margin-bottom: 0.45rem;
233 background-size: cover; background-position: center;
234 display: inline-flex; align-items: center; justify-content: center;
235 font-family: var(--font-display, serif); font-size: 2.1rem; font-weight: 700; color: #fff;
236 box-shadow: inset 0 0 0 2px rgba(255,255,255,.18);
237}
238.roster-name { font-weight: 700; font-size: 1.1rem; }
239.roster-tag { color: var(--ink-muted); font-size: 0.82rem; }
240.roster-count {
241 margin-top: 0.35rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;
242 color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent);
243 padding: 0.15rem 0.6rem; border-radius: 99px;
244}
245
246/* ── Feed (laatste posts) ─────────────────────────────────────────── */
247.hub-feed { display: flex; flex-direction: column; gap: 0.6rem; }
248.feed-item {
249 display: flex; align-items: center; gap: 1rem;
250 padding: 0.9rem 1rem; border: 1px solid var(--rule); border-radius: 12px;
251 background: var(--paper-2); color: var(--ink); text-decoration: none;
252 transition: border-color 140ms, background 140ms;
253}
254.feed-item:hover { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, var(--paper-2)); }
255.feed-cover {
256 width: 64px; height: 64px; border-radius: 8px; flex-shrink: 0;
257 background-size: cover; background-position: center; background-color: var(--paper);
258}
259.feed-body { display: flex; flex-direction: column; gap: 0.2rem; min-width: 0; flex: 1; }
260.feed-meta { font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent); }
261.feed-title { font-weight: 600; font-size: 1.05rem; line-height: 1.25; }
262.feed-excerpt {
263 color: var(--ink-muted); font-size: 0.88rem; line-height: 1.4;
264 display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
265}
266.feed-arrow { color: var(--ink-muted); font-size: 1.2rem; flex-shrink: 0; transition: transform 140ms, color 140ms; }
267.feed-item:hover .feed-arrow { color: var(--accent); transform: translateX(3px); }
268
269@media (max-width: 560px) {
270 .hub-hero-inner { padding: 2.5rem 1rem; }
271 .feed-cover { width: 52px; height: 52px; }
272 .feed-arrow { display: none; }
273}
274</style>
Note: See TracBrowser for help on using the repository browser.