forked from mirrors/bookwyrm
84 lines
3.5 KiB
HTML
84 lines
3.5 KiB
HTML
{% extends 'layout.html' %}
|
|
{% load bookwyrm_tags %}
|
|
{% block content %}
|
|
|
|
<div class="columns">
|
|
{% if user.is_authenticated %}
|
|
<div class="column is-one-third">
|
|
<h2 class="title is-5">Your books</h2>
|
|
{% if not suggested_books %}
|
|
<p>There are no books here right now! Try searching for a book to get started</p>
|
|
{% else %}
|
|
<div class="tabs is-small">
|
|
<ul role="tablist">
|
|
{% for shelf in suggested_books %}
|
|
{% if shelf.books %}
|
|
{% with shelf_counter=forloop.counter %}
|
|
<li>
|
|
<p>
|
|
{{ shelf.name }}
|
|
</p>
|
|
<div class="tabs is-small is-toggle">
|
|
<ul>
|
|
{% for book in shelf.books %}
|
|
<li class="tab-change{% if shelf_counter == 1 and forloop.first %} is-active{% endif %}" data-tab="book-{{ book.id }}" data-tab="book-{{ book.id }}" role="tab" tabindex="0" aria-selected="{% if shelf_counter == 1 and forloop.first %}true{% else %}false{% endif %}" aria-controls="book-{{ book.id }}" data-category="suggested-tabs">
|
|
<a>
|
|
{% include 'snippets/book_cover.html' with book=book size="medium" %}
|
|
</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
</li>
|
|
{% endwith %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
{% for shelf in suggested_books %}
|
|
{% with shelf_counter=forloop.counter %}
|
|
{% for book in shelf.books %}
|
|
<div class="suggested-tabs card{% if shelf_counter != 1 or not forloop.first %} hidden{% endif %}" role="tabpanel" id="book-{{ book.id }}">
|
|
<div class="card-header">
|
|
<p class="card-header-title">
|
|
<span>{% include 'snippets/book_titleby.html' with book=book %}</span>
|
|
</p>
|
|
<div class="card-header-icon is-hidden-tablet">
|
|
{% include 'snippets/toggle/toggle_button.html' with label="close" controls_text="book" controls_uid=book.id class="delete" nonbutton=True pressed=True %}
|
|
</div>
|
|
</div>
|
|
<div class="card-content">
|
|
{% include 'snippets/shelve_button/shelve_button.html' with book=book %}
|
|
{% active_shelf book as active_shelf %}
|
|
{% if active_shelf.shelf.identifier == 'reading' and book.latest_readthrough %}
|
|
{% include 'snippets/progress_update.html' with readthrough=book.latest_readthrough %}
|
|
{% endif %}
|
|
{% include 'snippets/create_status.html' with book=book %}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
{% endwith %}
|
|
{% endfor %}
|
|
{% endif %}
|
|
|
|
{% if goal %}
|
|
<section class="section">
|
|
<div class="block">
|
|
<h3 class="title is-4">{{ goal.year }} Reading Goal</h3>
|
|
{% include 'snippets/goal_progress.html' with goal=goal %}
|
|
</div>
|
|
</section>
|
|
{% endif %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="column is-two-thirds" id="feed">
|
|
{% block panel %}{% endblock %}
|
|
|
|
{% if activities %}
|
|
{% include 'snippets/pagination.html' with page=activities path=path anchor="#feed" %}
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
|