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; text-align: center;
height: 6rem; height: 6rem;
} }
footer small {
display: flex;
justify-content: space-between;
}

View File

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

View File

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