update lint
This commit is contained in:
parent
836e8a4e9f
commit
3a97ae50f8
5 changed files with 264 additions and 274 deletions
|
@ -47,123 +47,121 @@
|
|||
</div>
|
||||
<div>
|
||||
<span class="rating-editor {% if shelf_type == 'wishlist' %}hidden{% endif %}"
|
||||
{# djlint:off #}
|
||||
_="on mousemove(currentTarget, offsetX) set current_value to Math.round((10 * offsetX) / currentTarget.offsetWidth) if current_value <=10 then set star_div to the <div/> in me set star_div.style.width to (current_value * 10) + '%' set @data-tooltip to current_value or '{% trans "not rated" %}' add .yellow to star_div end on click(currentTarget, offsetX) set current_value to Math.round((10 * offsetX) / currentTarget.offsetWidth) if current_value <=10 then set star_div to the <div/> in me set star_input to the <input/> in me set star_div.style.width to (current_value * 10) + '%' set @data-tooltip to current_value or '{% trans "not rated" %}' set star_input.value to current_value end on mouseleave(currentTarget) set star_div to the <div/> in me set star_input to the <input/> in me set current_value to star_input.value set star_div.style.width to (current_value * 10) + '%' set @data-tooltip to current_value or '{% trans "not rated" %}' end"
|
||||
{# djlint:on #}
|
||||
id="rating_editor">
|
||||
{{ mark.rating_grade|rating_star }}
|
||||
<input type="hidden"
|
||||
name="rating_grade"
|
||||
id="id_rating"
|
||||
value="{{ mark.rating_grade | default:0 }}">
|
||||
</span>
|
||||
</div>
|
||||
_="on mousemove(currentTarget, offsetX) set current_value to Math.round((10 * offsetX) / currentTarget.offsetWidth) if current_value <=10 then set star_div to the <div/> in me set star_div.style.width to (current_value * 10) + '%' set @data-tooltip to current_value or '{% trans "not rated" %}' add .yellow to star_div end on click(currentTarget, offsetX) set current_value to Math.round((10 * offsetX) / currentTarget.offsetWidth) if current_value <=10 then set star_div to the <div/> in me set star_input to the <input/> in me set star_div.style.width to (current_value * 10) + '%' set @data-tooltip to current_value or '{% trans "not rated" %}' set star_input.value to current_value end on mouseleave(currentTarget) set star_div to the <div/> in me set star_input to the <input/> in me set current_value to star_input.value set star_div.style.width to (current_value * 10) + '%' set @data-tooltip to current_value or '{% trans "not rated" %}' end"
|
||||
id="rating_editor">
|
||||
{{ mark.rating_grade|rating_star }}
|
||||
<input type="hidden"
|
||||
name="rating_grade"
|
||||
id="id_rating"
|
||||
value="{{ mark.rating_grade | default:0 }}">
|
||||
</span>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<div>
|
||||
<fieldset>
|
||||
<textarea name="text"
|
||||
rows="5"
|
||||
autofocus
|
||||
placeholder="{% trans "Tips: use >!text!< for spoilers; some instances may not be able to show posts longer than 360 charactors." %}"
|
||||
id="id_text">{{ mark.comment_text|default:"" }}</textarea>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div>
|
||||
<div class="tag-input">
|
||||
<input name="tags"
|
||||
type="text"
|
||||
placeholder="{% trans "add a tag and press Enter" %}"
|
||||
id="tags_input"
|
||||
data-initial-value="{{ tags }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid" style="overflow-x:scroll;">
|
||||
<div>
|
||||
<fieldset>
|
||||
<textarea name="text"
|
||||
rows="5"
|
||||
autofocus
|
||||
placeholder="{% trans "Tips: use >!text!< for spoilers; some instances may not be able to show posts longer than 360 charactors." %}"
|
||||
id="id_text">{{ mark.comment_text|default:"" }}</textarea>
|
||||
<input type="radio"
|
||||
name="visibility"
|
||||
value="0"
|
||||
required
|
||||
id="id_visibility_0"
|
||||
{% if mark.visibility == 0 %}checked{% endif %}>
|
||||
<label for="id_visibility_0">{% trans "Public" %}</label>
|
||||
<input type="radio"
|
||||
name="visibility"
|
||||
value="1"
|
||||
required
|
||||
id="id_visibility_1"
|
||||
{% if mark.visibility == 1 %}checked{% endif %}>
|
||||
<label for="id_visibility_1">{% trans "Followers Only" %}</label>
|
||||
<input type="radio"
|
||||
name="visibility"
|
||||
value="2"
|
||||
required
|
||||
id="id_visibility_2"
|
||||
{% if mark.visibility == 2 %}checked{% endif %}>
|
||||
<label for="id_visibility_2">{% trans "Mentioned Only" %}</label>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div>
|
||||
<div class="tag-input">
|
||||
<input name="tags"
|
||||
type="text"
|
||||
placeholder="{% trans "add a tag and press Enter" %}"
|
||||
id="tags_input"
|
||||
data-initial-value="{{ tags }}">
|
||||
</div>
|
||||
<fieldset>
|
||||
{% if request.user.mastodon or request.user.threads or request.user.bluesky %}
|
||||
<label for="id_share_to_mastodon">
|
||||
<input role="switch"
|
||||
type="checkbox"
|
||||
name="share_to_mastodon"
|
||||
id="id_share_to_mastodon"
|
||||
value="1"
|
||||
{% if request.user.preference.mastodon_default_repost %}checked{% endif %}>
|
||||
{% trans "Crosspost to timeline" %}
|
||||
</label>
|
||||
{% endif %}
|
||||
</fieldset>
|
||||
</div>
|
||||
<div class="grid" style="overflow-x:scroll;">
|
||||
<div>
|
||||
<fieldset>
|
||||
<input type="radio"
|
||||
name="visibility"
|
||||
value="0"
|
||||
required
|
||||
id="id_visibility_0"
|
||||
{% if mark.visibility == 0 %}checked{% endif %}>
|
||||
<label for="id_visibility_0">{% trans "Public" %}</label>
|
||||
<input type="radio"
|
||||
name="visibility"
|
||||
value="1"
|
||||
required
|
||||
id="id_visibility_1"
|
||||
{% if mark.visibility == 1 %}checked{% endif %}>
|
||||
<label for="id_visibility_1">{% trans "Followers Only" %}</label>
|
||||
<input type="radio"
|
||||
name="visibility"
|
||||
value="2"
|
||||
required
|
||||
id="id_visibility_2"
|
||||
{% if mark.visibility == 2 %}checked{% endif %}>
|
||||
<label for="id_visibility_2">{% trans "Mentioned Only" %}</label>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div>
|
||||
<fieldset>
|
||||
{% if request.user.mastodon or request.user.threads or request.user.bluesky %}
|
||||
<label for="id_share_to_mastodon">
|
||||
<input role="switch"
|
||||
type="checkbox"
|
||||
name="share_to_mastodon"
|
||||
id="id_share_to_mastodon"
|
||||
value="1"
|
||||
{% if request.user.preference.mastodon_default_repost %}checked{% endif %}>
|
||||
{% trans "Crosspost to timeline" %}
|
||||
</label>
|
||||
{% endif %}
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
<div class="grid">
|
||||
<div>
|
||||
<div>
|
||||
<input role="switch"
|
||||
_="on click toggle .invisible on #mark_date "
|
||||
type="checkbox"
|
||||
name="mark_anotherday"
|
||||
value="1"
|
||||
id="mark_anotherday">
|
||||
<label for="mark_anotherday">{% trans "change mark date" %}</label>
|
||||
<input class="invisible"
|
||||
type="date"
|
||||
name="mark_date"
|
||||
id="mark_date"
|
||||
min="1900-01-01"
|
||||
max="{{ date_today }}"
|
||||
value="{{ date_today }}">
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<fieldset>
|
||||
<input type="submit" value="{% trans "Save" %}">
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div>
|
||||
{% if mark.id %}
|
||||
<form id="mark_delete"
|
||||
action="{% url 'journal:mark' mark.item.uuid %}"
|
||||
method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="delete" value="1">
|
||||
<a>
|
||||
<button class="secondary"
|
||||
onclick="return confirm('{% trans "Sure to delete mark, comment and tags for this item?" %}')">
|
||||
{% trans "Delete" %}
|
||||
</button>
|
||||
</a>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="grid">
|
||||
<div>
|
||||
<div>
|
||||
<input role="switch"
|
||||
_="on click toggle .invisible on #mark_date "
|
||||
type="checkbox"
|
||||
name="mark_anotherday"
|
||||
value="1"
|
||||
id="mark_anotherday">
|
||||
<label for="mark_anotherday">{% trans "change mark date" %}</label>
|
||||
<input class="invisible"
|
||||
type="date"
|
||||
name="mark_date"
|
||||
id="mark_date"
|
||||
min="1900-01-01"
|
||||
max="{{ date_today }}"
|
||||
value="{{ date_today }}">
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<fieldset>
|
||||
<input type="submit" value="{% trans "Save" %}">
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div>
|
||||
{% if mark.id %}
|
||||
<form id="mark_delete"
|
||||
action="{% url 'journal:mark' mark.item.uuid %}"
|
||||
method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="delete" value="1">
|
||||
<a>
|
||||
<button class="secondary"
|
||||
onclick="return confirm('{% trans "Sure to delete mark, comment and tags for this item?" %}')">
|
||||
{% trans "Delete" %}
|
||||
</button>
|
||||
</a>
|
||||
</form>
|
||||
{% endif %}
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</article>
|
||||
</dialog>
|
||||
<script>
|
||||
function inputTags(configs) {
|
||||
|
|
|
@ -62,7 +62,7 @@ dev-dependencies = [
|
|||
"pre-commit>=4.0.1",
|
||||
"black~=24.4.2",
|
||||
"django-stubs>=5.1.0",
|
||||
"djlint>=1.35.2",
|
||||
"djlint>=1.36.4",
|
||||
"isort~=5.13.2",
|
||||
"lxml-stubs>=0.5.1",
|
||||
"pyright>=1.1.389",
|
||||
|
|
|
@ -194,7 +194,7 @@ pathspec==0.12.1
|
|||
# via black
|
||||
# via djlint
|
||||
# via mkdocs
|
||||
pillow==11.0.0
|
||||
pillow==11.1.0
|
||||
# via blurhash-python
|
||||
# via django-markdownx
|
||||
# via easy-thumbnails
|
||||
|
@ -259,7 +259,7 @@ rjsmin==1.2.2
|
|||
# via django-compressor
|
||||
rq==2.1.0
|
||||
# via django-rq
|
||||
ruff==0.8.4
|
||||
ruff==0.8.5
|
||||
sentry-sdk==2.19.2
|
||||
setproctitle==1.3.4
|
||||
six==1.17.0
|
||||
|
|
|
@ -124,7 +124,7 @@ multidict==6.1.0
|
|||
openpyxl==3.1.5
|
||||
packaging==24.2
|
||||
# via gunicorn
|
||||
pillow==11.0.0
|
||||
pillow==11.1.0
|
||||
# via blurhash-python
|
||||
# via django-markdownx
|
||||
# via easy-thumbnails
|
||||
|
|
|
@ -53,170 +53,162 @@
|
|||
<div role="group">
|
||||
{% if enable_email %}
|
||||
<button class="platform outline"
|
||||
{# djlint:off #}
|
||||
_="on click add .outline to .platform then remove .outline from me then hide <form/> then show #login-email"
|
||||
{# djlint:on #}
|
||||
id="platform-email"
|
||||
title="{% trans 'Email' %}">
|
||||
<i class="fa-solid fa-envelope"></i>
|
||||
</button>
|
||||
{% endif %}
|
||||
<button class="platform outline"
|
||||
{# djlint:off #}
|
||||
_="on click add .outline to .platform then remove .outline from me then hide <form/> then show #login-mastodon"
|
||||
{# djlint:on #}
|
||||
id="platform-mastodon"
|
||||
title="{% trans "Fediverse (Mastodon)" %}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="64 163 873 873"
|
||||
style="width: 1em;
|
||||
color: var(--pico-color);
|
||||
padding-bottom: 0.2em">
|
||||
<path d="M539 176q-32 0 -55 22t-25 55t20.5 58t56 27t58.5 -20.5t27 -56t-20.5 -59t-56.5 -26.5h-5zM452 271l-232 118q20 20 25 48l231 -118q-19 -20 -24 -48zM619 298q-13 25 -38 38l183 184q13 -25 39 -38zM477 320l-135 265l40 40l143 -280q-28 -5 -48 -25zM581 336 q-22 11 -46 10l-8 -1l21 132l56 9zM155 370q-32 0 -55 22.5t-25 55t20.5 58t56.5 27t59 -21t26.5 -56t-21 -58.5t-55.5 -27h-6zM245 438q1 9 1 18q-1 19 -10 35l132 21l26 -50zM470 474l-26 51l311 49q-1 -8 -1 -17q1 -19 10 -36zM842 480q-32 1 -55 23t-24.5 55t21 58 t56 27t58.5 -20.5t27 -56.5t-20.5 -59t-56.5 -27h-6zM236 493q-13 25 -39 38l210 210l51 -25zM196 531q-21 11 -44 10l-9 -1l40 256q21 -10 45 -9l8 1zM560 553l48 311q21 -10 44 -9l10 1l-46 -294zM755 576l-118 60l8 56l135 -68q-20 -20 -25 -48zM781 625l-119 231 q28 5 48 25l119 -231q-28 -5 -48 -25zM306 654l-68 134q28 5 48 25l60 -119zM568 671l-281 143q19 20 24 48l265 -135zM513 771l-51 25l106 107q13 -25 39 -38zM222 795q-32 0 -55.5 22.5t-25 55t21 57.5t56 27t58.5 -20.5t27 -56t-20.5 -58.5t-56.5 -27h-5zM311 863 q2 9 1 18q-1 19 -9 35l256 41q-1 -9 -1 -18q1 -18 10 -35zM646 863q-32 0 -55 22.5t-24.5 55t20.5 58t56 27t59 -21t27 -56t-20.5 -58.5t-56.5 -27h-6z" />
|
||||
</svg>
|
||||
<!--<i class="fa-brands fa-mastodon"></i>-->
|
||||
_="on click add .outline to .platform then remove .outline from me then hide <form/> then show #login-email"
|
||||
id="platform-email"
|
||||
title="{% trans 'Email' %}">
|
||||
<i class="fa-solid fa-envelope"></i>
|
||||
</button>
|
||||
{% if enable_threads %}
|
||||
<button class="platform outline"
|
||||
{# djlint:off #}
|
||||
_="on click add .outline to .platform then remove .outline from me then hide <form/> then show #login-threads"
|
||||
{# djlint:on #}
|
||||
id="platform-threads"
|
||||
title="{% trans 'Threads' %}">
|
||||
<i class="fa-brands fa-threads"></i>
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if enable_bluesky %}
|
||||
<button class="platform outline"
|
||||
{# djlint:off #}
|
||||
{% endif %}
|
||||
<button class="platform outline"
|
||||
_="on click add .outline to .platform then remove .outline from me then hide <form/> then show #login-mastodon"
|
||||
id="platform-mastodon"
|
||||
title="{% trans "Fediverse (Mastodon)" %}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="64 163 873 873"
|
||||
style="width: 1em;
|
||||
color: var(--pico-color);
|
||||
padding-bottom: 0.2em">
|
||||
<path d="M539 176q-32 0 -55 22t-25 55t20.5 58t56 27t58.5 -20.5t27 -56t-20.5 -59t-56.5 -26.5h-5zM452 271l-232 118q20 20 25 48l231 -118q-19 -20 -24 -48zM619 298q-13 25 -38 38l183 184q13 -25 39 -38zM477 320l-135 265l40 40l143 -280q-28 -5 -48 -25zM581 336 q-22 11 -46 10l-8 -1l21 132l56 9zM155 370q-32 0 -55 22.5t-25 55t20.5 58t56.5 27t59 -21t26.5 -56t-21 -58.5t-55.5 -27h-6zM245 438q1 9 1 18q-1 19 -10 35l132 21l26 -50zM470 474l-26 51l311 49q-1 -8 -1 -17q1 -19 10 -36zM842 480q-32 1 -55 23t-24.5 55t21 58 t56 27t58.5 -20.5t27 -56.5t-20.5 -59t-56.5 -27h-6zM236 493q-13 25 -39 38l210 210l51 -25zM196 531q-21 11 -44 10l-9 -1l40 256q21 -10 45 -9l8 1zM560 553l48 311q21 -10 44 -9l10 1l-46 -294zM755 576l-118 60l8 56l135 -68q-20 -20 -25 -48zM781 625l-119 231 q28 5 48 25l119 -231q-28 -5 -48 -25zM306 654l-68 134q28 5 48 25l60 -119zM568 671l-281 143q19 20 24 48l265 -135zM513 771l-51 25l106 107q13 -25 39 -38zM222 795q-32 0 -55.5 22.5t-25 55t21 57.5t56 27t58.5 -20.5t27 -56t-20.5 -58.5t-56.5 -27h-5zM311 863 q2 9 1 18q-1 19 -9 35l256 41q-1 -9 -1 -18q1 -18 10 -35zM646 863q-32 0 -55 22.5t-24.5 55t20.5 58t56 27t59 -21t27 -56t-20.5 -58.5t-56.5 -27h-6z" />
|
||||
</svg>
|
||||
<!--<i class="fa-brands fa-mastodon"></i>-->
|
||||
</button>
|
||||
{% if enable_threads %}
|
||||
<button class="platform outline"
|
||||
_="on click add .outline to .platform then remove .outline from me then hide <form/> then show #login-threads"
|
||||
id="platform-threads"
|
||||
title="{% trans 'Threads' %}">
|
||||
<i class="fa-brands fa-threads"></i>
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if enable_bluesky %}
|
||||
<button class="platform outline"
|
||||
_="on click add .outline to .platform then remove .outline from me then hide <form/> then show #login-bluesky"
|
||||
{# djlint:on #}
|
||||
id="platform-bluesky"
|
||||
title="{% trans 'Bluesky (ATProto)' %}">
|
||||
<i class="fa-brands fa-bluesky" style="font-size:85%"></i>
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
<form id="login-email"
|
||||
style="display:none"
|
||||
action="{% url 'mastodon:email_login' %}"
|
||||
method="post"
|
||||
onsubmit="return login(this);">
|
||||
{% csrf_token %}
|
||||
<input name="method" value="email" type="hidden" />
|
||||
<input required
|
||||
name="email"
|
||||
id="email"
|
||||
type="email"
|
||||
placeholder="{% trans 'Enter your email address' %}"
|
||||
autocomplete="email" />
|
||||
<input type='submit' value="{% trans 'Send verification code' %}" />
|
||||
</form>
|
||||
<form id="login-mastodon"
|
||||
style="display:none"
|
||||
action="{% url 'mastodon:login' %}"
|
||||
method="post"
|
||||
onsubmit="return login(this);">
|
||||
{% csrf_token %}
|
||||
<input name="method" value="mastodon" type="hidden" />
|
||||
<input required
|
||||
type="text"
|
||||
name="domain"
|
||||
id="domain"
|
||||
autofocus
|
||||
pattern="(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,})"
|
||||
placeholder="{% trans 'Domain of your instance, e.g. mastodon.social' %}"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
autocomplete="off"
|
||||
spellcheck="false" />
|
||||
<small id="mastodon">
|
||||
{% blocktrans %}Please enter domain of your instance; e.g. if your id is <i>@neodb@mastodon.social</i>, only enter <i>mastodon.social</i>.{% endblocktrans %}
|
||||
</small>
|
||||
<br>
|
||||
<input type='submit' value="{% trans 'Authorize via Fediverse instance' %}" />
|
||||
<small>
|
||||
{% blocktrans %}If you don't have a <a href="https://joinmastodon.org/servers" target="_blank">Fediverse (Mastodon) account</a> yet, you may register or login with Email first, and link it with Fediverse (Mastodon) later in account settings.{% endblocktrans %}
|
||||
</small>
|
||||
</form>
|
||||
<form id="login-threads"
|
||||
style="display:none"
|
||||
action="{% url 'mastodon:threads_login' %}"
|
||||
method="post"
|
||||
onsubmit="return login(this);">
|
||||
{% csrf_token %}
|
||||
<input name="method" value="threads" type="hidden" />
|
||||
<input type='submit' value="{% trans 'Authorize via Threads' %}" />
|
||||
</form>
|
||||
<form id="login-bluesky"
|
||||
style="display:none"
|
||||
action="{% url 'mastodon:bluesky_login' %}"
|
||||
method="post"
|
||||
onsubmit="return login(this);">
|
||||
{% csrf_token %}
|
||||
<input name="method" value="bluesky" type="hidden" />
|
||||
<input required
|
||||
name="username"
|
||||
autofocus
|
||||
pattern="([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?"
|
||||
placeholder="{% trans 'ATProto handle' %}"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
autocomplete="off"
|
||||
spellcheck="false" />
|
||||
<small>{% trans "Please input your ATProto handle (e.g. neodb.bsky.social, without the leading @), do not use email. If you changed handle recently, just use the latest one." %}</small>
|
||||
<input required
|
||||
type="password"
|
||||
name="password"
|
||||
placeholder="{% trans 'Bluesky app password' %}"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
autocomplete="off"
|
||||
spellcheck="false" />
|
||||
<small>{% blocktrans %}App password can be created on <a href="https://bsky.app/settings/app-passwords" target="_blank">bsky.app</a>.{% endblocktrans %}</small>
|
||||
<input type='submit' value="{% trans 'Authorize via bsky.app' %}" />
|
||||
</form>
|
||||
<form>
|
||||
<div style="margin:0 1em;">
|
||||
{% blocktrans %}Please choose one to register or login {{site_name}}. Have more than one of these identities? Don't worry, you may link them in account settings once logged in.{% endblocktrans %}
|
||||
</div>
|
||||
</form>
|
||||
{% else %}
|
||||
<form>
|
||||
<select name="domain">
|
||||
{% for site in sites %}<option value="{{ site }}">@{{ site }}</option>{% endfor %}
|
||||
</select>
|
||||
<input type='submit'
|
||||
value="{% trans 'Authorize via Fediverse instance' %}"
|
||||
id="loginButton" />
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if invite_status %}
|
||||
<small>
|
||||
{% if invite_status == 1 %}
|
||||
<i class="fa-solid fa-circle-check"></i> {% trans "Valid invitation code, please login or register." %}
|
||||
{% elif invite_status == -1 %}
|
||||
<i class="fa-solid fa-person-circle-question"></i> {% trans "Please use invitation link to register a new account; existing user may login." %}
|
||||
{% elif invite_status == -2 %}
|
||||
<i class="fa-solid fa-circle-xmark"></i> {% trans "Invitation code invalid or expired." %}
|
||||
{% endif %}
|
||||
</small>
|
||||
{% endif %}
|
||||
<small class="hide_unless_alter_domain">
|
||||
<br>
|
||||
{% blocktrans %}You are visiting an alternative domain for {{ site_name }}, please always use <a href="{{ site_url }}{{ request.get_full_path }}">original version</a> if possible.{% endblocktrans %}
|
||||
</small>
|
||||
<div class="delayed">{% trans "Loading timed out, please check your network (VPN) settings." %}</div>
|
||||
</div>
|
||||
</article>
|
||||
<footer>
|
||||
<br>
|
||||
<small>
|
||||
{% blocktrans %}Continue using this site implies consent to our <a href="/pages/rules/">rules</a> and <a href="/pages/terms/">terms</a>, including using cookies to provide necessary functionality.{% endblocktrans %}
|
||||
</small>
|
||||
</footer>
|
||||
{{ sites|json_script:"sites-data" }}
|
||||
<script>
|
||||
<i class="fa-brands fa-bluesky" style="font-size:85%"></i>
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
<form id="login-email"
|
||||
style="display:none"
|
||||
action="{% url 'mastodon:email_login' %}"
|
||||
method="post"
|
||||
onsubmit="return login(this);">
|
||||
{% csrf_token %}
|
||||
<input name="method" value="email" type="hidden" />
|
||||
<input required
|
||||
name="email"
|
||||
id="email"
|
||||
type="email"
|
||||
placeholder="{% trans 'Enter your email address' %}"
|
||||
autocomplete="email" />
|
||||
<input type='submit' value="{% trans 'Send verification code' %}" />
|
||||
</form>
|
||||
<form id="login-mastodon"
|
||||
style="display:none"
|
||||
action="{% url 'mastodon:login' %}"
|
||||
method="post"
|
||||
onsubmit="return login(this);">
|
||||
{% csrf_token %}
|
||||
<input name="method" value="mastodon" type="hidden" />
|
||||
<input required
|
||||
type="text"
|
||||
name="domain"
|
||||
id="domain"
|
||||
autofocus
|
||||
pattern="(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,})"
|
||||
placeholder="{% trans 'Domain of your instance, e.g. mastodon.social' %}"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
autocomplete="off"
|
||||
spellcheck="false" />
|
||||
<small id="mastodon">
|
||||
{% blocktrans %}Please enter domain of your instance; e.g. if your id is <i>@neodb@mastodon.social</i>, only enter <i>mastodon.social</i>.{% endblocktrans %}
|
||||
</small>
|
||||
<br>
|
||||
<input type='submit' value="{% trans 'Authorize via Fediverse instance' %}" />
|
||||
<small>
|
||||
{% blocktrans %}If you don't have a <a href="https://joinmastodon.org/servers" target="_blank">Fediverse (Mastodon) account</a> yet, you may register or login with Email first, and link it with Fediverse (Mastodon) later in account settings.{% endblocktrans %}
|
||||
</small>
|
||||
</form>
|
||||
<form id="login-threads"
|
||||
style="display:none"
|
||||
action="{% url 'mastodon:threads_login' %}"
|
||||
method="post"
|
||||
onsubmit="return login(this);">
|
||||
{% csrf_token %}
|
||||
<input name="method" value="threads" type="hidden" />
|
||||
<input type='submit' value="{% trans 'Authorize via Threads' %}" />
|
||||
</form>
|
||||
<form id="login-bluesky"
|
||||
style="display:none"
|
||||
action="{% url 'mastodon:bluesky_login' %}"
|
||||
method="post"
|
||||
onsubmit="return login(this);">
|
||||
{% csrf_token %}
|
||||
<input name="method" value="bluesky" type="hidden" />
|
||||
<input required
|
||||
name="username"
|
||||
autofocus
|
||||
pattern="([a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?"
|
||||
placeholder="{% trans 'ATProto handle' %}"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
autocomplete="off"
|
||||
spellcheck="false" />
|
||||
<small>{% trans "Please input your ATProto handle (e.g. neodb.bsky.social, without the leading @), do not use email. If you changed handle recently, just use the latest one." %}</small>
|
||||
<input required
|
||||
type="password"
|
||||
name="password"
|
||||
placeholder="{% trans 'Bluesky app password' %}"
|
||||
autocorrect="off"
|
||||
autocapitalize="off"
|
||||
autocomplete="off"
|
||||
spellcheck="false" />
|
||||
<small>{% blocktrans %}App password can be created on <a href="https://bsky.app/settings/app-passwords" target="_blank">bsky.app</a>.{% endblocktrans %}</small>
|
||||
<input type='submit' value="{% trans 'Authorize via bsky.app' %}" />
|
||||
</form>
|
||||
<form>
|
||||
<div style="margin:0 1em;">
|
||||
{% blocktrans %}Please choose one to register or login {{site_name}}. Have more than one of these identities? Don't worry, you may link them in account settings once logged in.{% endblocktrans %}
|
||||
</div>
|
||||
</form>
|
||||
{% else %}
|
||||
<form>
|
||||
<select name="domain">
|
||||
{% for site in sites %}<option value="{{ site }}">@{{ site }}</option>{% endfor %}
|
||||
</select>
|
||||
<input type='submit'
|
||||
value="{% trans 'Authorize via Fediverse instance' %}"
|
||||
id="loginButton" />
|
||||
</form>
|
||||
{% endif %}
|
||||
{% if invite_status %}
|
||||
<small>
|
||||
{% if invite_status == 1 %}
|
||||
<i class="fa-solid fa-circle-check"></i> {% trans "Valid invitation code, please login or register." %}
|
||||
{% elif invite_status == -1 %}
|
||||
<i class="fa-solid fa-person-circle-question"></i> {% trans "Please use invitation link to register a new account; existing user may login." %}
|
||||
{% elif invite_status == -2 %}
|
||||
<i class="fa-solid fa-circle-xmark"></i> {% trans "Invitation code invalid or expired." %}
|
||||
{% endif %}
|
||||
</small>
|
||||
{% endif %}
|
||||
<small class="hide_unless_alter_domain">
|
||||
<br>
|
||||
{% blocktrans %}You are visiting an alternative domain for {{ site_name }}, please always use <a href="{{ site_url }}{{ request.get_full_path }}">original version</a> if possible.{% endblocktrans %}
|
||||
</small>
|
||||
<div class="delayed">{% trans "Loading timed out, please check your network (VPN) settings." %}</div>
|
||||
</div>
|
||||
</article>
|
||||
<footer>
|
||||
<br>
|
||||
<small>
|
||||
{% blocktrans %}Continue using this site implies consent to our <a href="/pages/rules/">rules</a> and <a href="/pages/terms/">terms</a>, including using cookies to provide necessary functionality.{% endblocktrans %}
|
||||
</small>
|
||||
</footer>
|
||||
{{ sites|json_script:"sites-data" }}
|
||||
<script>
|
||||
const sites = JSON.parse(document.getElementById('sites-data').textContent);
|
||||
const autoCompleteJS = new autoComplete({ placeHolder: "{% trans 'Domain of your instance (excl. @)' %}",
|
||||
selector: "#domain",
|
||||
|
@ -271,6 +263,6 @@
|
|||
$('#login-' + method).show();
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Reference in a new issue