forked from mirrors/bookwyrm
SHow privacy icon on shelves
This commit is contained in:
parent
81d09a3d1b
commit
176257eb85
3 changed files with 25 additions and 18 deletions
|
@ -68,7 +68,12 @@
|
||||||
|
|
||||||
<div class="block columns">
|
<div class="block columns">
|
||||||
<div class="column">
|
<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>
|
</div>
|
||||||
{% if is_self %}
|
{% if is_self %}
|
||||||
<div class="column is-narrow">
|
<div class="column is-narrow">
|
||||||
|
|
18
bookwyrm/templates/snippets/privacy-icons.html
Normal file
18
bookwyrm/templates/snippets/privacy-icons.html
Normal 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 %}
|
||||||
|
|
|
@ -60,23 +60,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-footer-item">
|
<div class="card-footer-item">
|
||||||
{% if status.privacy == 'public' %}
|
{% include 'snippets/privacy-icons.html' with item=status %}
|
||||||
<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 %}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-footer-item">
|
<div class="card-footer-item">
|
||||||
|
|
Loading…
Reference in a new issue