Changeset 4c5169f in Klonkt
- Timestamp:
- 06/14/2026 03:37:12 PM (3 months ago)
- Branches:
- main
- Children:
- 337ec5a
- Parents:
- 6e0249f
- Location:
- src
- Files:
-
- 5 edited
-
routes/admin-settings.js (modified) (2 diffs)
-
routes/hub.js (modified) (2 diffs)
-
views/pages/admin-settings.ejs (modified) (1 diff)
-
views/pages/hub-home.ejs (modified) (6 diffs)
-
views/shell.ejs (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/routes/admin-settings.js
r6e0249f r4c5169f 26 26 hubTagline: getSetting('hub_tagline') || '', 27 27 hubIntro: getSetting('hub_intro') || '', 28 hubHeroImage: getSetting('hub_hero_image') || '', 28 29 success: req.query.success || null, 29 30 }); … … 43 44 setSetting('hub_intro', (req.body.hub_intro || '').toString().slice(0, 400).trim()); 44 45 } 46 if (typeof req.body.hub_hero_image !== 'undefined') { 47 setSetting('hub_hero_image', (req.body.hub_hero_image || '').toString().slice(0, 300).trim()); 48 } 45 49 res.redirect('/admin/settings?success=' + encodeURIComponent('Opgeslagen')); 46 50 }); -
src/routes/hub.js
r6e0249f r4c5169f 37 37 // ALLE PrutFolio's (elke user, incl. de admin z'n eigen site) voor de roster. 38 38 const artists = db.prepare(` 39 SELECT s.slug, s.title, s.tagline, s.profile_photo, 39 SELECT s.slug, s.title, s.tagline, s.profile_photo, s.accent, 40 40 (SELECT COUNT(*) FROM posts WHERE site_id = s.id AND status = 'published') AS post_count 41 41 FROM sites s … … 49 49 tagline: getSetting('hub_tagline') || '', 50 50 intro: getSetting('hub_intro') || '', 51 heroImage: getSetting('hub_hero_image') || '', 51 52 }; 52 53 -
src/views/pages/admin-settings.ejs
r6e0249f r4c5169f 51 51 <textarea name="hub_intro" maxlength="400" rows="3" placeholder="Korte introtekst onder de titel."><%= hubIntro %></textarea> 52 52 </label> 53 <label class="set-field"> 54 <span>Hero-afbeelding (URL) <small style="font-weight:400;color:var(--ink-muted)">— optioneel; achtergrond van de hero</small></span> 55 <input type="text" name="hub_hero_image" maxlength="300" value="<%= hubHeroImage %>" placeholder="/media/... of https://..."> 56 </label> 53 57 <button type="submit" class="btn btn-primary">Opslaan</button> 54 58 </form> -
src/views/pages/hub-home.ejs
r6e0249f r4c5169f 1 1 <div class="hub"> 2 2 3 <%# ── HERO (label / bedrijf) ─────────────────────────────────────── %>4 <header class="hub-hero ">3 <%# ── HERO (label) — de pagina begint hier, geen header erboven ────── %> 4 <header class="hub-hero<%= hub.heroImage ? ' has-img' : '' %>"<% if (hub.heroImage) { %> style="--hero-img:url('<%= hub.heroImage %>')"<% } %>> 5 5 <div class="hub-hero-inner container"> 6 6 <h1 class="hub-hero-title"><%= hub.title %></h1> … … 23 23 <% artists.forEach(function(a){ %> 24 24 <a class="roster-card" href="/user/<%= a.slug %>"> 25 <span class="roster-avatar"<% if (a.profile_photo) { %> style="background-image:url('<%= a.profile_photo %>')"<% } %>>25 <span class="roster-avatar"<% if (a.profile_photo) { %> style="background-image:url('<%= a.profile_photo %>')"<% } else { %> style="background:<%= a.accent || 'var(--accent)' %>;color:#fff"<% } %>> 26 26 <% if (!a.profile_photo) { %><%= (a.title || a.slug).charAt(0).toUpperCase() %><% } %> 27 27 </span> … … 65 65 /* ── Hero ─────────────────────────────────────────────────────────── */ 66 66 .hub-hero { 67 display: flex; align-items: center; justify-content: center; 68 min-height: clamp(340px, 58vh, 560px); 69 text-align: center; 67 70 background: 68 radial-gradient(1 20% 140% at 50% -20%, color-mix(in srgb, var(--accent) 22%, var(--paper)) 0%, var(--paper) 60%);71 radial-gradient(130% 130% at 50% -10%, color-mix(in srgb, var(--accent) 26%, var(--paper)) 0%, var(--paper) 62%); 69 72 border-bottom: 1px solid var(--rule); 70 text-align: center;71 73 } 72 .hub-hero-inner { padding: 4rem 1rem 3.25rem; } 74 .hub-hero.has-img { 75 background: 76 linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.55) 100%), 77 var(--hero-img) center / cover no-repeat; 78 border-bottom: 0; 79 color: #fff; 80 } 81 .hub-hero-inner { padding: 3.5rem 1rem; } 73 82 .hub-hero-title { 74 83 font-family: var(--font-display, serif); 75 font-size: clamp(2.4rem, 6vw, 3.6rem); 76 line-height: 1.05; margin: 0; 77 letter-spacing: -0.01em; 84 font-size: clamp(2.6rem, 7vw, 4.4rem); 85 line-height: 1.02; margin: 0; letter-spacing: -0.015em; 78 86 } 79 87 .hub-hero-tag { 80 margin: 0.6rem 0 0; font-size: 1.05rem; font-weight: 600; 81 color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; 88 margin: 0.7rem 0 0; font-size: 1.05rem; font-weight: 600; 89 text-transform: uppercase; letter-spacing: 0.1em; 90 color: var(--accent); 82 91 } 92 .hub-hero.has-img .hub-hero-tag { color: #fff; opacity: 0.92; } 83 93 .hub-hero-desc { 84 margin: 1 rem auto 0; max-width: 46ch;85 color: var(--ink-muted); font-size: 1.05rem; line-height: 1.5;94 margin: 1.1rem auto 0; max-width: 48ch; 95 font-size: 1.1rem; line-height: 1.55; color: var(--ink-muted); 86 96 } 97 .hub-hero.has-img .hub-hero-desc { color: rgba(255,255,255,.9); } 87 98 88 .hub-body { padding-bottom: 4 rem; }99 .hub-body { padding-bottom: 4.5rem; } 89 100 .hub-sec { margin-top: 3rem; } 90 101 .hub-sec-title { … … 103 114 .roster-card { 104 115 display: flex; flex-direction: column; align-items: center; text-align: center; 105 gap: 0.4rem; padding: 1. 5rem 1rem 1.25rem;106 border: 1px solid var(--rule); border-radius: 1 4px;116 gap: 0.4rem; padding: 1.6rem 1rem 1.3rem; 117 border: 1px solid var(--rule); border-radius: 16px; 107 118 background: var(--paper-2); color: var(--ink); text-decoration: none; 108 119 transition: border-color 140ms, transform 140ms, box-shadow 140ms; … … 110 121 .roster-card:hover { 111 122 border-color: var(--accent); transform: translateY(-3px); 112 box-shadow: 0 8px 24px -12px color-mix(in srgb, var(--accent) 50%, transparent);123 box-shadow: 0 10px 28px -14px color-mix(in srgb, var(--accent) 55%, transparent); 113 124 } 114 125 .roster-avatar { 115 width: 8 4px; height: 84px; border-radius: 50%; margin-bottom: 0.4rem;116 background-size: cover; background-position: center; background-color: var(--paper);126 width: 88px; height: 88px; border-radius: 50%; margin-bottom: 0.45rem; 127 background-size: cover; background-position: center; 117 128 display: inline-flex; align-items: center; justify-content: center; 118 font-family: var(--font-display, serif); font-size: 2 rem; font-weight: 600; color: var(--accent);119 bo rder: 2px solid color-mix(in srgb, var(--accent) 30%, var(--rule));129 font-family: var(--font-display, serif); font-size: 2.1rem; font-weight: 700; color: #fff; 130 box-shadow: inset 0 0 0 2px rgba(255,255,255,.18); 120 131 } 121 .roster-name { font-weight: 700; font-size: 1. 08rem; }132 .roster-name { font-weight: 700; font-size: 1.1rem; } 122 133 .roster-tag { color: var(--ink-muted); font-size: 0.82rem; } 123 134 .roster-count { 124 margin-top: 0.3 rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em;135 margin-top: 0.35rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; 125 136 color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); 126 137 padding: 0.15rem 0.6rem; border-radius: 99px; … … 151 162 152 163 @media (max-width: 560px) { 153 .hub-hero-inner { padding: 2. 75rem 1rem 2.25rem; }164 .hub-hero-inner { padding: 2.5rem 1rem; } 154 165 .feed-cover { width: 52px; height: 52px; } 155 166 .feed-arrow { display: none; } -
src/views/shell.ejs
r6e0249f r4c5169f 239 239 <body class="<%= bodyClass || 'on-home' %> has-bottom-tab" data-feed-view="<%= _e(safeSite.feed_view_default || 'timeline') %>" data-grid-cols="3"> 240 240 241 <%- include('partials/topnav') %> 242 243 <%- include('partials/profile-header') %> 241 <%# Hub-overview is een standalone landing: geen masthead/profile-header/ 242 view-switcher — die horen bij een PrutFolio (en verschijnen dus op /user/- 243 pagina's). De landing begint meteen met de hero. %> 244 <% var isHubLanding = (typeof bodyClass === 'string' && bodyClass.indexOf('on-hub') >= 0); %> 245 246 <% if (!isHubLanding) { %> 247 <%- include('partials/topnav') %> 248 <%- include('partials/profile-header') %> 249 <% } %> 244 250 245 251 <%# View switcher — visible on every non-admin page. On feed pages … … 247 253 on non-feed pages (post, account, search, auth) it navigates to / 248 254 in the chosen view. Click logic is in shell.ejs at the bottom. %> 249 <% if (!isAdminPage ) { %>255 <% if (!isAdminPage && !isHubLanding) { %> 250 256 <%- include('partials/view-switcher') %> 251 257 <% } %> … … 262 268 <%- include('partials/footer') %> 263 269 264 <!-- Mobile bottom-tab navigation (auto-hidden ≥768px) --> 270 <!-- Mobile bottom-tab navigation (auto-hidden ≥768px) — niet op de hub-landing --> 271 <% if (!isHubLanding) { %> 265 272 <%- include('partials/bottom-tab') %> 273 <% } %> 266 274 267 275 <!-- Mobile profile sheet (auto-hidden ≥768px; only rendered when logged in) -->
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)