SHow privacy icon on shelves

This commit is contained in:
Mouse Reeve 2020-11-10 16:18:48 -08:00
parent 81d09a3d1b
commit 176257eb85
3 changed files with 25 additions and 18 deletions

View file

@ -68,7 +68,12 @@
<div class="block columns">
<div class="column">
<h2 class="title is-3">{{ shelf.name }}</h2>
<h2 class="title is-3">
{{ shelf.name }}
<span class="subtitle">
{% include 'snippets/privacy-icons.html' with item=shelf %}
</span>
</h2>
</div>
{% if is_self %}
<div class="column is-narrow">

View file

@ -0,0 +1,18 @@
{% if item.privacy == 'public' %}
<span class="icon icon-globe">
<span class="is-sr-only">Public post</span>
</span>
{% elif item.privacy == 'unlisted' %}
<span class="icon icon-unlock">
<span class="is-sr-only">Unlisted post</span>
</span>
{% elif item.privacy == 'followers' %}
<span class="icon icon-lock">
<span class="is-sr-only">Followers-only post</span>
</span>
{% else %}
<span class="icon icon-envelope">
<span class="is-sr-only">Private post</span>
</span>
{% endif %}

View file

@ -60,23 +60,7 @@
</div>
<div class="card-footer-item">
{% if status.privacy == 'public' %}
<span class="icon icon-globe">
<span class="is-sr-only">Public post</span>
</span>
{% elif status.privacy == 'unlisted' %}
<span class="icon icon-unlock">
<span class="is-sr-only">Unlisted post</span>
</span>
{% elif status.privacy == 'followers' %}
<span class="icon icon-lock">
<span class="is-sr-only">Followers-only post</span>
</span>
{% else %}
<span class="icon icon-envelope">
<span class="is-sr-only">Private post</span>
</span>
{% endif %}
{% include 'snippets/privacy-icons.html' with item=status %}
</div>
<div class="card-footer-item">