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