source: Klonkt/src/views/pages/shows.ejs@ b258a79

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

feat(i18n phase 2): admin dashboard + public calendar/downloads translated + language switcher in admin

  • Language switcher (select) also in the admin dashboard → choice for god/admin.
  • Translated: admin dashboard (title, tagline, all shortcuts, statistics, sections, table headers, post row), public calendar (shows) + downloads (incl. fix: loop var 't' shadowed the translate t() → label fetched upfront).
  • Dictionary extended (nl/en/de). Remaining admin sub-pages to follow.

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

  • Property mode set to 100644
File size: 3.8 KB
RevLine 
[8d32dcf]1<%
2 var ss = (typeof shows !== 'undefined') ? shows : [];
3 var st = (typeof notifyState !== 'undefined') ? notifyState : null;
4%>
5<section class="sh">
[91c0a39]6 <h1 class="sh-h1"><%= t('agenda.title') %></h1>
[8d32dcf]7
[91c0a39]8 <% if (st === 'done') { %><div class="sh-msg"><%= t('agenda.msg_done') %></div>
9 <% } else if (st === 'check') { %><div class="sh-msg"><%= t('agenda.msg_check') %></div>
[8d32dcf]10 <% } else if (st === 'error') { %><div class="sh-msg sh-bad"><%= (typeof notifyMsg!=='undefined')?notifyMsg:'Er ging iets mis.' %></div><% } %>
11
12 <% if (!ss.length) { %>
[91c0a39]13 <p class="sh-empty"><%= t('agenda.empty') %></p>
[8d32dcf]14 <% } else { %>
15 <ul class="sh-list">
16 <% ss.forEach(function(s){ %>
17 <li class="sh-item">
18 <span class="sh-date">
19 <span class="sh-day"><%= (s.date||'').slice(8) %></span>
20 <span class="sh-mon"><%= (s.date||'').slice(5,7) %>/<%= (s.date||'').slice(0,4) %></span>
21 </span>
22 <span class="sh-meta">
23 <span class="sh-city"><%= s.city %><% if (s.country) { %>, <%= s.country %><% } %></span>
24 <% if (s.venue) { %><span class="sh-venue"><%= s.venue %><% if (s.time) { %> · <%= s.time %><% } %></span><% } else if (s.time) { %><span class="sh-venue"><%= s.time %></span><% } %>
25 <% if (s.notes) { %><span class="sh-notes"><%= s.notes %></span><% } %>
26 </span>
[91c0a39]27 <% if (s.ticket_url) { %><a class="sh-tix" href="<%= s.ticket_url %>" target="_blank" rel="noopener"><%= t('agenda.tickets') %></a><% } %>
[8d32dcf]28 </li>
29 <% }); %>
30 </ul>
31 <% } %>
32
[6eeb459]33 <% if (!(typeof footerNewsletter !== 'undefined' && footerNewsletter)) { %>
[8d32dcf]34 <div class="sh-notify">
[91c0a39]35 <h2 class="sh-h2"><%= t('agenda.notify_h') %></h2>
36 <p class="sh-sub"><%= t('agenda.notify_sub') %></p>
[8d32dcf]37 <form method="POST" action="<%= siteUrlBase %>/shows/notify" class="sh-form">
[91c0a39]38 <input type="email" name="email" required placeholder="<%= t('common.email_placeholder') %>" autocomplete="email">
39 <button type="submit" class="sh-btn"><%= t('agenda.notify_btn') %></button>
[8d32dcf]40 </form>
41 </div>
[6eeb459]42 <% } %>
[8d32dcf]43</section>
44
45<style>
46 .sh { max-width: 640px; margin: 0 auto; padding: 32px 18px 64px; }
47 .sh-h1 { font-size: clamp(26px,5vw,38px); margin: 0 0 18px; }
48 .sh-msg { padding: 11px 14px; border-radius: 10px; background: rgba(60,160,90,.15); margin-bottom: 16px; }
49 .sh-bad { background: rgba(200,60,60,.15); }
50 .sh-list { list-style: none; margin: 0 0 36px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
51 .sh-item { display: flex; align-items: center; gap: 16px; padding: 12px 14px; border: 1px solid rgba(128,128,128,.2); border-radius: 12px; }
52 .sh-date { flex: 0 0 auto; text-align: center; min-width: 54px; }
53 .sh-day { display: block; font-size: 22px; font-weight: 700; line-height: 1; }
54 .sh-mon { font-size: 11px; opacity: .6; }
55 .sh-meta { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
56 .sh-city { font-weight: 600; }
57 .sh-venue { font-size: 13px; opacity: .7; }
58 .sh-notes { font-size: 12.5px; opacity: .6; margin-top: 2px; }
59 .sh-tix { flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; background: var(--accent,#6b8f71); color: #fff; text-decoration: none; font-weight: 600; font-size: 13px; }
60 .sh-empty { opacity: .7; margin-bottom: 36px; }
61 .sh-notify { border-top: 1px solid rgba(128,128,128,.2); padding-top: 24px; }
62 .sh-h2 { margin: 0 0 6px; font-size: 18px; }
63 .sh-sub { opacity: .8; margin: 0 0 14px; }
64 .sh-form { display: flex; gap: 10px; flex-wrap: wrap; }
65 .sh-form input { flex: 1 1 200px; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(128,128,128,.4); background: transparent; color: inherit; font-size: 15px; }
66 .sh-btn { padding: 12px 18px; border-radius: 10px; border: none; background: var(--accent,#6b8f71); color: #fff; font-weight: 600; cursor: pointer; }
67</style>
Note: See TracBrowser for help on using the repository browser.