feat(hephaestus.x): landing 'Sign in' becomes a Bitcoin Cash wallet dropdown

- site/hephaestus.x/index.html: replace single 'Sign in with wallet' CTA with
  a <details> dropdown labelled 'Bitcoin Cash wallet'. Menu items:
    Sign in       -> /user/oauth2/hephaestus-wallet#import
    Sign up       -> /user/oauth2/hephaestus-wallet#create   (pill: easiest)
    WizardConnect -> /user/oauth2/hephaestus-wallet#connect  (pill: most private)
  Same emoji + copy scheme as the wallet accordion, so the landing previews
  the choices the user will see after clicking through.

- Hephaestus/auth-proxy/public/wallet.js: renderTabs() now reads location.hash
  and auto-opens the matching <details> option on load (create/import/connect).
  Fragments survive Forgejo's OAuth redirect chain, so a click on 'Sign up'
  from the landing lands the user directly on the Create accordion.
This commit is contained in:
Local Dev 2026-09-02 22:13:55 +02:00
parent e1aad3cb16
commit f4a6c85c3e

View file

@ -22,12 +22,42 @@
h1{font-size:clamp(2.2rem,6vw,3.4rem);margin:.5rem 0 .3rem;letter-spacing:-0.01em}
h1 .g{color:var(--acid)}
.tag{color:var(--mut);font-size:1.1rem;max-width:600px;margin:0 auto}
.cta{margin-top:2rem;display:flex;gap:10px;justify-content:center;flex-wrap:wrap}
.cta{margin-top:2rem;display:flex;gap:10px;justify-content:center;flex-wrap:wrap;align-items:flex-start}
.btn{display:inline-block;text-decoration:none;padding:12px 22px;border-radius:10px;font-size:14.5px;font-weight:500;
border:1px solid var(--line);color:var(--ink);background:transparent;transition:filter .1s,background .1s}
.btn.acid{background:var(--acid);color:#0b0e14;font-weight:600;border-color:var(--acid)}
.btn:hover{filter:brightness(1.12);background:var(--panel)}
.btn.acid:hover{background:var(--acid)}
/* wallet dropdown */
details.wallet-dd{position:relative;display:inline-block;text-align:left}
details.wallet-dd > summary{
list-style:none;cursor:pointer;user-select:none;
background:var(--acid);color:#0b0e14;font-weight:600;
padding:12px 22px;border-radius:10px;font-size:14.5px;
border:1px solid var(--acid);display:inline-flex;align-items:center;gap:8px;
}
details.wallet-dd > summary::-webkit-details-marker{display:none}
details.wallet-dd > summary::marker{content:""}
details.wallet-dd > summary .chev{transition:transform .15s;display:inline-block;font-size:11px}
details.wallet-dd[open] > summary .chev{transform:rotate(180deg)}
details.wallet-dd .menu{
position:absolute;top:calc(100% + 8px);left:0;min-width:280px;z-index:20;
background:var(--panel);border:1px solid var(--line);border-radius:12px;
padding:6px;display:flex;flex-direction:column;gap:2px;
box-shadow:0 12px 32px rgba(0,0,0,.35);
}
details.wallet-dd .menu a{
display:grid;grid-template-columns:26px 1fr;gap:10px;align-items:start;
padding:10px 12px;border-radius:8px;text-decoration:none;color:var(--ink);
}
details.wallet-dd .menu a:hover{background:var(--panel2)}
details.wallet-dd .menu .ico{font-size:18px;line-height:1.2}
details.wallet-dd .menu b{display:block;font-size:14px;font-weight:600;color:var(--ink)}
details.wallet-dd .menu .sub{display:block;font-size:12px;color:var(--mut);margin-top:2px;line-height:1.4}
details.wallet-dd .menu .pill{
display:inline-block;font-size:10px;padding:0 6px;margin-left:6px;border-radius:999px;
background:rgba(214,255,61,.15);color:var(--acid);font-weight:500;text-transform:lowercase;letter-spacing:.02em;vertical-align:middle;
}
section.facts{padding:3rem 0 1rem}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px}
.card{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:20px 22px}
@ -57,8 +87,33 @@
<h1><span class="g">Hephaestus</span></h1>
<p class="tag">A code host you sign in to with a Bitcoin Cash wallet. No email, no password reset, no middleman.</p>
<div class="cta">
<a class="btn acid" href="https://code.silentmode.st/user/oauth2/hephaestus-wallet">Sign in with wallet →</a>
<a class="btn" href="https://code.silentmode.st/explore/repos">Browse repos</a>
<details class="wallet-dd">
<summary>Bitcoin Cash wallet <span class="chev"></span></summary>
<div class="menu" role="menu">
<a href="https://code.silentmode.st/user/oauth2/hephaestus-wallet#import" role="menuitem">
<span class="ico">🔑</span>
<span>
<b>Sign in</b>
<span class="sub">Import a wallet you already have — 12- or 24-word recovery phrase.</span>
</span>
</a>
<a href="https://code.silentmode.st/user/oauth2/hephaestus-wallet#create" role="menuitem">
<span class="ico"></span>
<span>
<b>Sign up<span class="pill">easiest</span></b>
<span class="sub">Create a new wallet in the browser. Write the recovery phrase down.</span>
</span>
</a>
<a href="https://code.silentmode.st/user/oauth2/hephaestus-wallet#connect" role="menuitem">
<span class="ico">🪄</span>
<span>
<b>WizardConnect<span class="pill">most private</span></b>
<span class="sub">Sign with Cashonize or Paytaca — your keys never leave the wallet.</span>
</span>
</a>
</div>
</details>
<a class="btn" href="/explore/repos">Browse repos</a>
<a class="btn" href="https://silentmode.st/hephaestus/">Read the docs</a>
</div>
</header>