2020-01-25 18:25:19 -05:00
|
|
|
{% extends 'layout.html' %}
|
2020-12-12 21:25:04 -05:00
|
|
|
{% load bookwyrm_tags %}
|
2020-01-25 18:25:19 -05:00
|
|
|
{% block content %}
|
2020-02-21 18:39:25 -05:00
|
|
|
|
2020-09-29 20:43:30 -04:00
|
|
|
<div class="columns">
|
2021-01-29 13:25:31 -05:00
|
|
|
{% if user.is_authenticated %}
|
2020-09-30 18:00:46 -04:00
|
|
|
<div class="column is-one-third">
|
2020-11-06 23:36:52 -05:00
|
|
|
<h2 class="title is-5">Your books</h2>
|
2020-10-02 18:06:42 -04:00
|
|
|
{% if not suggested_books %}
|
|
|
|
<p>There are no books here right now! Try searching for a book to get started</p>
|
|
|
|
{% else %}
|
2020-11-06 23:36:52 -05:00
|
|
|
<div class="tabs is-small">
|
2021-01-17 23:19:09 -05:00
|
|
|
<ul role="tablist">
|
2020-11-06 23:36:52 -05:00
|
|
|
{% for shelf in suggested_books %}
|
2020-11-06 23:51:11 -05:00
|
|
|
{% if shelf.books %}
|
2020-11-06 23:36:52 -05:00
|
|
|
{% with shelf_counter=forloop.counter %}
|
|
|
|
<li>
|
2020-11-07 14:54:32 -05:00
|
|
|
<p>
|
|
|
|
{{ shelf.name }}
|
|
|
|
</p>
|
2021-01-17 23:19:09 -05:00
|
|
|
<div class="tabs is-small is-toggle">
|
2020-11-06 23:36:52 -05:00
|
|
|
<ul>
|
|
|
|
{% for book in shelf.books %}
|
2021-01-17 23:19:09 -05:00
|
|
|
<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>
|
2020-11-06 23:36:52 -05:00
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
2020-09-29 20:43:30 -04:00
|
|
|
</li>
|
2020-11-06 23:36:52 -05:00
|
|
|
{% endwith %}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2020-09-29 20:43:30 -04:00
|
|
|
</ul>
|
|
|
|
</div>
|
2020-11-06 23:36:52 -05:00
|
|
|
{% for shelf in suggested_books %}
|
|
|
|
{% with shelf_counter=forloop.counter %}
|
|
|
|
{% for book in shelf.books %}
|
2021-01-17 23:19:09 -05:00
|
|
|
<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">
|
2021-01-17 23:39:18 -05:00
|
|
|
{% include 'snippets/toggle/toggle_button.html' with label="close" controls_text="book" controls_uid=book.id class="delete" nonbutton=True pressed=True %}
|
2020-09-30 15:19:23 -04:00
|
|
|
</div>
|
2020-09-29 20:43:30 -04:00
|
|
|
</div>
|
2021-01-17 23:19:09 -05:00
|
|
|
<div class="card-content">
|
2021-01-20 02:04:08 -05:00
|
|
|
{% include 'snippets/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 %}
|
2021-01-17 23:19:09 -05:00
|
|
|
{% include 'snippets/create_status.html' with book=book %}
|
2020-09-29 20:43:30 -04:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
2020-11-06 23:36:52 -05:00
|
|
|
{% endwith %}
|
|
|
|
{% endfor %}
|
2020-10-02 18:06:42 -04:00
|
|
|
{% endif %}
|
2021-01-16 11:19:54 -05:00
|
|
|
|
|
|
|
{% if goal %}
|
|
|
|
<section class="section">
|
|
|
|
<div class="block">
|
2021-01-16 14:34:19 -05:00
|
|
|
<h3 class="title is-4">{{ goal.year }} Reading Goal</h3>
|
|
|
|
{% include 'snippets/goal_progress.html' with goal=goal %}
|
2021-01-16 11:19:54 -05:00
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
{% endif %}
|
2020-09-29 13:21:10 -04:00
|
|
|
</div>
|
2021-01-29 13:25:31 -05:00
|
|
|
{% endif %}
|
2020-01-25 18:25:19 -05:00
|
|
|
|
2020-09-29 20:51:57 -04:00
|
|
|
<div class="column is-two-thirds" id="feed">
|
2021-01-29 13:25:31 -05:00
|
|
|
{% block panel %}{% endblock %}
|
2020-02-23 17:26:03 -05:00
|
|
|
|
2021-01-29 13:25:31 -05:00
|
|
|
{% if activities %}
|
2021-01-29 14:14:18 -05:00
|
|
|
{% include 'snippets/pagination.html' with page=activities path=path anchor="#feed" %}
|
2021-01-29 13:25:31 -05:00
|
|
|
{% endif %}
|
2020-09-29 20:43:30 -04:00
|
|
|
</div>
|
2020-09-29 13:21:10 -04:00
|
|
|
</div>
|
2020-01-25 18:25:19 -05:00
|
|
|
{% endblock %}
|
2021-01-29 13:25:31 -05:00
|
|
|
|