moviewyrm/bookwyrm/templates/get_started/books.html

58 lines
2.3 KiB
HTML
Raw Normal View History

2021-03-31 20:59:33 +00:00
{% extends 'get_started/layout.html' %}
2021-03-31 20:56:26 +00:00
{% load i18n %}
2021-03-31 20:59:33 +00:00
{% block panel %}
<div class="block">
<h2 class="title is-4">{% trans "What are you reading?" %}</h2>
<form class="field has-addons" method="get" action="{% url 'get-started-books' %}">
2021-03-31 20:59:33 +00:00
<div class="control">
2021-04-01 15:02:42 +00:00
<input type="text" name="query" value="{{ request.GET.query }}" class="input" placeholder="{% trans 'Search for a book' %}" aria-label="{% trans 'Search for a book' %}">
2021-03-31 20:59:33 +00:00
{% if request.GET.query and not book_results %}
<p class="help">{% blocktrans with query=request.GET.query %}No books found for "{{ query }}"{% endblocktrans %}. {% blocktrans %}You can add books when you start using {{ site_name }}.{% endblocktrans %}</p>
2021-03-31 20:59:33 +00:00
{% endif %}
</div>
<div class="control">
<button class="button" type="submit">
<span class="icon icon-search" title="{% trans 'Search' %}">
<span class="is-sr-only">{% trans "Search" %}</span>
</span>
</button>
</div>
</form>
</div>
2021-03-31 20:56:26 +00:00
2021-04-01 15:02:42 +00:00
<form class="block" name="add-books" method="post" action="{% url 'get-started-books' %}">
{% csrf_token %}
2021-03-31 20:59:33 +00:00
<h3 class="title is-5">{% trans "Suggested Books" %}</h3>
2021-04-01 20:02:41 +00:00
<fieldset name="books" class="columns scroll-x is-mobile">
2021-03-31 20:59:33 +00:00
{% if book_results %}
<div class="column is-narrow content">
<p class="help mb-0">Search results</p>
2021-04-01 20:02:41 +00:00
<div class="columns is-mobile">
2021-03-31 20:59:33 +00:00
{% for book in book_results %}
2021-04-01 15:02:42 +00:00
{% include 'get_started/book_preview.html' %}
2021-03-31 20:59:33 +00:00
{% endfor %}
</div>
</div>
{% endif %}
{% if popular_books %}
2021-03-31 20:59:33 +00:00
<div class="column is-narrow content">
<p class="help mb-0">
{% blocktrans %}Popular on {{ site_name }}{% endblocktrans %}
</p>
2021-04-01 20:02:41 +00:00
<div class="columns is-mobile">
2021-03-31 20:59:33 +00:00
{% for book in popular_books %}
2021-04-01 15:02:42 +00:00
{% include 'get_started/book_preview.html' %}
2021-03-31 20:59:33 +00:00
{% endfor %}
</div>
</div>
{% endif %}
{% if not book_results and not popular_books %}
<p><em>{% trans "No books found" %}</em></p>
{% endif %}
</fieldset>
2021-04-01 15:20:43 +00:00
<button type="submit" class="button is-primary">{% trans "Save &amp; continue" %}</button>
2021-03-31 20:59:33 +00:00
</form>
2021-03-31 20:56:26 +00:00
{% endblock %}