little-hesinde/rusty-library/templates/book_card.html

35 lines
977 B
HTML

<article class="book-card">
<header class="grid-item">
<hgroup>
<h5>{{ book.data.title }}</h5>
<p>
<a class="secondary" href="/authors/{{ book.author.id }}">{{ book.author.name }}</a>
</p>
{% if book.series %}
<p>
<small>
<a class="secondary" href="/series/{{ book.series.0.id }}">{{ book.series.0.name }} ({{ book.series.1 }})</a>
</small>
</p>
{% endif %}
</hgroup>
</header>
<img class="cover" src="/cover/{{ book.data.id }}" alt="book cover">
<footer>
<form>
<fieldset role="group">
<details class="dropdown">
<summary role="button" class="outline">
Download
</summary>
<ul>
{% for format, _ in book.formats %}
<li><a href="/book/{{ book.data.id }}/{{ format }}">{{ format }}</a></li>
{% endfor %}
</ul>
</details>
</fieldset>
</form>
</footer>
</article>