properly access book data

This commit is contained in:
Sebastian Hugentobler 2024-05-10 14:31:11 +02:00
parent 870f457f1b
commit dc7f07476f
Signed by: shu
GPG Key ID: BB32CF3CA052C2F0
3 changed files with 11 additions and 6 deletions

View File

@ -39,3 +39,8 @@ nav ul li {
text-align: center;
height: 6rem;
}
footer small {
display: flex;
justify-content: space-between;
}

View File

@ -28,9 +28,9 @@
<footer class="container">
<hr />
<small>
From <a href="https://code.vanwa.ch/shu/rusty-library">https://code.vanwa.ch</a>
under <a href="https://www.gnu.org/licenses/agpl-3.0.txt">AGPL-3</a>
- <a href="/opds">opds feed</a>
<div>From <a href="https://code.vanwa.ch/shu/rusty-library">https://code.vanwa.ch</a>
under <a href="https://www.gnu.org/licenses/agpl-3.0.txt">AGPL-3</a></div>
<div><a href="/opds">opds feed</a></div>
</small>
</footer>
</body>

View File

@ -1,7 +1,7 @@
<article class="book-card">
<header class="grid-item">
<hgroup>
<h5>{{ book.title }}</h5>
<h5>{{ book.data.title }}</h5>
<p>
<a class="secondary" href="/authors/{{ book.author.id }}">{{ book.author.name }}</a>
</p>
@ -14,7 +14,7 @@
{% endif %}
</hgroup>
</header>
<img class="cover" src="/cover/{{ book.id }}" alt="book cover">
<img class="cover" src="/cover/{{ book.data.id }}" alt="book cover">
<footer>
<form>
<fieldset role="group">
@ -24,7 +24,7 @@
</summary>
<ul>
{% for format, _ in book.formats %}
<li><a href="/book/{{ book.id }}/{{ format }}">{{ format }}</a></li>
<li><a href="/book/{{ book.data.id }}/{{ format }}">{{ format }}</a></li>
{% endfor %}
</ul>
</details>