Skip to main content

max / makenotwork

4.0 KB · 86 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 hx-post="/api/validate/username"
40 hx-trigger="keyup changed delay:500ms"
41 hx-target="#username-status"
42 hx-indicator="#username-spinner">
43 <div class="hint">Your public url: makenot.work/u/<span id="username-preview">username</span></div>
44 <span id="username-spinner" class="htmx-indicator username-spinner">Checking...</span>
45 <span id="username-status"></span>
46 </div>
47
48 <div class="form-group">
49 <label for="wiz-email">Email</label>
50 <input type="email" id="wiz-email" name="email" required
51 placeholder="you@example.com" autocomplete="email" value="{{ email }}"
52 {% if error_field.as_deref() == Some("email") %}aria-invalid="true"{% endif %}>
53 <div class="hint">Used for account recovery and notifications</div>
54 </div>
55
56 <div class="form-group">
57 <label for="wiz-password">Password</label>
58 <input type="password" id="wiz-password" name="password" required
59 placeholder="--------" minlength="8" autocomplete="new-password"
60 {% if error_field.as_deref() == Some("password") %}aria-invalid="true"{% endif %}>
61 <div class="hint">Minimum 8 characters</div>
62 </div>
63
64 {% if let Some(code) = invite_code %}
65 <input type="hidden" name="invite_code" value="{{ code }}">
66 {% endif %}
67
68 <div class="wizard-actions">
69 <a href="/" class="btn-secondary">Cancel</a>
70 <button type="submit" class="btn-primary">Create Account</button>
71 </div>
72 </form>
73
74 <div class="foot-link foot-link--centered">
75 Already have an account? <a href="/login">Log in</a>
76 </div>
77 </div>
78 </div>
79 </div>
80 {% endblock %}
81
82 {% block scripts %}
83 <script src="/static/wizard.js"></script>
84 <script src="/static/wizard-join-inline.js?v=0623"></script>
85 {% endblock %}
86