mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-12-22 13:14:28 +00:00
Tweak templates
This commit is contained in:
parent
ed0a780d7e
commit
5f34c2aee6
4 changed files with 39 additions and 21 deletions
|
@ -44,7 +44,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<footer class="footer">
|
<footer class="footer">
|
||||||
Powered by <a href="https://microblog.pub">microblog.pub</a> <small class="microblogpub-version"><code>{{ microblogpub_version }}</code></small> (<a href="https://github.com/tsileo/microblog.pub">source code</a>) and the <a href="https://activitypub.rocks/">ActivityPub</a> protocol
|
Powered by <a href="https://docs.microblog.pub">microblog.pub</a> <small class="microblogpub-version"><code>{{ microblogpub_version }}</code></small> and the <a href="https://activitypub.rocks/">ActivityPub</a> protocol
|
||||||
</footer>
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
<div style="margin:auto;">
|
<div style="margin:auto;">
|
||||||
<form class="form" action="/admin/login" method="POST">
|
<form class="form" action="/admin/login" method="POST">
|
||||||
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
<input type="hidden" name="csrf_token" value="{{ csrf_token }}">
|
||||||
<input type="password" placeholder="password" name="password">
|
<input type="password" placeholder="password" name="password" autofocus>
|
||||||
<input type="submit" value="Login">
|
<input type="submit" value="login">
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
<p>Interact with an ActivityPub object via its URL or look for a user using <i>@user@domain.tld</i></p>
|
<p>Interact with an ActivityPub object via its URL or look for a user using <i>@user@domain.tld</i></p>
|
||||||
|
|
||||||
<form class="form" action="{{ url_for("get_lookup") }}" method="GET">
|
<form class="form" action="{{ url_for("get_lookup") }}" method="GET">
|
||||||
<input type="text" name="query" value="{{ query if query else "" }}">
|
<input type="text" name="query" value="{{ query if query else "" }}" autofocus>
|
||||||
<input type="submit" value="Lookup">
|
<input type="submit" value="Lookup">
|
||||||
</form>
|
</form>
|
||||||
{% if ap_object and ap_object.ap_type == "Person" %}
|
{% if ap_object and ap_object.ap_type == "Person" %}
|
||||||
|
|
|
@ -240,15 +240,29 @@
|
||||||
|
|
||||||
{{ display_og_meta(object) }}
|
{{ display_og_meta(object) }}
|
||||||
|
|
||||||
<a href="{{ object.url }}" class="u-url u-uid"><time class="dt-published" datetime="{{ object.ap_published_at }}">{{ object.ap_published_at | format_date }}</time></a>
|
<nav class="flexbox">
|
||||||
{{ object.visibility.value }}
|
<ul>
|
||||||
{% if object.is_from_outbox %}
|
<li>
|
||||||
{{ object.likes_count }} likes
|
<a href="{{ object.url }}" class="u-url u-uid"><time class="dt-published" datetime="{{ object.ap_published_at }}">{{ object.ap_published_at | format_date }}</time></a>
|
||||||
{% endif %}
|
</li>
|
||||||
|
{% if is_admin %}
|
||||||
{% if object.is_from_outbox %}
|
<li>
|
||||||
{{ object.announces_count }} shares
|
{{ object.visibility.value }}
|
||||||
{% endif %}
|
</li>
|
||||||
|
{% if object.is_from_outbox %}
|
||||||
|
<li>
|
||||||
|
<strong>{{ object.likes_count }}</strong> likes
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<strong>{{ object.announces_count }}</strong> shares
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<strong>{{ object.replies_count }}</strong> replies
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
|
||||||
{{ display_attachments(object) }}
|
{{ display_attachments(object) }}
|
||||||
|
|
||||||
|
@ -257,11 +271,11 @@
|
||||||
<div style="flex: 0 1 50%;max-width: 50%;">Likes
|
<div style="flex: 0 1 50%;max-width: 50%;">Likes
|
||||||
<div style="display: flex;column-gap: 20px;row-gap:20px;flex-wrap: wrap;margin-top:20px;">
|
<div style="display: flex;column-gap: 20px;row-gap:20px;flex-wrap: wrap;margin-top:20px;">
|
||||||
{% for like in likes %}
|
{% for like in likes %}
|
||||||
<a href="{{ like.actor.url }}" title="{{ like.actor.handle }}" style="height:50px;">
|
<a href="{{ like.actor.url }}" title="{{ like.actor.handle }}" style="height:50px;" rel="noreferrer">
|
||||||
<img src="{{ like.actor.resized_icon_url }}" alt="{{ like.actor.handle}}" style="max-width:50px;">
|
<img src="{{ like.actor.resized_icon_url }}" alt="{{ like.actor.handle}}" style="max-width:50px;">
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<div style="width:50px;text-align:center;">And 2223 more.</div>
|
<div style="width:50px;text-align:center;">And {{ object.likes_count - 10 }} more.</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -270,7 +284,7 @@
|
||||||
<div style="flex: 0 1 50%;max-width: 50%;">Shares
|
<div style="flex: 0 1 50%;max-width: 50%;">Shares
|
||||||
<div style="display: flex;column-gap: 20px;row-gap:20px;flex-wrap: wrap;margin-top:20px;">
|
<div style="display: flex;column-gap: 20px;row-gap:20px;flex-wrap: wrap;margin-top:20px;">
|
||||||
{% for share in shares %}
|
{% for share in shares %}
|
||||||
<a href="{{ share.actor.url }}" title="{{ share.actor.handle }}" style="height:50px;">
|
<a href="{{ share.actor.url }}" title="{{ share.actor.handle }}" style="height:50px;" rel="noreferrer">
|
||||||
<img src="{{ share.actor.resized_icon_url }}" alt="{{ share.actor.handle}}" style="max-width:50px;">
|
<img src="{{ share.actor.resized_icon_url }}" alt="{{ share.actor.handle}}" style="max-width:50px;">
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -322,17 +336,21 @@
|
||||||
<ul>
|
<ul>
|
||||||
{% if not is_admin or object.is_from_outbox %}<li><div><a href="{{ object.url }}"{% if object.is_from_inbox %} rel="nofollow"{% endif %}>permalink</a></div></li>{% endif %}
|
{% if not is_admin or object.is_from_outbox %}<li><div><a href="{{ object.url }}"{% if object.is_from_inbox %} rel="nofollow"{% endif %}>permalink</a></div></li>{% endif %}
|
||||||
{% if object.is_from_outbox %}
|
{% if object.is_from_outbox %}
|
||||||
|
{% if object.likes_count %}
|
||||||
<li>
|
<li>
|
||||||
<div class="comment-count">{{ object.likes_count }} like{{ object.likes_count | pluralize }}</div>
|
<a href="{{ object.url }}"><strong>{{ object.likes_count }}</strong> like{{ object.likes_count | pluralize }}</a>
|
||||||
</li>
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
{% if object.announces_count %}
|
||||||
<li>
|
<li>
|
||||||
<div class="retweet-count">{{ object.announces_count }} share{{ object.announces_count | pluralize }}</div>
|
<a href="{{ object.url }}"><strong>{{ object.announces_count }}</strong> share{{ object.announces_count | pluralize }}</a
|
||||||
</li>
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
{% if object.replies_count %}
|
||||||
<li>
|
<li>
|
||||||
<div class="retweet-count">{{ object.replies_count }} repl{{ object.replies_count | pluralize("y", "ies") }}</div>
|
<a href="{{ object.url }}"><strong>{{ object.replies_count }}</strong> repl{{ object.replies_count | pluralize("y", "ies") }}</a>
|
||||||
</li>
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if is_admin %}
|
{% if is_admin %}
|
||||||
<li>
|
<li>
|
||||||
|
|
Loading…
Reference in a new issue