Added table for tracking progress of a book.
This commit is contained in:
@@ -3,10 +3,13 @@
|
||||
{% block title %}Book{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
||||
<div class="progress" style="height: 2px;">
|
||||
<div class="progress-bar" role="progressbar" style="width: {{ (book.getProgress().first().pages / book.pages*100) | round }}%"></div>
|
||||
<div class="progress-bar bg-secondary bg-opacity-10" role="progressbar" style="width: {{ 100-(book.getProgress().first().pages / book.pages*100) | round }}%"></div>
|
||||
</div>
|
||||
<div class="d-flex">
|
||||
|
||||
<div>
|
||||
|
||||
{% if file_exists(asset('book_covers/cover_' ~ book.id ~ '.jpg')) %}
|
||||
<img class="img-thumbnail"
|
||||
style="max-width: 80px"
|
||||
@@ -38,9 +41,7 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Isbn</th>
|
||||
<td>{{ book.isbn }}</td>
|
||||
<th>Pages</th>
|
||||
<td>{{ book.pages }}</td>
|
||||
<td colspan="3">{{ book.isbn }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Tags</th>
|
||||
@@ -54,6 +55,13 @@
|
||||
<th>Language</th>
|
||||
<td colspan="3">{{ book.language }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Progress</th>
|
||||
<td>{{ book.getProgress().first().pages }}</td>
|
||||
<th>Pages</th>
|
||||
<td>{{ book.pages }}</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user