Changeset da6fd02 in Klonkt for src/views/partials


Ignore:
Timestamp:
06/19/2026 08:37:28 AM (3 months ago)
Author:
roboburr <roboburr@…>
Branches:
main
Children:
a474bd2
Parents:
7eb35ae
Message:

newsletter: optional sign-up in the footer (toggle in Admin → Settings)

  • setting footer_newsletter (default off). render.js passes footerNewsletter through.
  • footer.ejs shows a compact sign-up field (email + Subscribe → POST /nieuwsbrief) when the toggle is on AND premium is unlocked.
  • admin-settings: "Newsletter" card with the toggle (POST /admin/settings/footer), premium-gated.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/partials/footer.ejs

    r7eb35ae rda6fd02  
    11<footer class="site-footer">
     2  <% if (typeof footerNewsletter !== 'undefined' && footerNewsletter && (typeof premiumUnlocked === 'undefined' || premiumUnlocked) && typeof site !== 'undefined' && site) { %>
     3    <div class="container footer-nl">
     4      <span class="footer-nl-label">📬 Blijf op de hoogte</span>
     5      <form method="post" action="<%= (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : '' %>/nieuwsbrief" class="footer-nl-form">
     6        <input type="email" name="email" required placeholder="jouw@email.nl" autocomplete="email" aria-label="E-mailadres">
     7        <button type="submit">Inschrijven</button>
     8      </form>
     9    </div>
     10  <% } %>
    211  <div class="container site-footer-inner">
    312    <div>
     
    6271  }
    6372}
     73.footer-nl {
     74  max-width: 800px; margin: 0 auto 1.5rem; padding: 0 1rem;
     75  display: flex; align-items: center; justify-content: center; gap: .8rem; flex-wrap: wrap;
     76}
     77.footer-nl-label { font-weight: 600; color: var(--ink); }
     78.footer-nl-form { display: flex; gap: .5rem; flex-wrap: wrap; }
     79.footer-nl-form input {
     80  padding: .5rem .7rem; border-radius: 8px; border: 1px solid var(--rule);
     81  background: var(--paper); color: var(--ink); font-size: .9rem; min-width: 200px;
     82}
     83.footer-nl-form button {
     84  padding: .5rem 1rem; border-radius: 8px; border: none; cursor: pointer;
     85  background: var(--accent); color: #fff; font-weight: 600; font-size: .9rem;
     86}
     87@media (max-width: 600px) { .footer-nl { flex-direction: column; } .footer-nl-form input { min-width: 0; flex: 1; } }
     88
    6489.site-footer-inner {
    6590  max-width: 800px;
Note: See TracChangeset for help on using the changeset viewer.