Skip to main content

max / makenotwork

4.2 KB · 89 lines History Blame Raw
1 {% extends "base.html" %}
2
3 {% block title %}Join - Makenot.work{% endblock %}
4 {% block body_attrs %} class="padded-page"{% endblock %}
5
6 {% block head %}
7 <link rel="stylesheet" href="/static/wizard.css">
8 {% endblock %}
9
10 {% block content %}
11 <div class="wizard-layout">
12 <aside class="wizard-sidebar">
13 <h2 class="subtitle-h2">Join</h2>
14 {% include "wizards/partials/step_nav.html" %}
15 </aside>
16
17 <div class="wizard-content" id="wizard-step">
18 <div class="wizard-step">
19 <h2 class="subtitle-h2">Create account</h2>
20 <p class="step-description">Makenot.work is a 0% fee platform where creators sell directly to fans. Sign up to browse, buy, or sell your own work.</p>
21
22 {% if let Some(code) = invite_code %}
23 <div class="info-box mb-4">
24 You were invited: no pitch required. Just create your account.
25 </div>
26 {% endif %}
27
28 {% if let Some(err) = error %}
29 <div class="info-box info-box--error mb-4" role="alert">{{ err }}</div>
30 {% endif %}
31
32 <form hx-post="/join/step/account"
33 hx-target="#wizard-step" hx-swap="innerHTML">
34 <div class="form-group">
35 <label for="wiz-username">Username</label>
36 <input type="text" id="wiz-username" name="username" required
37 placeholder="username" autocomplete="off" value="{{ username }}"
38 {% if error_field.as_deref() == Some("username") %}aria-invalid="true"{% endif %}
39 aria-describedby="wiz-username-hint"
40 hx-post="/api/validate/username"
41 hx-trigger="keyup changed delay:500ms"
42 hx-target="#username-status"
43 hx-indicator="#username-spinner">
44 <div class="hint" id="wiz-username-hint">Your public url: makenot.work/u/<span id="username-preview">username</span></div>
45 <span id="username-spinner" class="htmx-indicator username-spinner">Checking...</span>
46 <span id="username-status"></span>
47 </div>
48
49 <div class="form-group">
50 <label for="wiz-email">Email</label>
51 <input type="email" id="wiz-email" name="email" required
52 placeholder="you@example.com" autocomplete="email" value="{{ email }}"
53 {% if error_field.as_deref() == Some("email") %}aria-invalid="true"{% endif %}
54 aria-describedby="wiz-email-hint">
55 <div class="hint" id="wiz-email-hint">Used for account recovery and notifications</div>
56 </div>
57
58 <div class="form-group">
59 <label for="wiz-password">Password</label>
60 <input type="password" id="wiz-password" name="password" required
61 placeholder="--------" minlength="8" autocomplete="new-password"
62 {% if error_field.as_deref() == Some("password") %}aria-invalid="true"{% endif %}
63 aria-describedby="wiz-password-hint">
64 <div class="hint" id="wiz-password-hint">Minimum 8 characters</div>
65 </div>
66
67 {% if let Some(code) = invite_code %}
68 <input type="hidden" name="invite_code" value="{{ code }}">
69 {% endif %}
70
71 <div class="wizard-actions">
72 <a href="/" class="btn-secondary">Cancel</a>
73 <button type="submit" class="btn-primary">Create Account</button>
74 </div>
75 </form>
76
77 <div class="foot-link foot-link--centered">
78 Already have an account? <a href="/login">Log in</a>
79 </div>
80 </div>
81 </div>
82 </div>
83 {% endblock %}
84
85 {% block scripts %}
86 <script src="/static/wizard.js"></script>
87 <script src="/static/wizard-join-inline.js?v=0623"></script>
88 {% endblock %}
89