Merge pull request #639 from mouse-reeve/status-markup

Status markup
This commit is contained in:
Mouse Reeve 2021-02-23 14:19:19 -08:00 committed by GitHub
commit 1db711b397
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 14 additions and 13 deletions

View file

@ -226,7 +226,7 @@
<div class="block" id="reviews">
{% for review in reviews %}
<div class="block">
{% include 'snippets/status.html' with status=review hide_book=True depth=1 %}
{% include 'snippets/status/status.html' with status=review hide_book=True depth=1 %}
</div>
{% endfor %}

View file

@ -16,7 +16,7 @@
{% endif %}
{% for activity in activities %}
<div class="block">
{% include 'snippets/status.html' with status=activity %}
{% include 'snippets/status/status.html' with status=activity %}
</div>
{% endfor %}

View file

@ -32,7 +32,7 @@
{% endif %}
{% for activity in activities %}
<div class="block">
{% include 'snippets/status.html' with status=activity %}
{% include 'snippets/status/status.html' with status=activity %}
</div>
{% endfor %}

View file

@ -8,7 +8,7 @@
{% endwith %}
{% endif %}
{% include 'snippets/status.html' with status=status main=is_root %}
{% include 'snippets/status/status.html' with status=status main=is_root %}
{% if depth <= max_depth and direction >= 0 %}
{% for reply in status|replies %}

View file

@ -1,7 +1,7 @@
<p class="stars">
<span class="is-sr-only">{% if rating %}{{ rating|floatformat }} star{{ rating|floatformat | pluralize }}{% else %}No rating{% endif %}</span>
{% for i in '12345'|make_list %}
<span class="icon icon-star-{% if rating >= forloop.counter %}full{% elif rating|floatformat:0 >= forloop.counter|floatformat:0 %}half{% else %}empty{% endif %}" aria-hidden="true">
<span class="icon is-small mr-1 icon-star-{% if rating >= forloop.counter %}full{% elif rating|floatformat:0 >= forloop.counter|floatformat:0 %}half{% else %}empty{% endif %}" aria-hidden="true">
</span>
{% endfor %}
</p>

View file

@ -3,6 +3,7 @@
<div class="column is-narrow">
<div>
<a href="{{ book.local_path }}">{% include 'snippets/book_cover.html' with book=book %}</a>
{% include 'snippets/stars.html' with rating=book|rating:request.user %}
{% include 'snippets/shelve_button/shelve_button.html' with book=book %}
</div>
</div>

View file

@ -4,8 +4,8 @@
{% include 'snippets/avatar.html' with user=status.user %}
{% include 'snippets/username.html' with user=status.user %}
boosted
{% include 'snippets/status_body.html' with status=status|boosted_status %}
{% include 'snippets/status/status_body.html' with status=status|boosted_status %}
{% else %}
{% include 'snippets/status_body.html' with status=status %}
{% include 'snippets/status/status_body.html' with status=status %}
{% endif %}
{% endif %}

View file

@ -5,13 +5,13 @@
{% block card-header %}
<h3 class="card-header-title has-background-white-ter is-block">
{% include 'snippets/status_header.html' with status=status %}
{% include 'snippets/status/status_header.html' with status=status %}
</h3>
{% endblock %}
{% block card-content %}
{% include 'snippets/status_content.html' with status=status %}
{% include 'snippets/status/status_content.html' with status=status %}
{% endblock %}
@ -55,7 +55,7 @@
<a href="{{ status.remote_id }}">{{ status.published_date | post_date }}</a>
</div>
<div class="card-footer-item">
{% include 'snippets/status_options.html' with class="is-small" right=True %}
{% include 'snippets/status/status_options.html' with class="is-small" right=True %}
</div>
{% endblock %}

View file

@ -54,9 +54,9 @@
{% if status.book or status.mention_books.count %}
<div class="{% if status.status_type != 'GeneratedNote' %}box has-background-white-bis{% endif %}">
{% if status.book %}
{% include 'snippets/book_preview.html' with book=status.book %}
{% include 'snippets/status/book_preview.html' with book=status.book %}
{% elif status.mention_books.count %}
{% include 'snippets/book_preview.html' with book=status.mention_books.first %}
{% include 'snippets/status/book_preview.html' with book=status.mention_books.first %}
{% endif %}
</div>
{% endif %}

View file

@ -64,7 +64,7 @@
</div>
{% for activity in activities %}
<div class="block" id="feed">
{% include 'snippets/status.html' with status=activity %}
{% include 'snippets/status/status.html' with status=activity %}
</div>
{% endfor %}
{% if not activities %}