mirror of
https://github.com/asimonson1125/asimonson1125.github.io.git
synced 2026-02-25 13:09:51 -06:00
First iteration bookshelf
This commit is contained in:
22
src/templates/books.html
Normal file
22
src/templates/books.html
Normal file
@@ -0,0 +1,22 @@
|
||||
{% block content %}
|
||||
<div class="foreground">
|
||||
<h2>These are my books lol</h2>
|
||||
<h3>
|
||||
This page is under construction but I felt like at least publishing a list
|
||||
of books even if they didn't have reviews on them yet
|
||||
</h3>
|
||||
{% for i in var.books.books %}
|
||||
<div id="'{{i}}'" class="bookReview">
|
||||
<h4>{{i}}</h4>
|
||||
<div>
|
||||
<img
|
||||
class="bookcover"
|
||||
alt="{{i}} cover"
|
||||
src="{{ url_for('static', filename=('photos/books/' + var.books.books[i].filename))}}"
|
||||
/>
|
||||
<p>{{ var.books.books[i].review }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -13,10 +13,13 @@
|
||||
class="langstats"
|
||||
alt="Language stats"
|
||||
/>
|
||||
<br />
|
||||
<div class="chess">
|
||||
{% from 'partials/chess.html' import chess %} {{ chess('asimonson1125')
|
||||
}}
|
||||
</div>
|
||||
<br />
|
||||
{% from 'partials/bookshelf.html' import bookshelf %} {{ bookshelf(var.books) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
17
src/templates/partials/bookshelf.html
Normal file
17
src/templates/partials/bookshelf.html
Normal file
@@ -0,0 +1,17 @@
|
||||
{% macro bookshelf(books) %}
|
||||
<a href="/books">
|
||||
<div class="bookshelf">
|
||||
{% for i in books.selection %} {% set book = books.books[i] %}
|
||||
<a href="/books#'{{i}}'">
|
||||
<div class="book">
|
||||
<img
|
||||
alt="{{ i }} cover"
|
||||
src="{{ url_for('static', filename=('photos/books/' + book.filename))}}"
|
||||
/>
|
||||
<h4>{{ i }}</h4>
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</a>
|
||||
{% endmacro %}
|
||||
Reference in New Issue
Block a user