mirror of
https://github.com/th3r00t/pyShelf.git
synced 2026-04-28 01:59:35 -04:00
Updated to show collections in navigation.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
{% block javascript %}
|
||||
<script type="text/javascript" src=static/script/pako.min.js>
|
||||
<script type="text/javascript">
|
||||
var books = {{ books|books_tojson }};
|
||||
const books = {{ books|books_tojson }};
|
||||
let inflatedJSON = {};
|
||||
const pako = require('pako');
|
||||
inflatedJSON = JSON.parse(pako.inflate(books, { to: 'string'}));
|
||||
@@ -10,26 +10,31 @@
|
||||
{% endblock %}
|
||||
{% include 'header.html' %}
|
||||
{% include 'navigation.html' %}
|
||||
<section id="master">
|
||||
<div class="container is-dark">
|
||||
{% for book in books %}
|
||||
{% set cover = book[0].cover|b64decode %}
|
||||
{% if cover != 'None' %}
|
||||
<div class="box is-dark book" id="{{book[0].id}}">
|
||||
<div class="image book-thumbnail">
|
||||
<figure class="image is-4by3">
|
||||
<img src="data:;base64,{{ book[0].cover|b64decode }}" alt="{{ book[0].title }}">
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="box is-dark book" id="{{book[0].id}}">
|
||||
<h3 class="title is-3">{{ book[0].title }}</h3>
|
||||
<h4 class="subtitle is-4">{{ book[0].author }}</h4>
|
||||
<p class="content">{{ book[0].description|summarize }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
<section id="master-container">
|
||||
<div id="book-shelf" class="container is-dark">
|
||||
{% for book in books %}
|
||||
{% set cover = book[0].cover|b64decode %}
|
||||
{% if cover != 'None' %}
|
||||
<div class="is-dark book" id="{{book[0].id}}">
|
||||
<div class="image book-thumbnail">
|
||||
<figure class="image is-4by3">
|
||||
<img src="data:;base64,{{ book[0].cover|b64decode }}" alt="{{ book[0].title }}">
|
||||
</figure>
|
||||
</div>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="is-dark book" id="{{book[0].id}}">
|
||||
<div class="image book-thumbnail">
|
||||
<figure class="image is-4by3">
|
||||
<img src="static/images/no-cover.jpg" alt="{{ book[0].title }}">
|
||||
</figure>
|
||||
</div>
|
||||
<h3 class="title is-3">{{ book[0].title }}</h3>
|
||||
<h4 class="subtitle is-4">{{ book[0].author }}</h4>
|
||||
<p class="content">{{ book[0].description|summarize }}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
{% include 'footer.html' %}
|
||||
|
||||
Reference in New Issue
Block a user