Add djhtml to pre-commit check (#382)

This commit is contained in:
TAKAHASHI Shuuji 2023-01-10 01:58:17 +09:00 committed by GitHub
parent 024d956e5e
commit 0c1e51322f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
38 changed files with 780 additions and 767 deletions

View file

@ -55,3 +55,10 @@ repos:
types-cachetools, types-cachetools,
types-python-dateutil, types-python-dateutil,
] ]
- repo: https://github.com/rtts/djhtml
rev: v1.5.2
hooks:
- id: djhtml
- id: djcss
- id: djjs

View file

@ -1,18 +1,18 @@
<a class="sidebar-brand{% if logo %} centered{% endif %}" href="{{ pathto(master_doc) }}"> <a class="sidebar-brand{% if logo %} centered{% endif %}" href="{{ pathto(master_doc) }}">
{% block brand_content %} {% block brand_content %}
{%- if logo_url %} {%- if logo_url %}
<div class="sidebar-logo-container"> <div class="sidebar-logo-container">
<img class="sidebar-logo" src="{{ logo_url }}" alt="Takahē"/> <img class="sidebar-logo" src="{{ logo_url }}" alt="Takahē"/>
</div> </div>
{%- endif %} {%- endif %}
{%- if theme_light_logo and theme_dark_logo %} {%- if theme_light_logo and theme_dark_logo %}
<div class="sidebar-logo-container"> <div class="sidebar-logo-container">
<img class="sidebar-logo only-light" src="{{ pathto('_static/' + theme_light_logo, 1) }}" alt="Light Logo"/> <img class="sidebar-logo only-light" src="{{ pathto('_static/' + theme_light_logo, 1) }}" alt="Light Logo"/>
<img class="sidebar-logo only-dark" src="{{ pathto('_static/' + theme_dark_logo, 1) }}" alt="Dark Logo"/> <img class="sidebar-logo only-dark" src="{{ pathto('_static/' + theme_dark_logo, 1) }}" alt="Dark Logo"/>
</div> </div>
{%- endif %} {%- endif %}
{% endblock brand_content %} {% endblock brand_content %}
</a> </a>
<div class="sidebar-tree" style="margin-top:0"> <div class="sidebar-tree" style="margin-top:0">
<ul> <ul>
<li class="toctree-l1"><a class="reference" href="https://jointakahe.org">Homepage</a></li> <li class="toctree-l1"><a class="reference" href="https://jointakahe.org">Homepage</a></li>

View file

@ -14,7 +14,7 @@
</a> liked your post </a> liked your post
</div> </div>
{% if not event.collapsed %} {% if not event.collapsed %}
{% include "activities/_post.html" with post=event.subject_post %} {% include "activities/_post.html" with post=event.subject_post %}
{% endif %} {% endif %}
{% elif event.type == "mentioned" %} {% elif event.type == "mentioned" %}
<div class="mention-banner"> <div class="mention-banner">
@ -23,7 +23,7 @@
</a> mentioned you </a> mentioned you
</div> </div>
{% if not event.collapsed %} {% if not event.collapsed %}
{% include "activities/_post.html" with post=event.subject_post %} {% include "activities/_post.html" with post=event.subject_post %}
{% endif %} {% endif %}
{% elif event.type == "boosted" %} {% elif event.type == "boosted" %}
<div class="boost-banner"> <div class="boost-banner">
@ -32,7 +32,7 @@
</a> boosted your post </a> boosted your post
</div> </div>
{% if not event.collapsed %} {% if not event.collapsed %}
{% include "activities/_post.html" with post=event.subject_post event=event %} {% include "activities/_post.html" with post=event.subject_post event=event %}
{% endif %} {% endif %}
{% else %} {% else %}
Unknown event type {{event.type}} Unknown event type {{event.type}}

View file

@ -4,8 +4,8 @@
{{ hashtag.display_name }} {{ hashtag.display_name }}
</span> </span>
{% if not hide_stats %} {% if not hide_stats %}
<span> <span>
Post count: {{ hashtag.stats.total }} Post count: {{ hashtag.stats.total }}
</span> </span>
{% endif %} {% endif %}
</a> </a>

View file

@ -4,9 +4,9 @@
<div class="post-banner"> <div class="post-banner">
{% include "identity/_identity_banner.html" with identity=identity %} {% include "identity/_identity_banner.html" with identity=identity %}
{% if created %} {% if created %}
<time> <time>
{{ event.created | timedeltashort }} {{ event.created | timedeltashort }}
</time> </time>
{% endif %} {% endif %}
</div> </div>

View file

@ -1,10 +1,10 @@
<form <form
hx-encoding='multipart/form-data' hx-encoding='multipart/form-data'
hx-post='{% url "compose_image_upload" %}' hx-post='{% url "compose_image_upload" %}'
hx-target="this" hx-target="this"
hx-swap="outerHTML" hx-swap="outerHTML"
_="on htmx:xhr:progress(loaded, total) _="on htmx:xhr:progress(loaded, total)
set #attachmentProgress.value to (loaded/total)*100"> set #attachmentProgress.value to (loaded/total)*100">
{% csrf_token %} {% csrf_token %}
{% include "forms/_field.html" with field=form.image %} {% include "forms/_field.html" with field=form.image %}
{% include "forms/_field.html" with field=form.description %} {% include "forms/_field.html" with field=form.description %}

View file

@ -9,11 +9,11 @@
</div> </div>
</div> </div>
{% if request.htmx %} {% if request.htmx %}
<button class="add-image" <button class="add-image"
hx-get='{% url "compose_image_upload" %}' hx-get='{% url "compose_image_upload" %}'
hx-target="this" hx-target="this"
hx-swap="outerHTML" hx-swap="outerHTML"
_="on load if length of <.uploaded-image/> > 3 then hide me"> _="on load if length of <.uploaded-image/> > 3 then hide me">
Add Image Add Image
</button> </button>
{% endif %} {% endif %}

View file

@ -1,4 +1,5 @@
<script type="text/hyperscript"> <script type="text/hyperscript">
{# fmt:off #}
def imageviewer.show(source) def imageviewer.show(source)
set source_url to (<img /> in source) @data-original-url set source_url to (<img /> in source) @data-original-url
set source_alt to (<img /> in source) @alt set source_alt to (<img /> in source) @alt
@ -22,6 +23,7 @@
set <#image-viewer img /> @alt to '' set <#image-viewer img /> @alt to ''
set <#image-viewer figcaption />'s textContent to '' set <#image-viewer figcaption />'s textContent to ''
end end
{# fmt:on #}
</script> </script>
<figure id="image-viewer" _="on click imageviewer.close()"> <figure id="image-viewer" _="on click imageviewer.close()">
<picture> <picture>

View file

@ -29,9 +29,9 @@
<i class="fa-solid fa-search"></i> Search <i class="fa-solid fa-search"></i> Search
</a> </a>
{% if current_page == "tag" %} {% if current_page == "tag" %}
<a href="{% url "tag" hashtag.hashtag %}" class="selected" title="Tag {{ hashtag.display_name }}"> <a href="{% url "tag" hashtag.hashtag %}" class="selected" title="Tag {{ hashtag.display_name }}">
<i class="fa-solid fa-hashtag"></i> {{ hashtag.display_name }} <i class="fa-solid fa-hashtag"></i> {{ hashtag.display_name }}
</a> </a>
{% endif %} {% endif %}
<a href="{% url "settings" %}" {% if top_section == "settings" %}class="selected"{% endif %} title="Settings"> <a href="{% url "settings" %}" {% if top_section == "settings" %}class="selected"{% endif %} title="Settings">
<i class="fa-solid fa-gear"></i> Settings <i class="fa-solid fa-gear"></i> Settings

View file

@ -3,36 +3,36 @@
<div class="post {% if reply %}reply{% endif %} {{ post.summary_class }}" data-takahe-id="{{ post.id }}" role="article" tabindex="0"> <div class="post {% if reply %}reply{% endif %} {{ post.summary_class }}" data-takahe-id="{{ post.id }}" role="article" tabindex="0">
<div class="post-banner"> <div class="post-banner">
{% include "identity/_identity_banner.html" with identity=post.author %} {% include "identity/_identity_banner.html" with identity=post.author %}
<div> <div>
<time _="on click go url {% if link_original %}{{ post.url }}{% else %}{{ post.urls.view }}{% endif %} then halt"> <time _="on click go url {% if link_original %}{{ post.url }}{% else %}{{ post.urls.view }}{% endif %} then halt">
{% if post.visibility == 0 %} {% if post.visibility == 0 %}
<i class="visibility fa-solid fa-earth-oceania" title="Public" aria-label="public"></i> <i class="visibility fa-solid fa-earth-oceania" title="Public" aria-label="public"></i>
{% elif post.visibility == 1 %} {% elif post.visibility == 1 %}
<i class="visibility fa-solid fa-lock-open" title="Unlisted" aria-label="unlisted"></i> <i class="visibility fa-solid fa-lock-open" title="Unlisted" aria-label="unlisted"></i>
{% elif post.visibility == 2 %} {% elif post.visibility == 2 %}
<i class="visibility fa-solid fa-lock" title="Followers Only" aria-label="followers only"></i> <i class="visibility fa-solid fa-lock" title="Followers Only" aria-label="followers only"></i>
{% elif post.visibility == 3 %} {% elif post.visibility == 3 %}
<i class="visibility fa-solid fa-at" title="Mentioned Only" aria-label="mentioned only"></i> <i class="visibility fa-solid fa-at" title="Mentioned Only" aria-label="mentioned only"></i>
{% elif post.visibility == 4 %} {% elif post.visibility == 4 %}
<i class="visibility fa-solid fa-link-slash" title="Local Only" aria-label="local only"></i> <i class="visibility fa-solid fa-link-slash" title="Local Only" aria-label="local only"></i>
{% endif %} {% endif %}
{% if post.published %} {% if post.published %}
<a href="{% if link_original %}{{ post.url }}{% else %}{{ post.urls.view }}{% endif %}" title="{{ post.published }}">{{ post.published | timedeltashort }}</a> <a href="{% if link_original %}{{ post.url }}{% else %}{{ post.urls.view }}{% endif %}" title="{{ post.published }}">{{ post.published | timedeltashort }}</a>
{% else %} {% else %}
<a href="{% if link_original %}{{ post.url }}{% else %}{{ post.urls.view }}{% endif %}" title="{{ post.created }}">{{ post.created | timedeltashort }}</a> <a href="{% if link_original %}{{ post.url }}{% else %}{{ post.urls.view }}{% endif %}" title="{{ post.created }}">{{ post.created | timedeltashort }}</a>
{% endif %} {% endif %}
</time> </time>
</div> </div>
</div> </div>
{% if post.summary %} {% if post.summary %}
{% if config_identity.expand_linked_cws %} {% if config_identity.expand_linked_cws %}
<div class="summary" _="on click or keyup[key is 'Enter'] toggle .enabled on <.{{ post.summary_class }} .summary/> then toggle .hidden on <.{{ post.summary_class }} .content/> then halt" tabindex="0"> <div class="summary" _="on click or keyup[key is 'Enter'] toggle .enabled on <.{{ post.summary_class }} .summary/> then toggle .hidden on <.{{ post.summary_class }} .content/> then halt" tabindex="0">
{% else %} {% else %}
<div class="summary" _="on click or keyup[key is 'Enter'] toggle .enabled then toggle .hidden on the next .content then halt" tabindex="0"> <div class="summary" _="on click or keyup[key is 'Enter'] toggle .enabled then toggle .hidden on the next .content then halt" tabindex="0">
{% endif %} {% endif %}
{{ post.summary }} {{ post.summary }}
</div> </div>
{% endif %} {% endif %}
@ -40,65 +40,65 @@
{{ post.safe_content_local }} {{ post.safe_content_local }}
{% if post.attachments.exists %} {% if post.attachments.exists %}
<div class="attachments"> <div class="attachments">
{% for attachment in post.attachments.all %} {% for attachment in post.attachments.all %}
{% if attachment.is_image %} {% if attachment.is_image %}
<a href="{{ attachment.full_url.relative }}" class="image" target="_blank" <a href="{{ attachment.full_url.relative }}" class="image" target="_blank"
_="on click halt the event then call imageviewer.show(me)"> _="on click halt the event then call imageviewer.show(me)">
<img src="{{ attachment.thumbnail_url.relative }}" title="{{ attachment.name }}" alt="{{ attachment.name|default:'(no description)' }}" loading="lazy" data-original-url="{{ attachment.full_url.relative }}"> <img src="{{ attachment.thumbnail_url.relative }}" title="{{ attachment.name }}" alt="{{ attachment.name|default:'(no description)' }}" loading="lazy" data-original-url="{{ attachment.full_url.relative }}">
</a> </a>
{% elif attachment.is_video %} {% elif attachment.is_video %}
<a href="{{ attachment.full_url.relative }}" class="video"> <a href="{{ attachment.full_url.relative }}" class="video">
<video muted controls loop> <video muted controls loop>
<source src="{{ attachment.full_url.relative }}"> <source src="{{ attachment.full_url.relative }}">
</video> </video>
</a> </a>
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</div> </div>
{% endif %} {% endif %}
</div> </div>
{% if post.edited %} {% if post.edited %}
<div class="edited" title="{{ post.edited }}"> <div class="edited" title="{{ post.edited }}">
<small>Edited {{ post.edited | timedeltashort }} ago</small> <small>Edited {{ post.edited | timedeltashort }} ago</small>
</div> </div>
{% endif %} {% endif %}
{% if request.identity %} {% if request.identity %}
<div class="actions" role="menubar"> <div class="actions" role="menubar">
{% include "activities/_reply.html" %} {% include "activities/_reply.html" %}
{% include "activities/_like.html" %} {% include "activities/_like.html" %}
{% include "activities/_boost.html" %} {% include "activities/_boost.html" %}
<a title="Menu" class="menu" _="on click or keyup[key is 'Enter'] toggle .enabled on the next <menu/> then halt" role="menuitem" aria-haspopup="menu" tabindex="0"> <a title="Menu" class="menu" _="on click or keyup[key is 'Enter'] toggle .enabled on the next <menu/> then halt" role="menuitem" aria-haspopup="menu" tabindex="0">
<i class="fa-solid fa-bars"></i> <i class="fa-solid fa-bars"></i>
</a>
<menu>
<a href="{{ post.urls.view }}" role="menuitem">
<i class="fa-solid fa-comment"></i> View Post &amp; Replies
</a>
<a href="{{ post.urls.action_report }}" role="menuitem">
<i class="fa-solid fa-flag"></i> Report
</a>
{% if post.author == request.identity %}
<a href="{{ post.urls.action_edit }}" role="menuitem">
<i class="fa-solid fa-pen-to-square"></i> Edit
</a> </a>
<a href="{{ post.urls.action_delete }}" role="menuitem"> <menu>
<i class="fa-solid fa-trash"></i> Delete <a href="{{ post.urls.view }}" role="menuitem">
</a> <i class="fa-solid fa-comment"></i> View Post &amp; Replies
{% elif not post.local and post.url %} </a>
<a href="{{ post.url }}" role="menuitem"> <a href="{{ post.urls.action_report }}" role="menuitem">
<i class="fa-solid fa-arrow-up-right-from-square"></i> See Original <i class="fa-solid fa-flag"></i> Report
</a> </a>
{% endif %} {% if post.author == request.identity %}
{% if request.user.admin %} <a href="{{ post.urls.action_edit }}" role="menuitem">
<a href="{{ post.urls.admin_edit }}" role="menuitem"> <i class="fa-solid fa-pen-to-square"></i> Edit
<i class="fa-solid fa-gear"></i> View In Admin </a>
</a> <a href="{{ post.urls.action_delete }}" role="menuitem">
{% endif %} <i class="fa-solid fa-trash"></i> Delete
</menu> </a>
</div> {% elif not post.local and post.url %}
<a href="{{ post.url }}" role="menuitem">
<i class="fa-solid fa-arrow-up-right-from-square"></i> See Original
</a>
{% endif %}
{% if request.user.admin %}
<a href="{{ post.urls.admin_edit }}" role="menuitem">
<i class="fa-solid fa-gear"></i> View In Admin
</a>
{% endif %}
</menu>
</div>
{% endif %} {% endif %}
</div> </div>

View file

@ -4,15 +4,15 @@
<div class="poll"> <div class="poll">
<h3 style="display: none;">Options: {% if post.type_data.mode == "oneOf" %}<small>(choose one)</small>{% endif %}</h3> <h3 style="display: none;">Options: {% if post.type_data.mode == "oneOf" %}<small>(choose one)</small>{% endif %}</h3>
{% for item in post.type_data.options %} {% for item in post.type_data.options %}
{% if forloop.first %}<ul>{% endif %}{% widthratio item.votes post.type_data.voter_count 100 as item_percent %} {% if forloop.first %}<ul>{% endif %}{% widthratio item.votes post.type_data.voter_count 100 as item_percent %}
<li><label class="poll-option"> <li><label class="poll-option">
<input style="display:none" name="vote-options" type="{% if post.type_data.mode == "oneOf" %}radio{% else %}checkbox{% endif %}" value="0"> <input style="display:none" name="vote-options" type="{% if post.type_data.mode == "oneOf" %}radio{% else %}checkbox{% endif %}" value="0">
<span class="poll-number" title="{{ item.votes }} votes">{{ item_percent }}%</span> <span class="poll-number" title="{{ item.votes }} votes">{{ item_percent }}%</span>
<span class="poll-option-text">{{ item.name }}</span> <span class="poll-option-text">{{ item.name }}</span>
</label> </label>
{% if forloop.last %}</ul>{% endif %} {% if forloop.last %}</ul>{% endif %}
{% endfor %} {% endfor %}
<div class="poll-footer"> <div class="poll-footer">
<span class="vote-total">{{ post.type_data.voter_count }} people</span> <span class="vote-total">{{ post.type_data.voter_count }} people</span>
&mdash; &mdash;

View file

@ -16,76 +16,76 @@
</form> </form>
{% if result %} {% if result %}
<div class="debug"> <div class="debug">
<h2>Summary</h2> <h2>Summary</h2>
<div class="debug-section"> <div class="debug-section">
<div class="field"> <div class="field">
<span class="name">Status Code:</span> <span class="name">Status Code:</span>
<span class="value">{{ status_code }}</span> <span class="value">{{ status_code }}</span>
</div>
<div class="field">
<span class="name">Content-Type:</span>
<span class="value">{{ content_type }}</span>
</div>
<div class="field">
<span class="name">Bytes Downloaded:</span>
<span class="value">{{ num_bytes_downloaded }}</span>
</div>
</div> </div>
<div class="field"> <h2>Payload</h2>
<span class="name">Content-Type:</span>
<span class="value">{{ content_type }}</span>
</div>
<div class="field"> <div class="debug-section">
<span class="name">Bytes Downloaded:</span> <div class="field payload">
<span class="value">{{ num_bytes_downloaded }}</span> <span class="name">Raw Response:
</div> <a title="Copy Content"
</div> class="copy"
_="on click
<h2>Payload</h2> writeText(#raw_response.innerText) into the navigator's clipboard
then add .copied
<div class="debug-section"> wait 2s
<div class="field payload"> then remove .copied">
<span class="name">Raw Response: <i class="fa-solid fa-copy"></i>
<a title="Copy Content" </a>
class="copy" </span>
_="on click <span class="value">
writeText(#raw_response.innerText) into the navigator's clipboard <a _="on click
then add .copied
wait 2s
then remove .copied">
<i class="fa-solid fa-copy"></i>
</a>
</span>
<span class="value">
<a _="on click
toggle .hidden on #raw_response toggle .hidden on #raw_response
then then
if my.innerText is 'Hide' set my.innerText to 'Show' if my.innerText is 'Hide' set my.innerText to 'Show'
else set my.innerText to 'Hide' else set my.innerText to 'Hide'
">Show</a></span> ">Show</a></span>
</div> </div>
<div id="raw_response" class="hidden"> <div id="raw_response" class="hidden">
{{ raw_result|escape }} {{ raw_result|escape }}
</div> </div>
<div class="field payload"> <div class="field payload">
<span class="name">Canonical: <span class="name">Canonical:
<a title="Copy Content" <a title="Copy Content"
class="copy" class="copy"
_="on click _="on click
writeText(#canonical_response.innerText) into the navigator's clipboard writeText(#canonical_response.innerText) into the navigator's clipboard
then add .copied then add .copied
wait 2s wait 2s
then remove .copied"> then remove .copied">
<i class="fa-solid fa-copy"></i> <i class="fa-solid fa-copy"></i>
</a> </a>
</span> </span>
<span class="value"> <span class="value">
<a _="on click <a _="on click
toggle .hidden on #canonical_response toggle .hidden on #canonical_response
then then
if my.innerText is 'Hide' set my.innerText to 'Show' if my.innerText is 'Hide' set my.innerText to 'Show'
else set my.innerText to 'Hide' else set my.innerText to 'Hide'
">Show</a></span> ">Show</a></span>
</div>
<pre id="canonical_response" class="hidden">{{ result }}</pre>
</div> </div>
<pre id="canonical_response" class="hidden">{{ result }}</pre>
</div> </div>
</div>
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View file

@ -3,14 +3,14 @@
{% block title %}#{{ hashtag.display_name }} Timeline{% endblock %} {% block title %}#{{ hashtag.display_name }} Timeline{% endblock %}
{% block content %} {% block content %}
<div class="timeline-name">Explore Trending Tags</div> <div class="timeline-name">Explore Trending Tags</div>
<section class="icon-menu"> <section class="icon-menu">
{% for hashtag in page_obj %} {% for hashtag in page_obj %}
{% include "activities/_hashtag.html" %} {% include "activities/_hashtag.html" %}
{% empty %} {% empty %}
No tags are trending yet. No tags are trending yet.
{% endfor %} {% endfor %}
</section> </section>
{% endblock %} {% endblock %}

View file

@ -17,31 +17,31 @@
<section class="icon-menu"> <section class="icon-menu">
{% for identity in page_obj %} {% for identity in page_obj %}
<a class="option " href="{{ identity.urls.view }}"> <a class="option " href="{{ identity.urls.view }}">
<div class="option-content"> <div class="option-content">
{% include "identity/_identity_banner.html" with identity=identity link_avatar=False link_handle=False %} {% include "identity/_identity_banner.html" with identity=identity link_avatar=False link_handle=False %}
</div> </div>
<div class="option-actions"> <div class="option-actions">
{% if identity.id in outbound_ids %} {% if identity.id in outbound_ids %}
<span class="pill">Following</span> <span class="pill">Following</span>
{% endif %} {% endif %}
{% if identity.id in inbound_ids %} {% if identity.id in inbound_ids %}
<span class="pill">Follows You</span> <span class="pill">Follows You</span>
{% endif %} {% endif %}
{% if inbound %} {% if inbound %}
<form action="{{ identity.urls.action }}" method="POST" class="follow"> <form action="{{ identity.urls.action }}" method="POST" class="follow">
{% csrf_token %} {% csrf_token %}
{% if identity.id in outbound_ids %} {% if identity.id in outbound_ids %}
<input type="hidden" name="action" value="unfollow"> <input type="hidden" name="action" value="unfollow">
<button class="destructive">Unfollow</button> <button class="destructive">Unfollow</button>
{% else %} {% else %}
<input type="hidden" name="action" value="follow"> <input type="hidden" name="action" value="follow">
<button>Follow</button> <button>Follow</button>
{% endif %} {% endif %}
</form> </form>
{% endif %} {% endif %}
<time>{{ identity.follow_date | timedeltashort }} ago</time> <time>{{ identity.follow_date | timedeltashort }} ago</time>
</div> </div>
</a> </a>
{% empty %} {% empty %}
<p class="option empty">You {% if inbound %}have no followers{% else %}are not following anyone{% endif %}.</p> <p class="option empty">You {% if inbound %}have no followers{% else %}are not following anyone{% endif %}.</p>

View file

@ -21,17 +21,17 @@
{% if results.posts %} {% if results.posts %}
<h2>Posts</h2> <h2>Posts</h2>
<section class="icon-menu"> <section class="icon-menu">
{% for post in results.posts %} {% for post in results.posts %}
{% include "activities/_post.html" %} {% include "activities/_post.html" %}
{% endfor %} {% endfor %}
</section> </section>
{% endif %} {% endif %}
{% if results.hashtags %} {% if results.hashtags %}
<h2>Hashtags</h2> <h2>Hashtags</h2>
<section class="icon-menu"> <section class="icon-menu">
{% for hashtag in results.hashtags %} {% for hashtag in results.hashtags %}
{% include "activities/_hashtag.html" with hide_stats=True %} {% include "activities/_hashtag.html" with hide_stats=True %}
{% endfor %} {% endfor %}
</section> </section>
{% endif %} {% endif %}
{% if results and not results.identities and not results.hashtags and not results.posts %} {% if results and not results.identities and not results.hashtags and not results.posts %}

View file

@ -11,7 +11,7 @@
{% if num_identities %} {% if num_identities %}
<p> <p>
You cannot delete this domain as it has <b>{{ num_identities }} You cannot delete this domain as it has <b>{{ num_identities }}
identit{{ num_identities|pluralize:"y,ies" }}</b> registered on it. identit{{ num_identities|pluralize:"y,ies" }}</b> registered on it.
</p> </p>
<p> <p>
You will need to manually remove all identities from this domain in You will need to manually remove all identities from this domain in

View file

@ -18,22 +18,22 @@
<legend>Stats</legend> <legend>Stats</legend>
<div class="field stats"> <div class="field stats">
{% for stat_month, stat_value in hashtag.usage_months.items|slice:":5" %} {% for stat_month, stat_value in hashtag.usage_months.items|slice:":5" %}
{% if forloop.first %} {% if forloop.first %}
<table> <table>
<tr> <tr>
<th>Month</th> <th>Month</th>
<th>Usage</th> <th>Usage</th>
</tr> </tr>
{% endif %} {% endif %}
<tr> <tr>
<th>{{ stat_month|date:"M Y" }}</th> <th>{{ stat_month|date:"M Y" }}</th>
<td>{{ stat_value }}</td> <td>{{ stat_value }}</td>
</tr> </tr>
{% if forloop.last %} {% if forloop.last %}
</table> </table>
{% endif %} {% endif %}
{% empty %} {% empty %}
<p class="help"></p>Hashtag is either not used or stats have not been computed yet.</p> <p class="help"></p>Hashtag is either not used or stats have not been computed yet.</p>
{% endfor %} {% endfor %}
</div> </div>
</fieldset> </fieldset>

View file

@ -6,33 +6,33 @@
<section class="icon-menu"> <section class="icon-menu">
{% for hashtag in page_obj %} {% for hashtag in page_obj %}
<a class="option hashtags" href="{{ hashtag.urls.admin_edit }}"> <a class="option hashtags" href="{{ hashtag.urls.admin_edit }}">
<div class="tag"> <div class="tag">
<i class="fa-solid fa-hashtag"></i> <i class="fa-solid fa-hashtag"></i>
<span class="handle"> <span class="handle">
{{ hashtag.display_name }} {{ hashtag.display_name }}
<small> <small>
{% if hashtag.public %}Public{% elif hashtag.public is None %}Unreviewed{% else %}Private{% endif %} {% if hashtag.public %}Public{% elif hashtag.public is None %}Unreviewed{% else %}Private{% endif %}
</small> </small>
</span> </span>
</div>
{% if hashtag.stats %}
<div class="count">
<span class="handle">
{{ hashtag.stats.total }}
<small>Total</small>
</span>
</div> </div>
{% endif %} {% if hashtag.stats %}
{% if hashtag.aliases %} <div class="count">
<div class="count"> <span class="handle">
<span class="handle"> {{ hashtag.stats.total }}
{% for alias in hashtag.aliases %} <small>Total</small>
{{ alias }}{% if not forloop.last %}, {% endif %} </span>
{% endfor %} </div>
<small>Aliases</small> {% endif %}
</span> {% if hashtag.aliases %}
</div> <div class="count">
{% endif %} <span class="handle">
{% for alias in hashtag.aliases %}
{{ alias }}{% if not forloop.last %}, {% endif %}
{% endfor %}
<small>Aliases</small>
</span>
</div>
{% endif %}
</a> </a>
{% empty %} {% empty %}
<p class="option empty">There are no hashtags yet.</p> <p class="option empty">There are no hashtags yet.</p>

View file

@ -20,14 +20,14 @@
<section class="icon-menu"> <section class="icon-menu">
{% for identity in page_obj %} {% for identity in page_obj %}
<a class="option" href="{{ identity.urls.admin_edit }}"> <a class="option" href="{{ identity.urls.admin_edit }}">
<div class="option-content"> <div class="option-content">
{% include "identity/_identity_banner.html" with identity=identity link_avatar=False link_handle=False %} {% include "identity/_identity_banner.html" with identity=identity link_avatar=False link_handle=False %}
</div> </div>
<div class="option-actions"> <div class="option-actions">
{% if identity.banned %} {% if identity.banned %}
<span class="pill bad">Banned</span> <span class="pill bad">Banned</span>
{% endif %} {% endif %}
</div> </div>
</a> </a>
{% empty %} {% empty %}
<p class="option empty"> <p class="option empty">

View file

@ -59,14 +59,14 @@
</table> </table>
</fieldset> </fieldset>
{% if identity.local %} {% if identity.local %}
<fieldset> <fieldset>
<legend>Users</legend> <legend>Users</legend>
<p> <p>
{% for user in identity.users.all %} {% for user in identity.users.all %}
<a href="{{ user.urls.admin_edit }}">{{ user.email }}</a>{% if not forloop.last %}, {% endif %} <a href="{{ user.urls.admin_edit }}">{{ user.email }}</a>{% if not forloop.last %}, {% endif %}
{% endfor %} {% endfor %}
</p> </p>
</fieldset> </fieldset>
{% endif %} {% endif %}
<fieldset> <fieldset>
<legend>Technical</legend> <legend>Technical</legend>

View file

@ -10,9 +10,9 @@
<legend>Permissions</legend> <legend>Permissions</legend>
{% include "forms/_field.html" with field=form.status %} {% include "forms/_field.html" with field=form.status %}
{% if same_user %} {% if same_user %}
<ul class="errorlist"> <ul class="errorlist">
<li>You cannot edit your own permission status!</li> <li>You cannot edit your own permission status!</li>
</ul> </ul>
{% endif %} {% endif %}
</fieldset> </fieldset>
<fieldset> <fieldset>

View file

@ -1,99 +1,99 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head> <head>
<title>{% block title %}{% endblock %} - {{ config.site_name }}</title> <title>{% block title %}{% endblock %} - {{ config.site_name }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
{% load static %} {% load static %}
<link rel="stylesheet" href="{% static "css/style.css" %}" type="text/css" media="screen" /> <link rel="stylesheet" href="{% static "css/style.css" %}" type="text/css" media="screen" />
<link rel="stylesheet" href="{% static "fonts/raleway/raleway.css" %}" type="text/css" /> <link rel="stylesheet" href="{% static "fonts/raleway/raleway.css" %}" type="text/css" />
<link rel="stylesheet" href="{% static "fonts/font_awesome/all.min.css" %}" type="text/css" /> <link rel="stylesheet" href="{% static "fonts/font_awesome/all.min.css" %}" type="text/css" />
<link rel="manifest" href="/manifest.json" /> <link rel="manifest" href="/manifest.json" />
<link rel="shortcut icon" href="{{ config.site_icon }}"> <link rel="shortcut icon" href="{{ config.site_icon }}">
<script src="{% static "js/hyperscript.min.js" %}"></script> <script src="{% static "js/hyperscript.min.js" %}"></script>
<script src="{% static "js/htmx.min.js" %}"></script> <script src="{% static "js/htmx.min.js" %}"></script>
<script src="{% static "js/takahe.min.js" %}"></script> <script src="{% static "js/takahe.min.js" %}"></script>
<style> <style>
body { body {
--color-highlight: {{ config.highlight_color }}; --color-highlight: {{ config.highlight_color }};
} }
{% if not config_identity.visible_reaction_counts %} {% if not config_identity.visible_reaction_counts %}
.like-count { .like-count {
display: none; display: none;
} }
{% endif %}
</style>
{% if config_identity.custom_css %}
<style>{{ config_identity.custom_css }}</style>
{% endif %} {% endif %}
</style> {% block opengraph %}
{% if config_identity.custom_css %} {% include "_opengraph.html" with opengraph_local=opengraph_defaults %}
<style>{{ config_identity.custom_css }}</style> {% endblock %}
{% endif %} {% block extra_head %}{% endblock %}
{% block opengraph %} {% block custom_head %}{% if config.custom_head %}{{ config.custom_head|safe }}{% endif %}{% endblock %}
{% include "_opengraph.html" with opengraph_local=opengraph_defaults %} </head>
{% endblock %} <body class="{% block body_class %}{% endblock %}" hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>
{% block extra_head %}{% endblock %} <a id='skip-to-main' class='screenreader-text' href='#main-content'>Skip to Content</a>
{% block custom_head %}{% if config.custom_head %}{{ config.custom_head|safe }}{% endif %}{% endblock %} <a id='skip-to-nav' class='screenreader-text' href='#side-navigation'>Skip to Navigation</a>
</head> <main>
<body class="{% block body_class %}{% endblock %}" hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'> {% block body_main %}
<a id='skip-to-main' class='screenreader-text' href='#main-content'>Skip to Content</a> <header>
<a id='skip-to-nav' class='screenreader-text' href='#side-navigation'>Skip to Navigation</a> <a class="logo" href="/">
<main> <img src="{{ config.site_icon }}" width="32">
{% block body_main %} {{ config.site_name }}
<header>
<a class="logo" href="/">
<img src="{{ config.site_icon }}" width="32">
{{ config.site_name }}
</a>
<menu>
{% if user.is_authenticated %}
<a href="{% url "compose" %}" title="Compose" role="menuitem" {% if top_section == "compose" %}class="selected"{% endif %}>
<i class="fa-solid fa-feather"></i>
</a> </a>
<a href="{% url "search" %}" title="Search" role="menuitem" class="search {% if top_section == "search" %}selected{% endif %}"> <menu>
<i class="fa-solid fa-search"></i> {% if user.is_authenticated %}
</a> <a href="{% url "compose" %}" title="Compose" role="menuitem" {% if top_section == "compose" %}class="selected"{% endif %}>
{% if allows_refresh %} <i class="fa-solid fa-feather"></i>
<a href="." title="Refresh" role="menuitem" hx-get="." hx-select=".left-column" hx-target=".left-column" hx-swap="outerHTML" hx-trigger="click, every 120s[isAtTopOfPage()]"> </a>
<i class="fa-solid fa-rotate"></i> <a href="{% url "search" %}" title="Search" role="menuitem" class="search {% if top_section == "search" %}selected{% endif %}">
</a> <i class="fa-solid fa-search"></i>
{% endif %} </a>
<div class="gap"></div> {% if allows_refresh %}
<a href="{{ request.identity.urls.view }}" role="menuitem" class="identity"> <a href="." title="Refresh" role="menuitem" hx-get="." hx-select=".left-column" hx-target=".left-column" hx-swap="outerHTML" hx-trigger="click, every 120s[isAtTopOfPage()]">
{% if not request.identity %} <i class="fa-solid fa-rotate"></i>
No Identity </a>
<img src="{% static "img/unknown-icon-128.png" %}" title="No identity selected"> {% endif %}
<div class="gap"></div>
<a href="{{ request.identity.urls.view }}" role="menuitem" class="identity">
{% if not request.identity %}
No Identity
<img src="{% static "img/unknown-icon-128.png" %}" title="No identity selected">
{% else %}
{{ request.identity.username }}
<img src="{{ request.identity.local_icon_url.relative }}" title="{{ request.identity.handle }}">
{% endif %}
</a>
{% else %} {% else %}
{{ request.identity.username }} <div class="gap"></div>
<img src="{{ request.identity.local_icon_url.relative }}" title="{{ request.identity.handle }}"> <a href="/auth/login/" role="menuitem" class="identity"><i class="fa-solid fa-right-to-bracket"></i> Login</a>
{% endif %} {% endif %}
</a> </menu>
{% else %} </header>
<div class="gap"></div>
<a href="/auth/login/" role="menuitem" class="identity"><i class="fa-solid fa-right-to-bracket"></i> Login</a>
{% endif %}
</menu>
</header>
{% block full_content %} {% block full_content %}
{% include 'activities/_image_viewer.html' %} {% include 'activities/_image_viewer.html' %}
{% block pre_content %} {% block pre_content %}
{% endblock %}
<div class="columns">
<div class="left-column" id="main-content">
{% block content %}
{% endblock %}
</div>
<div class="right-column" id="side-navigation">
{% block right_content %}
{% include "activities/_menu.html" %}
{% endblock %}
{% include "_footer.html" %}
</div>
</div>
{% endblock %}
{% endblock %} {% endblock %}
<div class="columns"> </main>
<div class="left-column" id="main-content">
{% block content %}
{% endblock %}
</div>
<div class="right-column" id="side-navigation">
{% block right_content %}
{% include "activities/_menu.html" %}
{% endblock %}
{% include "_footer.html" %}
</div>
</div>
{% endblock %}
{% endblock %}
</main>
{% block footer %} {% block footer %}
{% endblock %} {% endblock %}
</body> </body>
</html> </html>

View file

@ -1,3 +1,3 @@
{% autoescape off %} {% autoescape off %}
<p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">{{ content }}</p> <p style="font-family: sans-serif; font-size: 14px; font-weight: normal; margin: 0; margin-bottom: 15px;">{{ content }}</p>
{% endautoescape %} {% endautoescape %}

View file

@ -1,17 +1,17 @@
{% autoescape off %} {% autoescape off %}
<table role="presentation" border="0" cellpadding="0" cellspacing="0" class="btn btn-primary" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; box-sizing: border-box; width: 100%;" width="100%"> <table role="presentation" border="0" cellpadding="0" cellspacing="0" class="btn btn-primary" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; box-sizing: border-box; width: 100%;" width="100%">
<tbody> <tbody>
<tr>
<td align="left" style="font-family: sans-serif; font-size: 14px; vertical-align: top; padding-bottom: 15px;" valign="top">
<table role="presentation" border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: auto;">
<tbody>
<tr> <tr>
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top; border-radius: 5px; text-align: center; background-color: #3498db;" valign="top" align="center" bgcolor="#3498db"> <a href="{{ button_link }}" target="_blank" style="border: solid 1px #3498db; border-radius: 5px; box-sizing: border-box; cursor: pointer; display: inline-block; font-size: 14px; font-weight: bold; margin: 0; padding: 12px 25px; text-decoration: none; text-transform: capitalize; background-color: #3498db; border-color: #3498db; color: #ffffff;">{{ button_text }}</a> </td> <td align="left" style="font-family: sans-serif; font-size: 14px; vertical-align: top; padding-bottom: 15px;" valign="top">
<table role="presentation" border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: auto;">
<tbody>
<tr>
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top; border-radius: 5px; text-align: center; background-color: #3498db;" valign="top" align="center" bgcolor="#3498db"> <a href="{{ button_link }}" target="_blank" style="border: solid 1px #3498db; border-radius: 5px; box-sizing: border-box; cursor: pointer; display: inline-block; font-size: 14px; font-weight: bold; margin: 0; padding: 12px 25px; text-decoration: none; text-transform: capitalize; background-color: #3498db; border-color: #3498db; color: #ffffff;">{{ button_text }}</a> </td>
</tr>
</tbody>
</table>
</td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
</td>
</tr>
</tbody>
</table>
{% endautoescape %} {% endautoescape %}

View file

@ -1,7 +1,7 @@
{% autoescape off %} {% autoescape off %}
<tr> <tr>
<td class="content-block" style="font-family: sans-serif; vertical-align: top; padding-bottom: 10px; padding-top: 10px; color: #999999; font-size: 12px; text-align: center;" valign="top" align="center"> <td class="content-block" style="font-family: sans-serif; vertical-align: top; padding-bottom: 10px; padding-top: 10px; color: #999999; font-size: 12px; text-align: center;" valign="top" align="center">
{{ content }} {{ content }}
</td> </td>
</tr> </tr>
{% endautoescape %} {% endautoescape %}

View file

@ -1,27 +1,27 @@
{% extends "emails/base.html" %} {% extends "emails/base.html" %}
{% load mail_tags %} {% load mail_tags %}
{% autoescape off %} {% autoescape off %}
{% block title %}{{settings.MAIN_DOMAIN}} - New Account Created{% endblock title %} {% block title %}{{settings.MAIN_DOMAIN}} - New Account Created{% endblock title %}
{% block subtitle %}{{settings.MAIN_DOMAIN}} - New Account Created{% endblock subtitle %} {% block subtitle %}{{settings.MAIN_DOMAIN}} - New Account Created{% endblock subtitle %}
{% block body_greeting %} {% block body_greeting %}
{% email_body_content "Hi there," %} {% email_body_content "Hi there," %}
{% endblock body_greeting %} {% endblock body_greeting %}
{% block body_content %} {% block body_content %}
{% email_body_content "Your email address was used to create a new account at {{config.site_name}} (https://{{settings.MAIN_DOMAIN}})." %} {% email_body_content "Your email address was used to create a new account at {{config.site_name}} (https://{{settings.MAIN_DOMAIN}})." %}
{% email_body_content "To confirm your new account, go to this link:" %} {% email_body_content "To confirm your new account, go to this link:" %}
{% endblock body_content %} {% endblock body_content %}
{% block body_button %} {% block body_button %}
{% email_button button_text="Confirm New Account" button_link="https://{{settings.MAIN_DOMAIN}}/auth/reset/{{reset.token}}/" %} {% email_button button_text="Confirm New Account" button_link="https://{{settings.MAIN_DOMAIN}}/auth/reset/{{reset.token}}/" %}
{% endblock body_button %} {% endblock body_button %}
{% block body_signature %} {% block body_signature %}
{% email_body_content "Thanks, Admins @{{settings.MAIN_DOMAIN}}" %} {% email_body_content "Thanks, Admins @{{settings.MAIN_DOMAIN}}" %}
{% endblock body_signature %} {% endblock body_signature %}
{% block extra_footer %} {% block extra_footer %}
{% email_footer "If this was not you, then please ignore this message - your email will not be used to make an account if this link is not visited." %} {% email_footer "If this was not you, then please ignore this message - your email will not be used to make an account if this link is not visited." %}
{% endblock extra_footer %} {% endblock extra_footer %}
{% endautoescape %} {% endautoescape %}

View file

@ -1,163 +1,163 @@
{% autoescape off %} {% autoescape off %}
<!doctype html> <!doctype html>
<html> <html>
<head> <head>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{% block title %}{% endblock title %}</title> <title>{% block title %}{% endblock title %}</title>
<style> <style>
@media only screen and (max-width: 620px) { @media only screen and (max-width: 620px) {
table.body h1 { table.body h1 {
font-size: 28px !important; font-size: 28px !important;
margin-bottom: 10px !important; margin-bottom: 10px !important;
} }
table.body p, table.body p,
table.body ul, table.body ul,
table.body ol, table.body ol,
table.body td, table.body td,
table.body span, table.body span,
table.body a { table.body a {
font-size: 16px !important; font-size: 16px !important;
} }
table.body .wrapper, table.body .wrapper,
table.body .article { table.body .article {
padding: 10px !important; padding: 10px !important;
} }
table.body .content { table.body .content {
padding: 0 !important; padding: 0 !important;
} }
table.body .container { table.body .container {
padding: 0 !important; padding: 0 !important;
width: 100% !important; width: 100% !important;
} }
table.body .main { table.body .main {
border-left-width: 0 !important; border-left-width: 0 !important;
border-radius: 0 !important; border-radius: 0 !important;
border-right-width: 0 !important; border-right-width: 0 !important;
} }
table.body .btn table { table.body .btn table {
width: 100% !important; width: 100% !important;
} }
table.body .btn a { table.body .btn a {
width: 100% !important; width: 100% !important;
} }
table.body .img-responsive { table.body .img-responsive {
height: auto !important; height: auto !important;
max-width: 100% !important; max-width: 100% !important;
width: auto !important; width: auto !important;
} }
} }
@media all { @media all {
.ExternalClass { .ExternalClass {
width: 100%; width: 100%;
} }
.ExternalClass, .ExternalClass,
.ExternalClass p, .ExternalClass p,
.ExternalClass span, .ExternalClass span,
.ExternalClass font, .ExternalClass font,
.ExternalClass td, .ExternalClass td,
.ExternalClass div { .ExternalClass div {
line-height: 100%; line-height: 100%;
} }
.apple-link a { .apple-link a {
color: inherit !important; color: inherit !important;
font-family: inherit !important; font-family: inherit !important;
font-size: inherit !important; font-size: inherit !important;
font-weight: inherit !important; font-weight: inherit !important;
line-height: inherit !important; line-height: inherit !important;
text-decoration: none !important; text-decoration: none !important;
} }
#MessageViewBody a { #MessageViewBody a {
color: inherit; color: inherit;
text-decoration: none; text-decoration: none;
font-size: inherit; font-size: inherit;
font-family: inherit; font-family: inherit;
font-weight: inherit; font-weight: inherit;
line-height: inherit; line-height: inherit;
} }
.btn-primary table td:hover { .btn-primary table td:hover {
background-color: #34495e !important; background-color: #34495e !important;
} }
.btn-primary a:hover { .btn-primary a:hover {
background-color: #34495e !important; background-color: #34495e !important;
border-color: #34495e !important; border-color: #34495e !important;
} }
} }
</style> </style>
</head> </head>
<body style="background-color: #f6f6f6; font-family: sans-serif; -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.4; margin: 0; padding: 0; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;"> <body style="background-color: #f6f6f6; font-family: sans-serif; -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.4; margin: 0; padding: 0; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;">
<span class="preheader" style="color: transparent; display: none; height: 0; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all; visibility: hidden; width: 0;">{% block subtitle %}{% endblock subtitle %}</span> <span class="preheader" style="color: transparent; display: none; height: 0; max-height: 0; max-width: 0; opacity: 0; overflow: hidden; mso-hide: all; visibility: hidden; width: 0;">{% block subtitle %}{% endblock subtitle %}</span>
<table role="presentation" border="0" cellpadding="0" cellspacing="0" class="body" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #f6f6f6; width: 100%;" width="100%" bgcolor="#f6f6f6"> <table role="presentation" border="0" cellpadding="0" cellspacing="0" class="body" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background-color: #f6f6f6; width: 100%;" width="100%" bgcolor="#f6f6f6">
<tr> <tr>
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top;" valign="top">&nbsp;</td> <td style="font-family: sans-serif; font-size: 14px; vertical-align: top;" valign="top">&nbsp;</td>
<td class="container" style="font-family: sans-serif; font-size: 14px; vertical-align: top; display: block; max-width: 580px; padding: 10px; width: 580px; margin: 0 auto;" width="580" valign="top"> <td class="container" style="font-family: sans-serif; font-size: 14px; vertical-align: top; display: block; max-width: 580px; padding: 10px; width: 580px; margin: 0 auto;" width="580" valign="top">
<div class="content" style="box-sizing: border-box; display: block; margin: 0 auto; max-width: 580px; padding: 10px;"> <div class="content" style="box-sizing: border-box; display: block; margin: 0 auto; max-width: 580px; padding: 10px;">
<!-- START CENTERED WHITE CONTAINER --> <!-- START CENTERED WHITE CONTAINER -->
<table role="presentation" class="main" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background: #ffffff; border-radius: 3px; width: 100%;" width="100%"> <table role="presentation" class="main" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; background: #ffffff; border-radius: 3px; width: 100%;" width="100%">
{% block body %} {% block body %}
<!-- START MAIN CONTENT AREA --> <!-- START MAIN CONTENT AREA -->
<tr> <tr>
<td class="wrapper" style="font-family: sans-serif; font-size: 14px; vertical-align: top; box-sizing: border-box; padding: 20px;" valign="top"> <td class="wrapper" style="font-family: sans-serif; font-size: 14px; vertical-align: top; box-sizing: border-box; padding: 20px;" valign="top">
<table role="presentation" border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;" width="100%"> <table role="presentation" border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;" width="100%">
<tr> <tr>
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top;" valign="top"> <td style="font-family: sans-serif; font-size: 14px; vertical-align: top;" valign="top">
{% block body_greeting %} {% block body_greeting %}
{% endblock body_greeting %} {% endblock body_greeting %}
{% block body_content %} {% block body_content %}
{% endblock body_content %} {% endblock body_content %}
{% block body_button %} {% block body_button %}
{% endblock body_button %} {% endblock body_button %}
{% block body_signature %} {% block body_signature %}
{% endblock body_signature %} {% endblock body_signature %}
</td>
</tr>
</table>
</td>
</tr>
{% endblock body %}
<!-- END MAIN CONTENT AREA -->
</table>
<!-- END CENTERED WHITE CONTAINER -->
<!-- START FOOTER -->
<div class="footer" style="clear: both; margin-top: 10px; text-align: center; width: 100%;">
<table role="presentation" border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;" width="100%">
{% block extra_footer %}
{% endblock extra_footer %}
{% block footer %}
<tr>
<td class="content-block" style="font-family: sans-serif; vertical-align: top; padding-bottom: 10px; padding-top: 10px; color: #999999; font-size: 12px; text-align: center;" valign="top" align="center">
Visit our Site: <a href="https://{{settings.MAIN_DOMAIN}}" style="text-decoration: underline; color: #999999; font-size: 12px; text-align: center;">https://{{settings.MAIN_DOMAIN}}</a>.
</td>
</tr>
<tr>
<td class="content-block powered-by" style="font-family: sans-serif; vertical-align: top; padding-bottom: 10px; padding-top: 10px; color: #999999; font-size: 12px; text-align: center;" valign="top" align="center">
Powered by <a href="https://jointakahe.org/" style="color: #999999; font-size: 12px; text-align: center; text-decoration: none;">Takahe</a>.
</td>
</tr>
{% endblock footer %}
</table>
</div>
<!-- END FOOTER -->
</div>
</td> </td>
</tr> <td style="font-family: sans-serif; font-size: 14px; vertical-align: top;" valign="top">&nbsp;</td>
</table> </tr>
</td>
</tr>
{% endblock body %}
<!-- END MAIN CONTENT AREA -->
</table> </table>
<!-- END CENTERED WHITE CONTAINER --> </body>
</html>
<!-- START FOOTER -->
<div class="footer" style="clear: both; margin-top: 10px; text-align: center; width: 100%;">
<table role="presentation" border="0" cellpadding="0" cellspacing="0" style="border-collapse: separate; mso-table-lspace: 0pt; mso-table-rspace: 0pt; width: 100%;" width="100%">
{% block extra_footer %}
{% endblock extra_footer %}
{% block footer %}
<tr>
<td class="content-block" style="font-family: sans-serif; vertical-align: top; padding-bottom: 10px; padding-top: 10px; color: #999999; font-size: 12px; text-align: center;" valign="top" align="center">
Visit our Site: <a href="https://{{settings.MAIN_DOMAIN}}" style="text-decoration: underline; color: #999999; font-size: 12px; text-align: center;">https://{{settings.MAIN_DOMAIN}}</a>.
</td>
</tr>
<tr>
<td class="content-block powered-by" style="font-family: sans-serif; vertical-align: top; padding-bottom: 10px; padding-top: 10px; color: #999999; font-size: 12px; text-align: center;" valign="top" align="center">
Powered by <a href="https://jointakahe.org/" style="color: #999999; font-size: 12px; text-align: center; text-decoration: none;">Takahe</a>.
</td>
</tr>
{% endblock footer %}
</table>
</div>
<!-- END FOOTER -->
</div>
</td>
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top;" valign="top">&nbsp;</td>
</tr>
</table>
</body>
</html>
{% endautoescape %} {% endautoescape %}

View file

@ -1,27 +1,27 @@
{% extends "emails/base.html" %} {% extends "emails/base.html" %}
{% load mail_tags %} {% load mail_tags %}
{% autoescape off %} {% autoescape off %}
{% block title %}{{settings.MAIN_DOMAIN}} - Password Reset Requested{% endblock title %} {% block title %}{{settings.MAIN_DOMAIN}} - Password Reset Requested{% endblock title %}
{% block subtitle %}{{settings.MAIN_DOMAIN}} - Password Reset Requested{% endblock subtitle %} {% block subtitle %}{{settings.MAIN_DOMAIN}} - Password Reset Requested{% endblock subtitle %}
{% block body_greeting %} {% block body_greeting %}
{% email_body_content "Hi there," %} {% email_body_content "Hi there," %}
{% endblock body_greeting %} {% endblock body_greeting %}
{% block body_content %} {% block body_content %}
{% email_body_content "A password reset was requested for your account ({{reset.user.email}}) at {{Config.system.site_name}} (https://{{settings.MAIN_DOMAIN}})." %} {% email_body_content "A password reset was requested for your account ({{reset.user.email}}) at {{Config.system.site_name}} (https://{{settings.MAIN_DOMAIN}})." %}
{% email_body_content "To reset your password, go to this link:" %} {% email_body_content "To reset your password, go to this link:" %}
{% endblock body_content %} {% endblock body_content %}
{% block body_button %} {% block body_button %}
{% email_button button_text="Reset Password" button_link="https://{{settings.MAIN_DOMAIN}}/auth/reset/{{reset.token}}/" %} {% email_button button_text="Reset Password" button_link="https://{{settings.MAIN_DOMAIN}}/auth/reset/{{reset.token}}/" %}
{% endblock body_button %} {% endblock body_button %}
{% block body_signature %} {% block body_signature %}
{% email_body_content "Thanks, Admins @{{settings.MAIN_DOMAIN}}" %} {% email_body_content "Thanks, Admins @{{settings.MAIN_DOMAIN}}" %}
{% endblock body_signature %} {% endblock body_signature %}
{% block extra_footer %} {% block extra_footer %}
{% email_footer "If this was not you, then please ignore this message - your password will not be reset if this link is not visited." %} {% email_footer "If this was not you, then please ignore this message - your password will not be reset if this link is not visited." %}
{% endblock extra_footer %} {% endblock extra_footer %}
{% endautoescape %} {% endautoescape %}

View file

@ -1,33 +1,33 @@
{% extends "emails/base.html" %} {% extends "emails/base.html" %}
{% load mail_tags %} {% load mail_tags %}
{% autoescape off %} {% autoescape off %}
{% block title %}{{config.site_name}} - New Moderation Report{% endblock title %} {% block title %}{{config.site_name}} - New Moderation Report{% endblock title %}
{% block subtitle %}{{config.site_name}} - New Moderation Report{% endblock subtitle %} {% block subtitle %}{{config.site_name}} - New Moderation Report{% endblock subtitle %}
{% block body_greeting %} {% block body_greeting %}
{% email_body_content "Moderation Team," %} {% email_body_content "Moderation Team," %}
{% email_body_content "A new report has been recieved for {{config.site_name}}." %} {% email_body_content "A new report has been recieved for {{config.site_name}}." %}
{% endblock body_greeting %} {% endblock body_greeting %}
{% block body_content %} {% block body_content %}
{% email_body_content "=============== Report Summary ===============" %} {% email_body_content "=============== Report Summary ===============" %}
{% if report.source_identity %} {% if report.source_identity %}
{% email_body_content "Reporter Identity: {{report.source_identity}} @ {{report.source_domain}}" %} {% email_body_content "Reporter Identity: {{report.source_identity}} @ {{report.source_domain}}" %}
{% else %} {% else %}
{% email_body_content "Reporter Identity: Anonymous Report from {{report.source_domain}}" %} {% email_body_content "Reporter Identity: Anonymous Report from {{report.source_domain}}" %}
{% endif %} {% endif %}
{% email_body_content "Reported Identity: {{report.subject_identity}}" %} {% email_body_content "Reported Identity: {{report.subject_identity}}" %}
{% email_body_content "Complaint Type: {{report.type}}" %} {% email_body_content "Complaint Type: {{report.type}}" %}
{% email_body_content "Complaint Notes: {{report.complaint}}" %} {% email_body_content "Complaint Notes: {{report.complaint}}" %}
{% endblock body_content %} {% endblock body_content %}
{% block body_button %} {% block body_button %}
{% email_button button_text="View Report" button_link="https://{{settings.MAIN_DOMAIN}}/admin/reports/{{report.id}}/" %} {% email_button button_text="View Report" button_link="https://{{settings.MAIN_DOMAIN}}/admin/reports/{{report.id}}/" %}
{% endblock body_button %} {% endblock body_button %}
{% block extra_footer %} {% block extra_footer %}
{% email_footer "You are recieving this email because you are a moderator on the Takahe instance https://{{settings.MAIN_DOMAIN}}" %} {% email_footer "You are recieving this email because you are a moderator on the Takahe instance https://{{settings.MAIN_DOMAIN}}" %}
{% endblock extra_footer %} {% endblock extra_footer %}
{% endautoescape %} {% endautoescape %}

View file

@ -11,9 +11,9 @@
{% endif %} {% endif %}
{{ field.errors }} {{ field.errors }}
{% if field.field.widget.input_type == "file" and field.value %} {% if field.field.widget.input_type == "file" and field.value %}
<div class="clear"> <div class="clear">
<input type="checkbox" class="clear" name="{{ field.name }}__clear"> Clear current value</input> <input type="checkbox" class="clear" name="{{ field.name }}__clear"> Clear current value</input>
</div> </div>
{% endif %} {% endif %}
{{ field }} {{ field }}
</div> </div>

View file

@ -1,78 +1,82 @@
{% with name_one=field_name_one|default:"name" name_two=field_name_two|default:"value" %} {% with name_one=field_name_one|default:"name" name_two=field_name_two|default:"value" %}
<script type="text/hyperscript"> <script type="text/hyperscript">
def {{ field.name }}.collect{{ field.name|title }}Fields() {# fmt:off #}
set newdata to [] def {{ field.name }}.collect{{ field.name|title }}Fields()
for item in <div.{{ field.name }}-row/> set newdata to []
get the (value of the first <input.{{ field.name }}-{{ name_one }}/> in item) for item in <div.{{ field.name }}-row/>
set n to it get the (value of the first <input.{{ field.name }}-{{ name_one }}/> in item)
get the (value of the last <input.{{ field.name }}-{{ name_two }}/> in item) set n to it
set val to it get the (value of the last <input.{{ field.name }}-{{ name_two }}/> in item)
if n != '' and val != '' then set val to it
append {'{{ name_one }}': n, '{{ name_two }}': val} to newdata if n != '' and val != '' then
append {'{{ name_one }}': n, '{{ name_two }}': val} to newdata
end
set #id_{{ field.name }}@value to newdata as JSON
end end
set #id_{{ field.name }}@value to newdata as JSON
end
def {{ field.name }}.addEmptyField() def {{ field.name }}.addEmptyField()
get #blank_{{ field.name }}'s outerHTML get #blank_{{ field.name }}'s outerHTML
put it before #new_{{ field.name }} put it before #new_{{ field.name }}
get #new_{{ field.name }}'s previousSibling get #new_{{ field.name }}'s previousSibling
set foo to it set foo to it
set foo@id to '' set foo@id to ''
remove .hidden from foo remove .hidden from foo
add .{{ field.name }}-row to foo add .{{ field.name }}-row to foo
return foo return foo
end end
</script> {# fmt:on #}
</script>
{% include "forms/_field.html" %} {% include "forms/_field.html" %}
<div class="field multi-option"> <div class="field multi-option">
<section class="icon-menu"> <section class="icon-menu">
<span id="new_{{ field.name }}" stlye="display: none" {# fmt:off #}
_="on load <span id="new_{{ field.name }}" stlye="display: none"
get the (value of #id_{{ field.name }}) as Object _="on load
set items to it get the (value of #id_{{ field.name }}) as Object
for item in items set items to it
set f to {{ field.name }}.addEmptyField() for item in items
set one to the first <input.{{ field.name }}-{{ name_one }}/> in f then set f to {{ field.name }}.addEmptyField()
set one@value to item.{{ name_one }} set one to the first <input.{{ field.name }}-{{ name_one }}/> in f then
set one@value to item.{{ name_one }}
set two to the first <input.{{ field.name }}-{{ name_two }}/> in f then set two to the first <input.{{ field.name }}-{{ name_two }}/> in f then
set two@value to item.{{ name_two }} set two@value to item.{{ name_two }}
end end
get the (@data-min-empty of #id_{{ field.name }}) get the (@data-min-empty of #id_{{ field.name }})
set min_empty to it set min_empty to it
if items.length < min_empty then if items.length < min_empty then
repeat (min_empty - items.length) times repeat (min_empty - items.length) times
call {{ field.name }}.addEmptyField() call {{ field.name }}.addEmptyField()
end end
"></span> "></span>
{# fmt:on #}
<div class="option"> <div class="option">
<span class="option-field"> <span class="option-field">
<button class="fa-solid fa-add" title="Add Row" _="on click {{ field.name }}.addEmptyField() then halt"></button> <button class="fa-solid fa-add" title="Add Row" _="on click {{ field.name }}.addEmptyField() then halt"></button>
</span> </span>
</div>
<div id="blank_{{ field.name }}" class="option option-row hidden">
<span class="option-field">
<input type=text class="{{ field.name }}-{{ name_one }}" name="{{ field.name }}_{{ name_one }}" value="">
</span>
<span class="option-field">
<input type=text class="{{ field.name }}-{{ name_two }}" name="{{ field.name }}_{{ name_two }}" value="">
</span>
<div class="right">
<button class="fa-solid fa-trash delete" title="Delete Row"
_="on click remove (closest parent .option)
then {{ field.name }}.collect{{ field.name|title }}Fields()
then halt" />
</div> </div>
</div>
</section> <div id="blank_{{ field.name }}" class="option option-row hidden">
<span class="option-field">
<input type=text class="{{ field.name }}-{{ name_one }}" name="{{ field.name }}_{{ name_one }}" value="">
</span>
<span class="option-field">
<input type=text class="{{ field.name }}-{{ name_two }}" name="{{ field.name }}_{{ name_two }}" value="">
</span>
<div class="right">
<button class="fa-solid fa-trash delete" title="Delete Row"
_="on click remove (closest parent .option)
then {{ field.name }}.collect{{ field.name|title }}Fields()
then halt" />
</div>
</div>
</div> </section>
</div>
{% endwith %} {% endwith %}

View file

@ -1,33 +1,33 @@
<div class="identity-banner"> <div class="identity-banner">
{% if link_avatar is False %} {% if link_avatar is False %}
<div class="avatar-link"> <div class="avatar-link">
{% else %} {% else %}
<a href="{{ identity.urls.view }}" tabindex="-1" class="avatar-link"> <a href="{{ identity.urls.view }}" tabindex="-1" class="avatar-link">
{% endif %} {% endif %}
<img <img
src="{{ identity.local_icon_url.relative }}" src="{{ identity.local_icon_url.relative }}"
class="icon" class="icon"
alt="Avatar for {{ identity.name_or_handle }}" alt="Avatar for {{ identity.name_or_handle }}"
loading="lazy" loading="lazy"
data-handle="{{ identity.name_or_handle }}" data-handle="{{ identity.name_or_handle }}"
_="on error set my.src to generate_avatar(@data-handle)" _="on error set my.src to generate_avatar(@data-handle)"
> >
{% if link_avatar is False%} {% if link_avatar is False%}
</div> </div>
{% else %} {% else %}
</a> </a>
{% endif %} {% endif %}
{% if link_handle is False%} {% if link_handle is False%}
<div class="handle"> <div class="handle">
{% else %} {% else %}
<a href="{{ identity.urls.view }}" class="handle"> <a href="{{ identity.urls.view }}" class="handle">
{% endif %} {% endif %}
<div class="link">{{ identity.html_name_or_handle }}</div> <div class="link">{{ identity.html_name_or_handle }}</div>
<small>@{{ identity.handle }}</small> <small>@{{ identity.handle }}</small>
{% if link_handle is False %} {% if link_handle is False %}
</div> </div>
{% else %} {% else %}
</a> </a>
{% endif %} {% endif %}
</div> </div>

View file

@ -9,9 +9,9 @@
<i class="fa-solid fa-right-from-bracket"></i> Logout <i class="fa-solid fa-right-from-bracket"></i> Logout
</a> </a>
{% if request.user.admin %} {% if request.user.admin %}
<h3>Administration</h3> <h3>Administration</h3>
<a href="{% url "admin_domains" %}" {% if section == "domains" %}class="selected"{% endif %} title="Domains"> <a href="{% url "admin_domains" %}" {% if section == "domains" %}class="selected"{% endif %} title="Domains">
<i class="fa-solid fa-globe"></i> Domains <i class="fa-solid fa-globe"></i> Domains
</a> </a>
{% endif %} {% endif %}
</nav> </nav>

View file

@ -10,44 +10,44 @@
{% endif %} {% endif %}
<form action="{{ identity.urls.action }}" method="POST" class="inline-menu"> <form action="{{ identity.urls.action }}" method="POST" class="inline-menu">
{% csrf_token %} {% csrf_token %}
{% if follow %} {% if follow %}
<input type="hidden" name="action" value="unfollow"> <input type="hidden" name="action" value="unfollow">
<button class="destructive" title="Unfollow"><i class="fa-solid fa-user-minus"></i> <button class="destructive" title="Unfollow"><i class="fa-solid fa-user-minus"></i>
{% if follow.pending %}Follow Pending{% else %}Unfollow{% endif %} {% if follow.pending %}Follow Pending{% else %}Unfollow{% endif %}
</button> </button>
{% else %} {% else %}
<input type="hidden" name="action" value="follow"> <input type="hidden" name="action" value="follow">
<button><i class="fa-solid fa-user-plus"></i> Follow</button> <button><i class="fa-solid fa-user-plus"></i> Follow</button>
{% endif %} {% endif %}
</form> </form>
{% endif %} {% endif %}
{% if request.user.admin %} {% if request.user.admin %}
<a title="Menu" class="menu button" _="on click or keyup[key is 'Enter'] toggle .enabled on the next <menu/> then halt" aria-haspopup="menu" tabindex="0"> <a title="Menu" class="menu button" _="on click or keyup[key is 'Enter'] toggle .enabled on the next <menu/> then halt" aria-haspopup="menu" tabindex="0">
<i class="fa-solid fa-bars"></i> <i class="fa-solid fa-bars"></i>
</a> </a>
<menu> <menu>
{% if follow %} {% if follow %}
<form action="{{ identity.urls.action }}" method="POST" class="inline"> <form action="{{ identity.urls.action }}" method="POST" class="inline">
{% csrf_token %} {% csrf_token %}
{% if follow.boosts %} {% if follow.boosts %}
<input type="hidden" name="action" value="hide_boosts"> <input type="hidden" name="action" value="hide_boosts">
<button role="menuitem"><i class="fa-solid fa-retweet"></i> Hide boosts</button> <button role="menuitem"><i class="fa-solid fa-retweet"></i> Hide boosts</button>
{% else %} {% else %}
<input type="hidden" name="action" value="show_boosts"> <input type="hidden" name="action" value="show_boosts">
<button role="menuitem"><i class="fa-solid fa-retweet"></i> Show boosts</button> <button role="menuitem"><i class="fa-solid fa-retweet"></i> Show boosts</button>
{% endif %}
</form>
{% endif %} {% endif %}
</form> {% if request.user.admin %}
{% endif %} <a href="{{ identity.urls.admin_edit }}" role="menuitem">
{% if request.user.admin %} <i class="fa-solid fa-user-gear"></i> View in Admin
<a href="{{ identity.urls.admin_edit }}" role="menuitem"> </a>
<i class="fa-solid fa-user-gear"></i> View in Admin <a href="{{ identity.urls.djadmin_edit }}" role="menuitem">
</a> <i class="fa-solid fa-gear"></i> View in djadmin
<a href="{{ identity.urls.djadmin_edit }}" role="menuitem"> </a>
<i class="fa-solid fa-gear"></i> View in djadmin {% endif %}
</a> </menu>
{% endif %} {% endif %}
</menu>
{% endif %}
</div> </div>
</div> </div>

View file

@ -6,7 +6,7 @@
<form action="." method="POST"> <form action="." method="POST">
<h1>Create New Identity</h1> <h1>Create New Identity</h1>
<p>You can have multiple identities - they are totally separate, and share <p>You can have multiple identities - they are totally separate, and share
nothing apart from your login details. Use them for alternates, projects, and more.</p> nothing apart from your login details. Use them for alternates, projects, and more.</p>
{% csrf_token %} {% csrf_token %}
<fieldset> <fieldset>
<legend>Identity Details</legend> <legend>Identity Details</legend>

View file

@ -28,9 +28,9 @@
<small> <small>
@{{ identity.handle }} @{{ identity.handle }}
<a title="Copy handle" <a title="Copy handle"
class="copy" class="copy"
tabindex="0" tabindex="0"
_="on click or keyup[key is 'Enter'] _="on click or keyup[key is 'Enter']
writeText('@{{ identity.handle }}') into the navigator's clipboard writeText('@{{ identity.handle }}') into the navigator's clipboard
then add .copied then add .copied
wait 2s wait 2s
@ -49,20 +49,20 @@
{% if identity.metadata %} {% if identity.metadata %}
<div class="identity-metadata"> <div class="identity-metadata">
{% for entry in identity.safe_metadata %} {% for entry in identity.safe_metadata %}
<div class="metadata-pair"> <div class="metadata-pair">
<span class="metadata-name">{{ entry.name }}</span> <span class="metadata-name">{{ entry.name }}</span>
<span class="metadata-value">{{ entry.value }}</span> <span class="metadata-value">{{ entry.value }}</span>
</div> </div>
{% endfor %} {% endfor %}
</div> </div>
{% endif %} {% endif %}
{% if identity.local and identity.config_identity.visible_follows %} {% if identity.local and identity.config_identity.visible_follows %}
<div class="view-options follows"> <div class="view-options follows">
<a href="{{ identity.urls.view }}" {% if not follows_page %}class="selected"{% endif %}><strong>{{ post_count }}</strong> posts</a> <a href="{{ identity.urls.view }}" {% if not follows_page %}class="selected"{% endif %}><strong>{{ post_count }}</strong> posts</a>
<a href="{{ identity.urls.following }}" {% if not inbound and follows_page %}class="selected"{% endif %}><strong>{{ following_count }}</strong> following</a> <a href="{{ identity.urls.following }}" {% if not inbound and follows_page %}class="selected"{% endif %}><strong>{{ following_count }}</strong> following</a>
<a href="{{ identity.urls.followers }}" {% if inbound and follows_page %}class="selected"{% endif %}><strong>{{ followers_count }}</strong> follower{{ followers_count|pluralize }}</a> <a href="{{ identity.urls.followers }}" {% if inbound and follows_page %}class="selected"{% endif %}><strong>{{ followers_count }}</strong> follower{{ followers_count|pluralize }}</a>
</div> </div>
{% endif %} {% endif %}
{% if not identity.local %} {% if not identity.local %}

View file

@ -14,42 +14,42 @@
<i class="fa-solid fa-right-from-bracket" title="Logout"></i> Logout <i class="fa-solid fa-right-from-bracket" title="Logout"></i> Logout
</a> </a>
{% if request.user.moderator or request.user.admin %} {% if request.user.moderator or request.user.admin %}
<h3>Moderation</h3> <h3>Moderation</h3>
<a href="{% url "admin_identities" %}" {% if section == "identities" %}class="selected"{% endif %} title="Identities"> <a href="{% url "admin_identities" %}" {% if section == "identities" %}class="selected"{% endif %} title="Identities">
<i class="fa-solid fa-id-card"></i> Identities <i class="fa-solid fa-id-card"></i> Identities
</a> </a>
<a href="{% url "admin_invites" %}" {% if section == "invites" %}class="selected"{% endif %} title="Invites"> <a href="{% url "admin_invites" %}" {% if section == "invites" %}class="selected"{% endif %} title="Invites">
<i class="fa-solid fa-envelope"></i> Invites <i class="fa-solid fa-envelope"></i> Invites
</a> </a>
<a href="{% url "admin_hashtags" %}" {% if section == "hashtags" %}class="selected"{% endif %} title="Hashtags"> <a href="{% url "admin_hashtags" %}" {% if section == "hashtags" %}class="selected"{% endif %} title="Hashtags">
<i class="fa-solid fa-hashtag"></i> Hashtags <i class="fa-solid fa-hashtag"></i> Hashtags
</a> </a>
<a href="{% url "admin_reports" %}" {% if section == "reports" %}class="selected"{% endif %} title="Reports"> <a href="{% url "admin_reports" %}" {% if section == "reports" %}class="selected"{% endif %} title="Reports">
<i class="fa-solid fa-flag"></i> Reports <i class="fa-solid fa-flag"></i> Reports
</a> </a>
{% endif %} {% endif %}
{% if request.user.admin %} {% if request.user.admin %}
<h3>Administration</h3> <h3>Administration</h3>
<a href="{% url "admin_basic" %}" {% if section == "basic" %}class="selected"{% endif %} title="Basic"> <a href="{% url "admin_basic" %}" {% if section == "basic" %}class="selected"{% endif %} title="Basic">
<i class="fa-solid fa-book"></i> Basic <i class="fa-solid fa-book"></i> Basic
</a> </a>
<a href="{% url "admin_policies" %}" {% if section == "policies" %}class="selected"{% endif %} title="Policies"> <a href="{% url "admin_policies" %}" {% if section == "policies" %}class="selected"{% endif %} title="Policies">
<i class="fa-solid fa-file-lines"></i> Policies <i class="fa-solid fa-file-lines"></i> Policies
</a> </a>
<a href="{% url "admin_domains" %}" {% if section == "domains" %}class="selected"{% endif %} title="Domains"> <a href="{% url "admin_domains" %}" {% if section == "domains" %}class="selected"{% endif %} title="Domains">
<i class="fa-solid fa-globe"></i> Domains <i class="fa-solid fa-globe"></i> Domains
</a> </a>
<a href="{% url "admin_federation" %}" {% if section == "federation" %}class="selected"{% endif %} title="Federation"> <a href="{% url "admin_federation" %}" {% if section == "federation" %}class="selected"{% endif %} title="Federation">
<i class="fa-solid fa-diagram-project"></i> Federation <i class="fa-solid fa-diagram-project"></i> Federation
</a> </a>
<a href="{% url "admin_users" %}" {% if section == "users" %}class="selected"{% endif %} title="Users"> <a href="{% url "admin_users" %}" {% if section == "users" %}class="selected"{% endif %} title="Users">
<i class="fa-solid fa-users"></i> Users <i class="fa-solid fa-users"></i> Users
</a> </a>
<a href="{% url "admin_stator" %}" {% if section == "stator" %}class="selected"{% endif %} title="Stator"> <a href="{% url "admin_stator" %}" {% if section == "stator" %}class="selected"{% endif %} title="Stator">
<i class="fa-solid fa-clock-rotate-left"></i> Stator <i class="fa-solid fa-clock-rotate-left"></i> Stator
</a> </a>
<a href="/djadmin" title="Django Admin" class="danger"> <a href="/djadmin" title="Django Admin" class="danger">
<i class="fa-solid fa-gear"></i> Django Admin <i class="fa-solid fa-gear"></i> Django Admin
</a> </a>
{% endif %} {% endif %}
</nav> </nav>

View file

@ -11,7 +11,7 @@
</fieldset> </fieldset>
<fieldset> <fieldset>
<legend>Password</legend> <legend>Password</legend>
<p>To change your password, please trigger a <a href="{% url "trigger_reset" %}">password reset</a>. <p>To change your password, please trigger a <a href="{% url "trigger_reset" %}">password reset</a>.</p>
</fieldset> </fieldset>
</form> </form>
{% endblock %} {% endblock %}