| 1 | <%
|
|---|
| 2 | var _site = site || {};
|
|---|
| 3 | var _title = _site.title || t('news.this_artist');
|
|---|
| 4 | var st = (typeof nlState !== 'undefined') ? nlState : 'form';
|
|---|
| 5 | %>
|
|---|
| 6 | <section class="nl">
|
|---|
| 7 | <div class="nl-card">
|
|---|
| 8 | <% if (st === 'form') { %>
|
|---|
| 9 | <h1 class="nl-h1"><%= t('news.form_title') %></h1>
|
|---|
| 10 | <p class="nl-sub"><%= t('news.form_sub_before') %><strong><%= _title %></strong><%= t('news.form_sub_after') %></p>
|
|---|
| 11 | <form method="POST" action="<%= siteUrlBase %>/nieuwsbrief" class="nl-form">
|
|---|
| 12 | <input type="email" name="email" required placeholder="<%= t('news.email_ph') %>" value="<%= (typeof nlPrefill !== 'undefined') ? nlPrefill : '' %>" autocomplete="email">
|
|---|
| 13 | <button type="submit" class="nl-btn"><%= t('news.subscribe') %></button>
|
|---|
| 14 | </form>
|
|---|
| 15 | <% } else if (st === 'check') { %>
|
|---|
| 16 | <h1 class="nl-h1"><%= t('news.check_title') %></h1>
|
|---|
| 17 | <p class="nl-sub"><%= t('news.check_sub_before') %><strong><%= (typeof nlEmail!=='undefined')?nlEmail:t('news.your_address') %></strong><%= t('news.check_sub_after') %></p>
|
|---|
| 18 | <% } else if (st === 'done') { %>
|
|---|
| 19 | <h1 class="nl-h1"><%= t('news.done_title') %></h1>
|
|---|
| 20 | <p class="nl-sub"><%= t('news.done_sub_before') %><strong><%= _title %></strong><%= t('news.done_sub_after') %></p>
|
|---|
| 21 | <% } else if (st === 'confirmed') { %>
|
|---|
| 22 | <h1 class="nl-h1"><%= t('news.confirmed_title') %></h1>
|
|---|
| 23 | <p class="nl-sub"><%= t('news.confirmed_sub_before') %><strong><%= _title %></strong><%= t('news.confirmed_sub_after') %></p>
|
|---|
| 24 | <% } else if (st === 'unsubbed') { %>
|
|---|
| 25 | <h1 class="nl-h1"><%= t('news.unsubbed_title') %></h1>
|
|---|
| 26 | <p class="nl-sub"><%= t('news.unsubbed_sub') %></p>
|
|---|
| 27 | <% } else if (st === 'invalid') { %>
|
|---|
| 28 | <h1 class="nl-h1"><%= t('news.invalid_title') %></h1>
|
|---|
| 29 | <p class="nl-sub"><%= t('news.invalid_sub') %></p>
|
|---|
| 30 | <p><a class="nl-btn nl-btn-ghost" href="<%= siteUrlBase %>/nieuwsbrief"><%= t('news.back') %></a></p>
|
|---|
| 31 | <% } else if (st === 'smtperror') { %>
|
|---|
| 32 | <h1 class="nl-h1"><%= t('news.smtperror_title') %></h1>
|
|---|
| 33 | <p class="nl-sub"><%= t('news.smtperror_sub') %></p>
|
|---|
| 34 | <% } else if (st === 'badtoken') { %>
|
|---|
| 35 | <h1 class="nl-h1"><%= t('news.badtoken_title') %></h1>
|
|---|
| 36 | <p class="nl-sub"><%= t('news.badtoken_sub') %></p>
|
|---|
| 37 | <p><a class="nl-btn nl-btn-ghost" href="<%= siteUrlBase %>/nieuwsbrief"><%= t('news.to_subscribe') %></a></p>
|
|---|
| 38 | <% } else { %>
|
|---|
| 39 | <h1 class="nl-h1"><%= t('news.error_title') %></h1>
|
|---|
| 40 | <p class="nl-sub"><%= t('news.error_sub') %></p>
|
|---|
| 41 | <% } %>
|
|---|
| 42 | </div>
|
|---|
| 43 | </section>
|
|---|
| 44 |
|
|---|
| 45 | <style>
|
|---|
| 46 | .nl { max-width: 560px; margin: 0 auto; padding: 48px 18px; }
|
|---|
| 47 | .nl-card { border: 1px solid rgba(128,128,128,.2); border-radius: 18px; padding: 32px 28px; }
|
|---|
| 48 | .nl-h1 { font-size: clamp(24px, 5vw, 34px); margin: 0 0 10px; }
|
|---|
| 49 | .nl-sub { font-size: 15.5px; line-height: 1.6; opacity: .85; margin: 0 0 20px; }
|
|---|
| 50 | .nl-form { display: flex; gap: 10px; flex-wrap: wrap; }
|
|---|
| 51 | .nl-form input { flex: 1 1 220px; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(128,128,128,.4); background: transparent; color: inherit; font-size: 15px; }
|
|---|
| 52 | .nl-btn { padding: 12px 20px; border-radius: 10px; border: none; background: var(--accent, #6b8f71); color: #fff; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; display: inline-block; }
|
|---|
| 53 | .nl-btn-ghost { background: transparent; color: inherit; border: 1px solid rgba(128,128,128,.4); }
|
|---|
| 54 | </style>
|
|---|