forked from
oppi.li/at-advent
this repo has no description
1{% extends "layout.askama.html" %}
2
3{% block content %}
4<h2 class="text-xl mb-4">Login</h2>
5<p class="mb-4">Enter your Bluesky handle to continue.</p>
6{% if let Some(err) = error %}
7<div class="alert alert-error mb-4">{{ err }}</div>
8{% endif %}
9<form id="handle-form" class="flex gap-2" onsubmit="return goToHandle(event)">
10 <input id="handle-input" type="text" name="handle" placeholder="you.bsky.social" class="input input-bordered"
11 required/>
12 <button class="btn" type="submit">Continue</button>
13</form>
14<script>
15
16 function goToHandle(e) {
17 e.preventDefault();
18 const input = document.getElementById('handle-input');
19 const handle = (input.value || '').trim();
20 if (!handle) return false;
21 const encoded = encodeURIComponent(handle);
22 // Redirect to /handle/{handle}
23 window.location.href = `/login/${encoded}`;
24 return false;
25 }
26</script>
27{% endblock %}