Merge pull request #2479 from bookwyrm-social/author-padding

Visually separate authors when creating book
This commit is contained in:
Mouse Reeve 2022-12-06 13:13:28 -08:00 committed by GitHub
commit 309d5a535a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 6 deletions

View file

@ -25,7 +25,7 @@
<div class="block" itemscope itemtype="https://schema.org/Book"> <div class="block" itemscope itemtype="https://schema.org/Book">
<div class="columns is-mobile"> <div class="columns is-mobile">
<div class="column"> <div class="column">
<h1 class="title" itemprop="name"> <h1 class="title" itemprop="name" dir="auto">
{{ book.title }} {{ book.title }}
</h1> </h1>
@ -37,7 +37,7 @@
content="{{ book.subtitle | escape }}" content="{{ book.subtitle | escape }}"
> >
<span class="has-text-weight-bold"> <span class="has-text-weight-bold" dir="auto">
{{ book.subtitle }} {{ book.subtitle }}
</span> </span>
{% endif %} {% endif %}
@ -52,7 +52,7 @@
{% endif %} {% endif %}
{% if book.authors.exists %} {% if book.authors.exists %}
<div class="subtitle"> <div class="subtitle" dir="auto">
{% trans "by" %} {% include 'snippets/authors.html' with book=book %} {% trans "by" %} {% include 'snippets/authors.html' with book=book %}
</div> </div>
{% endif %} {% endif %}

View file

@ -65,17 +65,17 @@
<input type="hidden" name="author-match-count" value="{{ author_matches|length }}"> <input type="hidden" name="author-match-count" value="{{ author_matches|length }}">
<div class="column is-half"> <div class="column is-half">
{% for author in author_matches %} {% for author in author_matches %}
<fieldset> <fieldset class="block">
<legend class="title is-5 mb-1"> <legend class="title is-5 mb-1">
{% blocktrans with name=author.name %}Is "{{ name }}" one of these authors?{% endblocktrans %} {% blocktrans with name=author.name %}Is "{{ name }}" one of these authors?{% endblocktrans %}
</legend> </legend>
{% with forloop.counter0 as counter %} {% with forloop.counter0 as counter %}
{% for match in author.matches %} {% for match in author.matches %}
<label class="label"> <label class="label mb-0">
<input type="radio" name="author_match-{{ counter }}" value="{{ match.id }}" required> <input type="radio" name="author_match-{{ counter }}" value="{{ match.id }}" required>
{{ match.name }} {{ match.name }}
</label> </label>
<p class="help ml-5 mb-2"> <p class="help ml-5 mb-0 mt-0">
{% with book_title=match.book_set.first.title alt_title=match.bio %} {% with book_title=match.book_set.first.title alt_title=match.bio %}
{% if book_title %} {% if book_title %}
<a href="{{ match.local_path }}" target="_blank" rel="nofollow noopener noreferrer">{% blocktrans trimmed %} <a href="{{ match.local_path }}" target="_blank" rel="nofollow noopener noreferrer">{% blocktrans trimmed %}
@ -98,6 +98,9 @@
</label> </label>
{% endwith %} {% endwith %}
</fieldset> </fieldset>
{% if not forloop.last %}
<hr aria-hidden="true">
{% endif %}
{% endfor %} {% endfor %}
</div> </div>
{% else %} {% else %}