Fix gallery HTML structure bug and replace email auth with OTP flow

Gallery: remove <a> from share allowlist. Gallery cards wrap content in
<a class="gal-link">; allowing <a> in sanitized answer HTML causes nested
anchors that the HTML5 adoption agency algorithm resolves by restructuring
the DOM, producing mismatched </div> tags that leave gallery-grid open and
pull sibling elements into the grid as spurious grid columns.

Account: replace email+password sign-up/sign-in with magic-link OTP.
supabase.auth.signInWithOtp handles both new and existing users in one
flow. Existing onAuthStateChange listener (dadeb8ddb9a8.js) retained for
post-redirect dashboard display. sendMagicLink added to extract-js
RESERVED_GLOBALS so the obfuscator does not mangle the onclick reference.
This commit is contained in:
Will Anderson
2026-05-04 10:04:22 -05:00
parent 0e51225564
commit 246a5f0967
5 changed files with 27 additions and 17 deletions
+7 -10
View File
@@ -652,8 +652,8 @@ fn account_page(supabase_url: String, supabase_anon_key: String) -> String {
<circle cx=\"12\" cy=\"7\" r=\"4\"/>
</svg>
</div>
<h1 class=\"signin-title\">Sign in to view your account</h1>
<p class=\"signin-sub\">Use the same sign-in method you used when you signed up.</p>
<h1 class=\"signin-title\">Sign in to your account</h1>
<p class=\"signin-sub\">Enter your email to receive a sign-in link, or continue with a social account.</p>
<!-- Single width-controlled container for ALL sign-in options -->
<div style=\"width:100%;max-width:20rem;margin:0 auto;display:flex;flex-direction:column;gap:.75rem\">
<button type=\"button\" class=\"signin-btn\" id=\"btn-google\" onclick=\"signInWith('google')\">
@@ -680,15 +680,10 @@ fn account_page(supabase_url: String, supabase_anon_key: String) -> String {
<input type=\"email\" id=\"acct-email-input\" placeholder=\"Email address\" autocomplete=\"email\"
style=\"font-family:var(--body);font-size:.875rem;font-weight:300;color:var(--t1);background:#fff;border:1px solid var(--border2);padding:.875rem 1rem;outline:none;transition:border-color .2s;width:100%;box-sizing:border-box\">
<input type=\"password\" id=\"acct-pass-input\" placeholder=\"Password\" autocomplete=\"current-password\"
style=\"font-family:var(--body);font-size:.875rem;font-weight:300;color:var(--t1);background:#fff;border:1px solid var(--border2);padding:.875rem 1rem;outline:none;transition:border-color .2s;width:100%;box-sizing:border-box\">
<button type=\"button\" id=\"acct-signin-btn\" onclick=\"signInWithEmail()\"
<button type=\"button\" id=\"acct-magic-btn\" onclick=\"sendMagicLink()\"
style=\"font-family:var(--body);font-size:.75rem;font-weight:500;letter-spacing:.14em;text-transform:uppercase;color:#fff;background:var(--navy);border:none;padding:.875rem 1rem;cursor:pointer;transition:background .2s;width:100%;box-sizing:border-box\">
Sign in
Continue with email
</button>
<p id=\"acct-mode-hint\" style=\"font-family:var(--body);font-size:.8rem;font-weight:300;color:var(--t3);text-align:center\">
No account? <a href=\"#\" onclick=\"switchToSignUp();return false;\" style=\"color:var(--navy)\">Create one</a>
</p>
<p id=\"acct-email-msg\" style=\"display:none;font-size:.8rem;text-align:center;margin-top:.25rem\"></p>
</div>
</div>
@@ -896,7 +891,9 @@ fn account_page(supabase_url: String, supabase_anon_key: String) -> String {
</div>
<script src=\"https://cdn.jsdelivr.net/npm/@supabase/supabase-js@2/dist/umd/supabase.min.js\"></script>
<script>window.NEURON_CFG=window.NEURON_CFG||{};window.NEURON_CFG.supabase_url=\"" + supabase_url + "\";window.NEURON_CFG.supabase_anon_key=\"" + supabase_anon_key + "\";</script><script src=\"/assets/js/dadeb8ddb9a8.js\" defer></script>
<script>window.NEURON_CFG=window.NEURON_CFG||{};window.NEURON_CFG.supabase_url=\"" + supabase_url + "\";window.NEURON_CFG.supabase_anon_key=\"" + supabase_anon_key + "\";</script>
<script src=\"/assets/js/77e923ac5855.js\" defer></script>
<script src=\"/assets/js/dadeb8ddb9a8.js\" defer></script>
</body>
</html>"