Add djhtml to pre-commit check (#382)

pull/387/head
TAKAHASHI Shuuji 2023-01-10 01:58:17 +09:00 zatwierdzone przez GitHub
rodzic 024d956e5e
commit 0c1e51322f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
38 zmienionych plików z 780 dodań i 767 usunięć

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

@ -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-banner">
{% include "identity/_identity_banner.html" with identity=post.author %}
<div>
<time _="on click go url {% if link_original %}{{ post.url }}{% else %}{{ post.urls.view }}{% endif %} then halt">
{% if post.visibility == 0 %}
<i class="visibility fa-solid fa-earth-oceania" title="Public" aria-label="public"></i>
{% elif post.visibility == 1 %}
<i class="visibility fa-solid fa-lock-open" title="Unlisted" aria-label="unlisted"></i>
{% elif post.visibility == 2 %}
<i class="visibility fa-solid fa-lock" title="Followers Only" aria-label="followers only"></i>
{% elif post.visibility == 3 %}
<i class="visibility fa-solid fa-at" title="Mentioned Only" aria-label="mentioned only"></i>
{% elif post.visibility == 4 %}
<i class="visibility fa-solid fa-link-slash" title="Local Only" aria-label="local only"></i>
{% endif %}
{% if post.published %}
<a href="{% if link_original %}{{ post.url }}{% else %}{{ post.urls.view }}{% endif %}" title="{{ post.published }}">{{ post.published | timedeltashort }}</a>
{% else %}
<a href="{% if link_original %}{{ post.url }}{% else %}{{ post.urls.view }}{% endif %}" title="{{ post.created }}">{{ post.created | timedeltashort }}</a>
{% endif %}
</time>
</div>
{% include "identity/_identity_banner.html" with identity=post.author %}
<div>
<time _="on click go url {% if link_original %}{{ post.url }}{% else %}{{ post.urls.view }}{% endif %} then halt">
{% if post.visibility == 0 %}
<i class="visibility fa-solid fa-earth-oceania" title="Public" aria-label="public"></i>
{% elif post.visibility == 1 %}
<i class="visibility fa-solid fa-lock-open" title="Unlisted" aria-label="unlisted"></i>
{% elif post.visibility == 2 %}
<i class="visibility fa-solid fa-lock" title="Followers Only" aria-label="followers only"></i>
{% elif post.visibility == 3 %}
<i class="visibility fa-solid fa-at" title="Mentioned Only" aria-label="mentioned only"></i>
{% elif post.visibility == 4 %}
<i class="visibility fa-solid fa-link-slash" title="Local Only" aria-label="local only"></i>
{% endif %}
{% if post.published %}
<a href="{% if link_original %}{{ post.url }}{% else %}{{ post.urls.view }}{% endif %}" title="{{ post.published }}">{{ post.published | timedeltashort }}</a>
{% else %}
<a href="{% if link_original %}{{ post.url }}{% else %}{{ post.urls.view }}{% endif %}" title="{{ post.created }}">{{ post.created | timedeltashort }}</a>
{% endif %}
</time>
</div>
</div>
{% if post.summary %}
{% 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 %}
<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 %}
{{ post.summary }}
{{ post.summary }}
</div>
{% endif %}
@ -40,65 +40,65 @@
{{ post.safe_content_local }}
{% if post.attachments.exists %}
<div class="attachments">
{% for attachment in post.attachments.all %}
{% if attachment.is_image %}
<a href="{{ attachment.full_url.relative }}" class="image" target="_blank"
_="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 }}">
</a>
{% elif attachment.is_video %}
<a href="{{ attachment.full_url.relative }}" class="video">
<video muted controls loop>
<source src="{{ attachment.full_url.relative }}">
</video>
</a>
{% endif %}
{% endfor %}
</div>
<div class="attachments">
{% for attachment in post.attachments.all %}
{% if attachment.is_image %}
<a href="{{ attachment.full_url.relative }}" class="image" target="_blank"
_="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 }}">
</a>
{% elif attachment.is_video %}
<a href="{{ attachment.full_url.relative }}" class="video">
<video muted controls loop>
<source src="{{ attachment.full_url.relative }}">
</video>
</a>
{% endif %}
{% endfor %}
</div>
{% endif %}
</div>
{% if post.edited %}
<div class="edited" title="{{ post.edited }}">
<small>Edited {{ post.edited | timedeltashort }} ago</small>
</div>
<div class="edited" title="{{ post.edited }}">
<small>Edited {{ post.edited | timedeltashort }} ago</small>
</div>
{% endif %}
{% if request.identity %}
<div class="actions" role="menubar">
{% include "activities/_reply.html" %}
{% include "activities/_like.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">
<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
<div class="actions" role="menubar">
{% include "activities/_reply.html" %}
{% include "activities/_like.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">
<i class="fa-solid fa-bars"></i>
</a>
<a href="{{ post.urls.action_delete }}" role="menuitem">
<i class="fa-solid fa-trash"></i> Delete
</a>
{% 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>
<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 href="{{ post.urls.action_delete }}" role="menuitem">
<i class="fa-solid fa-trash"></i> Delete
</a>
{% 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 %}
</div>

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

@ -11,7 +11,7 @@
{% if num_identities %}
<p>
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>
You will need to manually remove all identities from this domain in

Wyświetl plik

@ -18,22 +18,22 @@
<legend>Stats</legend>
<div class="field stats">
{% for stat_month, stat_value in hashtag.usage_months.items|slice:":5" %}
{% if forloop.first %}
<table>
<tr>
<th>Month</th>
<th>Usage</th>
</tr>
{% endif %}
{% if forloop.first %}
<table>
<tr>
<th>Month</th>
<th>Usage</th>
</tr>
{% endif %}
<tr>
<th>{{ stat_month|date:"M Y" }}</th>
<td>{{ stat_value }}</td>
</tr>
{% if forloop.last %}
</table>
{% endif %}
{% if forloop.last %}
</table>
{% endif %}
{% 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 %}
</div>
</fieldset>

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

@ -1,99 +1,99 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>{% block title %}{% endblock %} - {{ config.site_name }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
{% load static %}
<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/font_awesome/all.min.css" %}" type="text/css" />
<link rel="manifest" href="/manifest.json" />
<link rel="shortcut icon" href="{{ config.site_icon }}">
<script src="{% static "js/hyperscript.min.js" %}"></script>
<script src="{% static "js/htmx.min.js" %}"></script>
<script src="{% static "js/takahe.min.js" %}"></script>
<style>
body {
--color-highlight: {{ config.highlight_color }};
}
{% if not config_identity.visible_reaction_counts %}
.like-count {
display: none;
}
<head>
<title>{% block title %}{% endblock %} - {{ config.site_name }}</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
{% load static %}
<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/font_awesome/all.min.css" %}" type="text/css" />
<link rel="manifest" href="/manifest.json" />
<link rel="shortcut icon" href="{{ config.site_icon }}">
<script src="{% static "js/hyperscript.min.js" %}"></script>
<script src="{% static "js/htmx.min.js" %}"></script>
<script src="{% static "js/takahe.min.js" %}"></script>
<style>
body {
--color-highlight: {{ config.highlight_color }};
}
{% if not config_identity.visible_reaction_counts %}
.like-count {
display: none;
}
{% endif %}
</style>
{% if config_identity.custom_css %}
<style>{{ config_identity.custom_css }}</style>
{% endif %}
</style>
{% if config_identity.custom_css %}
<style>{{ config_identity.custom_css }}</style>
{% endif %}
{% block opengraph %}
{% include "_opengraph.html" with opengraph_local=opengraph_defaults %}
{% endblock %}
{% block extra_head %}{% endblock %}
{% block custom_head %}{% if config.custom_head %}{{ config.custom_head|safe }}{% endif %}{% endblock %}
</head>
<body class="{% block body_class %}{% endblock %}" hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>
<a id='skip-to-main' class='screenreader-text' href='#main-content'>Skip to Content</a>
<a id='skip-to-nav' class='screenreader-text' href='#side-navigation'>Skip to Navigation</a>
<main>
{% block body_main %}
<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>
{% block opengraph %}
{% include "_opengraph.html" with opengraph_local=opengraph_defaults %}
{% endblock %}
{% block extra_head %}{% endblock %}
{% block custom_head %}{% if config.custom_head %}{{ config.custom_head|safe }}{% endif %}{% endblock %}
</head>
<body class="{% block body_class %}{% endblock %}" hx-headers='{"X-CSRFToken": "{{ csrf_token }}"}'>
<a id='skip-to-main' class='screenreader-text' href='#main-content'>Skip to Content</a>
<a id='skip-to-nav' class='screenreader-text' href='#side-navigation'>Skip to Navigation</a>
<main>
{% block body_main %}
<header>
<a class="logo" href="/">
<img src="{{ config.site_icon }}" width="32">
{{ config.site_name }}
</a>
<a href="{% url "search" %}" title="Search" role="menuitem" class="search {% if top_section == "search" %}selected{% endif %}">
<i class="fa-solid fa-search"></i>
</a>
{% if allows_refresh %}
<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()]">
<i class="fa-solid fa-rotate"></i>
</a>
{% 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">
<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 href="{% url "search" %}" title="Search" role="menuitem" class="search {% if top_section == "search" %}selected{% endif %}">
<i class="fa-solid fa-search"></i>
</a>
{% if allows_refresh %}
<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()]">
<i class="fa-solid fa-rotate"></i>
</a>
{% 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 %}
{{ request.identity.username }}
<img src="{{ request.identity.local_icon_url.relative }}" title="{{ request.identity.handle }}">
<div class="gap"></div>
<a href="/auth/login/" role="menuitem" class="identity"><i class="fa-solid fa-right-to-bracket"></i> Login</a>
{% endif %}
</a>
{% else %}
<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>
</menu>
</header>
{% block full_content %}
{% include 'activities/_image_viewer.html' %}
{% block pre_content %}
{% block full_content %}
{% include 'activities/_image_viewer.html' %}
{% 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 %}
<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 %}
</main>
</main>
{% block footer %}
{% endblock %}
{% block footer %}
{% endblock %}
</body>
</body>
</html>

Wyświetl plik

@ -1,3 +1,3 @@
{% 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 %}

Wyświetl plik

@ -1,17 +1,17 @@
{% 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%">
<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>
<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>
<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>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</tbody>
</table>
{% endautoescape %}

Wyświetl plik

@ -1,7 +1,7 @@
{% autoescape off %}
<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">
{{ content }}
</td>
</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">
{{ content }}
</td>
</tr>
{% endautoescape %}

Wyświetl plik

@ -1,27 +1,27 @@
{% extends "emails/base.html" %}
{% load mail_tags %}
{% autoescape off %}
{% block title %}{{settings.MAIN_DOMAIN}} - New Account Created{% endblock title %}
{% block subtitle %}{{settings.MAIN_DOMAIN}} - New Account Created{% endblock subtitle %}
{% block title %}{{settings.MAIN_DOMAIN}} - New Account Created{% endblock title %}
{% block subtitle %}{{settings.MAIN_DOMAIN}} - New Account Created{% endblock subtitle %}
{% block body_greeting %}
{% email_body_content "Hi there," %}
{% endblock body_greeting %}
{% block body_greeting %}
{% email_body_content "Hi there," %}
{% endblock body_greeting %}
{% 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 "To confirm your new account, go to this link:" %}
{% endblock 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 "To confirm your new account, go to this link:" %}
{% endblock body_content %}
{% block body_button %}
{% email_button button_text="Confirm New Account" button_link="https://{{settings.MAIN_DOMAIN}}/auth/reset/{{reset.token}}/" %}
{% endblock body_button %}
{% block body_button %}
{% email_button button_text="Confirm New Account" button_link="https://{{settings.MAIN_DOMAIN}}/auth/reset/{{reset.token}}/" %}
{% endblock body_button %}
{% block body_signature %}
{% email_body_content "Thanks, Admins @{{settings.MAIN_DOMAIN}}" %}
{% endblock body_signature %}
{% block body_signature %}
{% email_body_content "Thanks, Admins @{{settings.MAIN_DOMAIN}}" %}
{% endblock body_signature %}
{% 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." %}
{% endblock 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." %}
{% endblock extra_footer %}
{% endautoescape %}

Wyświetl plik

@ -1,163 +1,163 @@
{% autoescape off %}
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{% block title %}{% endblock title %}</title>
<style>
@media only screen and (max-width: 620px) {
table.body h1 {
font-size: 28px !important;
margin-bottom: 10px !important;
}
<!doctype html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>{% block title %}{% endblock title %}</title>
<style>
@media only screen and (max-width: 620px) {
table.body h1 {
font-size: 28px !important;
margin-bottom: 10px !important;
}
table.body p,
table.body ul,
table.body ol,
table.body td,
table.body span,
table.body a {
font-size: 16px !important;
}
table.body p,
table.body ul,
table.body ol,
table.body td,
table.body span,
table.body a {
font-size: 16px !important;
}
table.body .wrapper,
table.body .article {
padding: 10px !important;
}
table.body .wrapper,
table.body .article {
padding: 10px !important;
}
table.body .content {
padding: 0 !important;
}
table.body .content {
padding: 0 !important;
}
table.body .container {
padding: 0 !important;
width: 100% !important;
}
table.body .container {
padding: 0 !important;
width: 100% !important;
}
table.body .main {
border-left-width: 0 !important;
border-radius: 0 !important;
border-right-width: 0 !important;
}
table.body .main {
border-left-width: 0 !important;
border-radius: 0 !important;
border-right-width: 0 !important;
}
table.body .btn table {
width: 100% !important;
}
table.body .btn table {
width: 100% !important;
}
table.body .btn a {
width: 100% !important;
}
table.body .btn a {
width: 100% !important;
}
table.body .img-responsive {
height: auto !important;
max-width: 100% !important;
width: auto !important;
}
}
@media all {
.ExternalClass {
width: 100%;
}
table.body .img-responsive {
height: auto !important;
max-width: 100% !important;
width: auto !important;
}
}
@media all {
.ExternalClass {
width: 100%;
}
.ExternalClass,
.ExternalClass p,
.ExternalClass span,
.ExternalClass font,
.ExternalClass td,
.ExternalClass div {
line-height: 100%;
}
.ExternalClass,
.ExternalClass p,
.ExternalClass span,
.ExternalClass font,
.ExternalClass td,
.ExternalClass div {
line-height: 100%;
}
.apple-link a {
color: inherit !important;
font-family: inherit !important;
font-size: inherit !important;
font-weight: inherit !important;
line-height: inherit !important;
text-decoration: none !important;
}
.apple-link a {
color: inherit !important;
font-family: inherit !important;
font-size: inherit !important;
font-weight: inherit !important;
line-height: inherit !important;
text-decoration: none !important;
}
#MessageViewBody a {
color: inherit;
text-decoration: none;
font-size: inherit;
font-family: inherit;
font-weight: inherit;
line-height: inherit;
}
#MessageViewBody a {
color: inherit;
text-decoration: none;
font-size: inherit;
font-family: inherit;
font-weight: inherit;
line-height: inherit;
}
.btn-primary table td:hover {
background-color: #34495e !important;
}
.btn-primary table td:hover {
background-color: #34495e !important;
}
.btn-primary a:hover {
background-color: #34495e !important;
border-color: #34495e !important;
}
}
</style>
</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%;">
<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">
<tr>
<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">
<div class="content" style="box-sizing: border-box; display: block; margin: 0 auto; max-width: 580px; padding: 10px;">
.btn-primary a:hover {
background-color: #34495e !important;
border-color: #34495e !important;
}
}
</style>
</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%;">
<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">
<tr>
<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">
<div class="content" style="box-sizing: border-box; display: block; margin: 0 auto; max-width: 580px; padding: 10px;">
<!-- 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%">
{% block body %}
<!-- START MAIN CONTENT AREA -->
<tr>
<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%">
<tr>
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top;" valign="top">
{% block body_greeting %}
{% endblock body_greeting %}
{% block body_content %}
{% endblock body_content %}
{% block body_button %}
{% endblock body_button %}
{% block body_signature %}
{% endblock body_signature %}
<!-- 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%">
{% block body %}
<!-- START MAIN CONTENT AREA -->
<tr>
<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%">
<tr>
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top;" valign="top">
{% block body_greeting %}
{% endblock body_greeting %}
{% block body_content %}
{% endblock body_content %}
{% block body_button %}
{% endblock body_button %}
{% block 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>
</tr>
</table>
</td>
</tr>
{% endblock body %}
<!-- END MAIN CONTENT AREA -->
<td style="font-family: sans-serif; font-size: 14px; vertical-align: top;" valign="top">&nbsp;</td>
</tr>
</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 style="font-family: sans-serif; font-size: 14px; vertical-align: top;" valign="top">&nbsp;</td>
</tr>
</table>
</body>
</html>
</body>
</html>
{% endautoescape %}

Wyświetl plik

@ -1,27 +1,27 @@
{% extends "emails/base.html" %}
{% load mail_tags %}
{% autoescape off %}
{% block title %}{{settings.MAIN_DOMAIN}} - Password Reset Requested{% endblock title %}
{% block subtitle %}{{settings.MAIN_DOMAIN}} - Password Reset Requested{% endblock subtitle %}
{% block title %}{{settings.MAIN_DOMAIN}} - Password Reset Requested{% endblock title %}
{% block subtitle %}{{settings.MAIN_DOMAIN}} - Password Reset Requested{% endblock subtitle %}
{% block body_greeting %}
{% email_body_content "Hi there," %}
{% endblock body_greeting %}
{% block body_greeting %}
{% email_body_content "Hi there," %}
{% endblock body_greeting %}
{% 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 "To reset your password, go to this link:" %}
{% endblock 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 "To reset your password, go to this link:" %}
{% endblock body_content %}
{% block body_button %}
{% email_button button_text="Reset Password" button_link="https://{{settings.MAIN_DOMAIN}}/auth/reset/{{reset.token}}/" %}
{% endblock body_button %}
{% block body_button %}
{% email_button button_text="Reset Password" button_link="https://{{settings.MAIN_DOMAIN}}/auth/reset/{{reset.token}}/" %}
{% endblock body_button %}
{% block body_signature %}
{% email_body_content "Thanks, Admins @{{settings.MAIN_DOMAIN}}" %}
{% endblock body_signature %}
{% block body_signature %}
{% email_body_content "Thanks, Admins @{{settings.MAIN_DOMAIN}}" %}
{% endblock body_signature %}
{% 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." %}
{% endblock 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." %}
{% endblock extra_footer %}
{% endautoescape %}

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

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

Wyświetl plik

@ -10,44 +10,44 @@
{% endif %}
<form action="{{ identity.urls.action }}" method="POST" class="inline-menu">
{% csrf_token %}
{% if follow %}
<input type="hidden" name="action" value="unfollow">
<button class="destructive" title="Unfollow"><i class="fa-solid fa-user-minus"></i>
{% if follow.pending %}Follow Pending{% else %}Unfollow{% endif %}
</button>
{% else %}
<input type="hidden" name="action" value="follow">
<button><i class="fa-solid fa-user-plus"></i> Follow</button>
{% endif %}
{% if follow %}
<input type="hidden" name="action" value="unfollow">
<button class="destructive" title="Unfollow"><i class="fa-solid fa-user-minus"></i>
{% if follow.pending %}Follow Pending{% else %}Unfollow{% endif %}
</button>
{% else %}
<input type="hidden" name="action" value="follow">
<button><i class="fa-solid fa-user-plus"></i> Follow</button>
{% endif %}
</form>
{% endif %}
{% 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">
<i class="fa-solid fa-bars"></i>
</a>
<menu>
{% if follow %}
<form action="{{ identity.urls.action }}" method="POST" class="inline">
{% csrf_token %}
{% if follow.boosts %}
<input type="hidden" name="action" value="hide_boosts">
<button role="menuitem"><i class="fa-solid fa-retweet"></i> Hide boosts</button>
{% else %}
<input type="hidden" name="action" value="show_boosts">
<button role="menuitem"><i class="fa-solid fa-retweet"></i> Show boosts</button>
<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>
</a>
<menu>
{% if follow %}
<form action="{{ identity.urls.action }}" method="POST" class="inline">
{% csrf_token %}
{% if follow.boosts %}
<input type="hidden" name="action" value="hide_boosts">
<button role="menuitem"><i class="fa-solid fa-retweet"></i> Hide boosts</button>
{% else %}
<input type="hidden" name="action" value="show_boosts">
<button role="menuitem"><i class="fa-solid fa-retweet"></i> Show boosts</button>
{% endif %}
</form>
{% endif %}
</form>
{% endif %}
{% if request.user.admin %}
<a href="{{ identity.urls.admin_edit }}" role="menuitem">
<i class="fa-solid fa-user-gear"></i> View in Admin
</a>
<a href="{{ identity.urls.djadmin_edit }}" role="menuitem">
<i class="fa-solid fa-gear"></i> View in djadmin
</a>
{% endif %}
</menu>
{% endif %}
{% if request.user.admin %}
<a href="{{ identity.urls.admin_edit }}" role="menuitem">
<i class="fa-solid fa-user-gear"></i> View in Admin
</a>
<a href="{{ identity.urls.djadmin_edit }}" role="menuitem">
<i class="fa-solid fa-gear"></i> View in djadmin
</a>
{% endif %}
</menu>
{% endif %}
</div>
</div>

Wyświetl plik

@ -6,7 +6,7 @@
<form action="." method="POST">
<h1>Create New Identity</h1>
<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 %}
<fieldset>
<legend>Identity Details</legend>

Wyświetl plik

@ -28,9 +28,9 @@
<small>
@{{ identity.handle }}
<a title="Copy handle"
class="copy"
tabindex="0"
_="on click or keyup[key is 'Enter']
class="copy"
tabindex="0"
_="on click or keyup[key is 'Enter']
writeText('@{{ identity.handle }}') into the navigator's clipboard
then add .copied
wait 2s
@ -49,20 +49,20 @@
{% if identity.metadata %}
<div class="identity-metadata">
{% for entry in identity.safe_metadata %}
<div class="metadata-pair">
<span class="metadata-name">{{ entry.name }}</span>
<span class="metadata-value">{{ entry.value }}</span>
</div>
<div class="metadata-pair">
<span class="metadata-name">{{ entry.name }}</span>
<span class="metadata-value">{{ entry.value }}</span>
</div>
{% endfor %}
</div>
{% endif %}
{% if identity.local and identity.config_identity.visible_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.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>
</div>
<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.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>
</div>
{% endif %}
{% if not identity.local %}

Wyświetl plik

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

Wyświetl plik

@ -11,7 +11,7 @@
</fieldset>
<fieldset>
<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>
</form>
{% endblock %}