Skip to main content

max / makenotwork

2.4 KB · 66 lines History Blame Raw
1 {% extends "base.html" %}
2
3 {% block title %}Account — Multithreaded{% endblock %}
4
5 {% block head %}<meta name="robots" content="noindex">{% endblock %}
6
7 {% block header %}{% include "partials/site_header.html" %}{% endblock %}
8
9 {% block content %}
10 <div class="container">
11 <h2 class="section-heading">Account</h2>
12
13 <div class="settings-section">
14 <h3>Signature</h3>
15 <p class="form-help">
16 A short markdown note rendered below every post you make. Fan+ subscribers may use
17 image embeds; otherwise text and links only.
18 </p>
19
20 {% if let Some(err) = error %}
21 <div class="form-error">{{ err }}</div>
22 {% endif %}
23
24 {% if has_plus %}
25 <form method="post" action="/account/signature" class="form-container">
26 <div class="form-group">
27 <label for="signature">Signature (markdown, up to 1024 characters)</label>
28 <textarea id="signature" name="signature" class="textarea-medium" maxlength="1024">{{ signature_markdown.as_deref().unwrap_or("") }}</textarea>
29 </div>
30 <div class="form-actions">
31 <button type="submit" class="primary">Save signature</button>
32 {% if signature_markdown.is_some() %}
33 <button type="submit" name="clear" value="1" class="secondary">Clear signature</button>
34 {% endif %}
35 </div>
36 </form>
37
38 {% if let Some(html) = signature_html %}
39 <h4 class="subsection-heading">Preview</h4>
40 <div class="post-signature">
41 {{ html|safe }}
42 </div>
43 {% endif %}
44 {% else %}
45 <div class="form-help">
46 Signatures are a Fan+ feature. <a href="{{ mnw_base_url }}/fan-plus">Learn more</a>.
47 </div>
48 {% endif %}
49 </div>
50
51 <div class="settings-section">
52 <h3>Status</h3>
53 <ul class="account-status">
54 <li>Fan+ subscription: <strong>{% if fan_plus %}active{% else %}inactive{% endif %}</strong></li>
55 <li>+ perks available: <strong>{% if has_plus %}yes{% else %}no{% endif %}</strong></li>
56 </ul>
57 <form method="post" action="/auth/refresh" class="form-inline">
58 <button type="submit" class="secondary">Refresh from MNW</button>
59 </form>
60 <span class="form-help">
61 Hit refresh after subscribing or upgrading on makenot.work to see changes here.
62 </span>
63 </div>
64 </div>
65 {% endblock %}
66