forked from mirrors/bookwyrm
121 lines
4.4 KiB
HTML
121 lines
4.4 KiB
HTML
|
{% load fr_display %}
|
||
|
{% load humanize %}
|
||
|
|
||
|
{% if not status.deleted %}
|
||
|
<div class="card">
|
||
|
<header class="card-header">
|
||
|
<div class="card-header-title">
|
||
|
<div class="columns">
|
||
|
<div class="column is-narrow">
|
||
|
{% include 'snippets/status_header.html' with status=status %}
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</header>
|
||
|
|
||
|
<div class="card-content">
|
||
|
{% include 'snippets/status_content.html' with status=status %}
|
||
|
</div>
|
||
|
|
||
|
<footer>
|
||
|
{% if request.user.is_authenticated %}
|
||
|
<input class="toggle-control" type="checkbox" name="show-comment-{{ status.id }}" id="show-comment-{{ status.id }}">
|
||
|
<div class="toggle-content hidden">
|
||
|
<div class="card-footer">
|
||
|
<div class="card-footer-item">
|
||
|
{% include 'snippets/reply_form.html' with status=status %}
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
<div class="card-footer">
|
||
|
<div class="card-footer-item">
|
||
|
{% if request.user.is_authenticated %}
|
||
|
|
||
|
<label class="button is-small" for="show-comment-{{ status.id }}">
|
||
|
<span class="icon icon-comment"><span class="is-sr-only">Comment</span></span>
|
||
|
</label>
|
||
|
{% include 'snippets/boost_button.html' with status=status %}
|
||
|
{% include 'snippets/fav_button.html' with status=status %}
|
||
|
|
||
|
{% else %}
|
||
|
<a href="/login">
|
||
|
<span class="icon icon-comment">
|
||
|
<span class="is-sr-only">Comment</span>
|
||
|
</span>
|
||
|
|
||
|
<span class="icon icon-boost">
|
||
|
<span class="is-sr-only">Boost status</span>
|
||
|
</span>
|
||
|
|
||
|
<span class="icon icon-heart">
|
||
|
<span class="is-sr-only">Like status</span>
|
||
|
</span>
|
||
|
</a>
|
||
|
{% endif %}
|
||
|
</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 %}
|
||
|
</div>
|
||
|
|
||
|
<div class="card-footer-item">
|
||
|
<a href="{{ status.remote_id }}">{{ status.published_date | post_date }}</a>
|
||
|
</div>
|
||
|
{% if status.user == request.user %}
|
||
|
<div class="card-footer-item">
|
||
|
<label class="button" for="more-info-{{ status.id }}">
|
||
|
<div class="icon icon-dots-three">
|
||
|
<span class="is-sr-only">More options</span>
|
||
|
</div>
|
||
|
</label>
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
</div>
|
||
|
|
||
|
<div>
|
||
|
<input class="toggle-control" type="checkbox" name="more-info-{{ status.id }}" id="more-info-{{ status.id }}">
|
||
|
<div class="toggle-content hidden card-footer">
|
||
|
{% if status.user == request.user %}
|
||
|
<div class="card-footer-item">
|
||
|
<form name="delete-{{status.id}}" action="/delete-status" method="post">
|
||
|
{% csrf_token %}
|
||
|
<input type="hidden" name="status" value="{{ status.id }}">
|
||
|
<button class="button is-danger" type="submit">
|
||
|
Delete post
|
||
|
</button>
|
||
|
</form>
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
</div>
|
||
|
</div>
|
||
|
</footer>
|
||
|
</div>
|
||
|
{% else %}
|
||
|
<div class="card">
|
||
|
<header class="card-header">
|
||
|
<p>
|
||
|
{% include 'snippets/avatar.html' with user=status.user %}
|
||
|
{% include 'snippets/username.html' with user=status.user %}
|
||
|
deleted this status
|
||
|
</p>
|
||
|
</header>
|
||
|
</div>
|
||
|
{% endif %}
|