Merge branch 'main' into progress_update

This commit is contained in:
Joel Bradshaw
2020-11-27 15:52:55 -08:00
47 changed files with 745 additions and 519 deletions

View File

@ -1,4 +1,4 @@
<h2 class="title">About {{ site_settings.name }}</h2>
<h1 class="title">About {{ site_settings.name }}</h1>
<div class="block">
<img src="/static/images/logo.png" alt="BookWyrm">
</div>

View File

@ -12,7 +12,7 @@
<ul class="dropdown-content">
{% for shelf in request.user.shelf_set.all %}
{% if shelf.identifier != current.identifier %}
<li>
<li role="menuitem">
<form class="dropdown-item pt-0 pb-0" name="shelve" action="/shelve/" method="post">
{% csrf_token %}
<input type="hidden" name="book" value="{{ book.id }}">

View File

@ -1,9 +1,9 @@
{% load fr_display %}
{% if request.user.is_authenticated %}
{% with book.id|uuid as uuid %}
{% active_shelf book as active_shelf %}
<div class="field is-grouped">
{% with book.id|uuid as uuid %}
{% if active_shelf.identifier == 'read' %}
<button class="button is-small" disabled>
<span>Read</span> <span class="icon icon-check"></span>
@ -26,20 +26,20 @@
<button class="button is-small" type="submit">Want to read</button>
</form>
{% endif %}
{% endwith %}
<div class="dropdown is-hoverable">
<div class="dropdown">
<div class="dropdown-trigger">
<button class="button is-small" aria-haspopup="true" aria-controls="dropdown-menu-{{ uuid }}">
<span class="icon icon-arrow-down"><span class="is-sr-only">More shelves</span></span>
</button>
<label for="shelf-select-dropdown-{{ uuid }}-toggle" role="button" aria-expanded="false" onclick="toggleMenu(this)" tabindex="0" aria-haspopup="true" aria-controls="shelf-select-{{ uuid }}">
<div class="button is-small">
<span class="icon icon-arrow-down"><span class="is-sr-only">More shelves</span></span>
</div>
</label>
</div>
{% with book.id|uuid as uuid %}
<div class="dropdown-menu" id="dropdown-menu-{{ uuid }}" role="menu">
<input type="checkbox" class="toggle-control" id="shelf-select-dropdown-{{ uuid }}-toggle">
<div class="dropdown-menu toggle-content hidden" id="shelf-select-{{ uuid }}" role="menu">
<ul class="dropdown-content">
{% for shelf in request.user.shelf_set.all %}
<li>
<li role="menuitem">
{% if shelf.identifier == 'to-read' %}
<div class="dropdown-item pt-0 pb-0">
<label class="button is-small" for="start-reading-{{ uuid }}" role="button" tabindex="0">
@ -61,8 +61,7 @@
{% endfor %}
</ul>
</div>
{% endwith %}
</div>
</div>
{% endwith %}
{% endif %}

View File

@ -18,6 +18,21 @@
{% if status.content and status.status_type != 'GeneratedNote' and status.status_type != 'Boost' %}
{% include 'snippets/trimmed_text.html' with full=status.content|safe %}
{% endif %}
{% if status.attachments %}
<div class="block">
<div class="columns">
{% for attachment in status.attachments.all %}
<div class="column is-narrow">
<figure class="image is-128x128">
<a href="/images/{{ attachment.image }}" target="_blank" aria-label="open image in new window">
<img src="/images/{{ attachment.image }}" alt="{{ attachment.caption }}">
</a>
</figure>
</div>
{% endfor %}
</div>
</div>
{% endif %}
</div>
{% if not hide_book %}