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

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

feat(i18n phase 6): remaining public + other pages translated (NL/EN/DE)

post-edit, account, newsletter, download, press kit /pers, fan-gate, link-in-bio,
my-site, password-reset (2), artists directory, auth-login Google error map,
user/hub-home/circle-feed+post/viewer-blocked/home/favourites/changelog/404/
type/tag/archive/prutter (inbox+conversation). embed-player skipped (no t
in that standalone route). 1026 view-keys cross-checked → 0 missing.

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

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