source: Klonkt/src/views/pages/epk.ejs@ 4885eab

main
Last change on this file since 4885eab 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: 5.9 KB
Line 
1<%
2 // Duur mm:ss
3 function fmtDur(s){ s = parseInt(s,10)||0; var m=Math.floor(s/60), x=s%60; return m+':'+String(x).padStart(2,'0'); }
4 var _accent = (site && site.accent) ? site.accent : '';
5 var _photo = (site && site.profile_photo) ? site.profile_photo : '';
6 var _isMail = epkContact && epkContact.indexOf('@') !== -1 && epkContact.indexOf(' ') === -1;
7 var _isUrl = epkContact && /^https?:\/\//i.test(epkContact);
8%>
9<section class="epk" <%= _accent ? ('style="--epk-accent:' + _accent + '"') : '' %>>
10 <header class="epk-hero">
11 <% if (_photo) { %><div class="epk-photo"><img src="<%= _photo %>" alt="<%= site.title %>"></div><% } %>
12 <div class="epk-hero-text">
13 <div class="epk-kicker"><%= t('epk.kicker') %><% if (typeof user !== 'undefined' && user && user.role === 'god') { %> <a class="epk-edit-link" href="/admin/epk">✎ <%= t('epk.edit') %></a><% } %></div>
14 <h1 class="epk-title"><%= site.title %></h1>
15 <% if (epkBio) { %><p class="epk-bio"><%= epkBio %></p><% } %>
16 <div class="epk-actions">
17 <% if (_isMail) { %>
18 <a class="epk-btn epk-btn-primary" href="mailto:<%= epkContact %>">✉ <%= t('epk.contact_booking') %></a>
19 <% } else if (_isUrl) { %>
20 <a class="epk-btn epk-btn-primary" href="<%= epkContact %>" target="_blank" rel="noopener"><%= t('epk.contact_booking') %></a>
21 <% } %>
22 <a class="epk-btn" href="<%= siteUrlBase %>/"><%= t('epk.view_site') %></a>
23 <% if (_photo) { %><a class="epk-btn" href="<%= _photo %>" download>⬇ <%= t('epk.press_photo') %></a><% } %>
24 </div>
25 </div>
26 </header>
27
28 <% if (epkTracks && epkTracks.length) { %>
29 <div class="epk-block">
30 <h2 class="epk-h2"><%= t('epk.most_played') %></h2>
31 <ul class="epk-tracks">
32 <% epkTracks.forEach(function(t, i){ %>
33 <li class="epk-track">
34 <span class="epk-rank"><%= i + 1 %></span>
35 <% if (t.cover_url) { %><span class="epk-cover" style="background-image:url('<%= t.cover_url %>')"></span><% } else { %><span class="epk-cover epk-cover-empty">♪</span><% } %>
36 <span class="epk-track-meta">
37 <span class="epk-track-title"><%= t.title %></span>
38 <% if (t.artist) { %><span class="epk-track-artist"><%= t.artist %></span><% } %>
39 </span>
40 <% if (t.duration) { %><span class="epk-track-dur"><%= fmtDur(t.duration) %></span><% } %>
41 </li>
42 <% }); %>
43 </ul>
44 </div>
45 <% } %>
46
47 <% if (epkPosts && epkPosts.length) { %>
48 <div class="epk-block">
49 <h2 class="epk-h2"><%= t('epk.recent') %></h2>
50 <ul class="epk-posts">
51 <% epkPosts.forEach(function(p){ %>
52 <li><a href="<%= siteUrlBase %>/<%= p.slug %>"><%= p.title %></a></li>
53 <% }); %>
54 </ul>
55 </div>
56 <% } %>
57
58 <footer class="epk-foot">
59 <% if (_isMail) { %><a href="mailto:<%= epkContact %>"><%= epkContact %></a> · <% } %>
60 <a href="<%= siteUrlBase %>/"><%= site.title %></a>
61 </footer>
62</section>
63
64<style>
65 .epk { max-width: 860px; margin: 0 auto; padding: 28px 18px 64px; --epk-accent: var(--accent, #6b8f71); }
66 .epk-hero { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; margin-bottom: 40px; }
67 .epk-photo { flex: 0 0 auto; }
68 .epk-photo img { width: 190px; height: 190px; object-fit: cover; border-radius: 18px; box-shadow: 0 8px 30px rgba(0,0,0,.18); }
69 .epk-hero-text { flex: 1 1 280px; min-width: 240px; }
70 .epk-kicker { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 700; color: var(--epk-accent); margin-bottom: 6px; }
71 .epk-edit-link { text-transform: none; letter-spacing: normal; font-weight: 600; font-size: 12px; margin-left: 8px; padding: 2px 8px; border: 1px solid rgba(128,128,128,.4); border-radius: 999px; color: inherit; opacity: .8; text-decoration: none; }
72 .epk-edit-link:hover { opacity: 1; border-color: var(--epk-accent); color: var(--epk-accent); }
73 .epk-title { font-size: clamp(30px, 6vw, 52px); line-height: 1.05; margin: 0 0 12px; }
74 .epk-bio { font-size: 16px; line-height: 1.6; opacity: .9; margin: 0 0 18px; max-width: 52ch; white-space: pre-line; }
75 .epk-actions { display: flex; gap: 10px; flex-wrap: wrap; }
76 .epk-btn { display: inline-block; padding: 9px 15px; border-radius: 999px; border: 1px solid rgba(128,128,128,.35); text-decoration: none; font-size: 13.5px; font-weight: 600; color: inherit; }
77 .epk-btn-primary { background: var(--epk-accent); border-color: var(--epk-accent); color: #fff; }
78 .epk-block { margin: 34px 0; }
79 .epk-h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; opacity: .6; margin: 0 0 14px; }
80 .epk-tracks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
81 .epk-track { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid rgba(128,128,128,.18); border-radius: 12px; }
82 .epk-rank { flex: 0 0 auto; width: 20px; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; opacity: .45; }
83 .epk-cover { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 8px; background-size: cover; background-position: center; display: grid; place-items: center; }
84 .epk-cover-empty { background: var(--epk-accent); color: #fff; opacity: .85; }
85 .epk-track-meta { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
86 .epk-track-title { font-weight: 600; }
87 .epk-track-artist { font-size: 12.5px; opacity: .65; }
88 .epk-track-dur { font-variant-numeric: tabular-nums; opacity: .6; font-size: 13px; }
89 .epk-posts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
90 .epk-posts a { text-decoration: none; color: inherit; border-bottom: 1px solid transparent; }
91 .epk-posts a:hover { border-bottom-color: var(--epk-accent); }
92 .epk-foot { margin-top: 44px; padding-top: 18px; border-top: 1px solid rgba(128,128,128,.2); font-size: 13px; opacity: .7; }
93 .epk-foot a { color: inherit; }
94</style>
Note: See TracBrowser for help on using the repository browser.