Changeset 9019a3e in Klonkt for src/views/pages/paid-gate.ejs


Ignore:
Timestamp:
07/21/2026 02:42:30 AM (7 weeks ago)
Author:
Robin <roboburr@…>
Branches:
main
Children:
c7a211d
Parents:
c3d12a6
git-author:
Robin <roboburr@…> (07/21/2026 02:42:27 AM)
git-committer:
Robin <roboburr@…> (07/21/2026 02:42:30 AM)
Message:

Feature: prominent "Word supporter" button on the paid gate

The gate only had a small "word het op Patreon" text line, easy to miss,
so a new visitor didn't see paying as the first step. When the owner has
set the public Patreon page, the gate now shows two clear buttons: "Word
supporter op Patreon" (primary) and "Al supporter? Ontgrendelen" (ghost,
for those who already pledge). Without a Patreon page set it falls back to
a single "Ontgrendelen met Patreon" button.

Changed files:
src/views/pages/paid-gate.ejs

  • two-button actions block + .pg-actions/.pg-btn-ghost styles; anchors styled as buttons (display/text-align/text-decoration)

-robo
Co-Authored-By: Claude Opus 4.8 <noreply@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/views/pages/paid-gate.ejs

    rc3d12a6 r9019a3e  
    1010  <% } %>
    1111
     12  <% var _hasPatron = (typeof pgPatronUrl !== 'undefined' && pgPatronUrl); %>
    1213  <section class="pg-card">
    1314    <div class="pg-lock">💶</div>
    1415    <h2 class="pg-h2">Voor supporters</h2>
    1516    <p class="pg-sub">
    16       Deze post is voor supporters van deze site. Steun je de maker op Patreon
    17       <% if (typeof pgCents !== 'undefined' && pgCents) { %>(vanaf &euro;<%= (pgCents/100).toFixed(2) %>)<% } %>,
    18       dan ontgrendel je 'm met je passkey. Geen account, geen cookie.
     17      Deze post is voor supporters van deze site
     18      <% if (typeof pgCents !== 'undefined' && pgCents) { %>(vanaf &euro;<%= (pgCents/100).toFixed(2) %> per maand op Patreon)<% } %>.
     19      Word supporter en ontgrendel 'm daarna met een passkey. Geen account op deze site, geen cookie.
    1920    </p>
    20     <button type="button" id="pg-unlock" class="pg-btn">Ontgrendelen</button>
     21
     22    <div class="pg-actions">
     23      <% if (_hasPatron) { %>
     24        <a class="pg-btn" href="<%= pgPatronUrl %>" target="_blank" rel="noopener">Word supporter op Patreon</a>
     25        <button type="button" id="pg-unlock" class="pg-btn pg-btn-ghost">Al supporter? Ontgrendelen</button>
     26      <% } else { %>
     27        <button type="button" id="pg-unlock" class="pg-btn">Ontgrendelen met Patreon</button>
     28      <% } %>
     29    </div>
    2130    <p id="pg-status" class="pg-status" hidden></p>
    22     <% if (typeof pgPatronUrl !== 'undefined' && pgPatronUrl) { %>
    23       <p class="pg-join">Nog geen supporter? <a href="<%= pgPatronUrl %>" target="_blank" rel="noopener">Word het op Patreon</a> en ontgrendel daarna met je passkey.</p>
    24     <% } %>
    2531  </section>
    2632</article>
     
    8692  .pg-h2 { font-size: 22px; margin: 0 0 8px; }
    8793  .pg-sub { opacity: .85; line-height: 1.6; margin: 0 auto 12px; max-width: 34em; }
    88   .pg-btn { padding: 12px 24px; border: none; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer;
     94  .pg-btn { display: inline-block; text-align: center; text-decoration: none; padding: 12px 24px; border: none; border-radius: 10px; font: inherit; font-weight: 600; cursor: pointer;
    8995    background: var(--accent, #6b8f71); color: #fff; }
    9096  .pg-btn:disabled { opacity: .6; cursor: default; }
     97  .pg-btn:hover { filter: brightness(1.05); }
     98  .pg-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; max-width: 320px; margin: 0 auto; }
     99  .pg-btn-ghost { background: transparent; color: var(--ink, #222); border: 1px solid color-mix(in srgb, var(--ink, #000) 22%, transparent); }
    91100  .pg-status { margin: 12px 0 0; opacity: .9; }
    92101  .pg-status.is-err { color: #c0392b; }
    93   .pg-join { margin: 14px 0 0; font-size: .92rem; opacity: .8; }
    94102</style>
Note: See TracChangeset for help on using the changeset viewer.