bookwyrm/fedireads/templates/feed.html
Mouse Reeve 3eb91980e0 Cleans up feed page
Fixes #53
2020-02-21 15:39:59 -08:00

53 lines
1.5 KiB
HTML

{% extends 'layout.html' %}
{% load fr_display %}
{% block content %}
<div id="sidebar">
<div>
{% if shelves %}
{% for shelf in shelves %}
<h2>{{ shelf.name }}</h2>
{% for book in shelf.books %}
<div class="book-preview">
{% include 'snippets/book.html' with book=book size="small" %}
{% include 'snippets/shelve-button.html' with book=book %}
</div>
{% endfor %}
{% if shelf.size > shelf.books.count %}
<a href="/shelf/{{ shelf.identifier }}">See all {{ shelf.size }}</a>
{% endif %}
{% endfor %}
{% else %}
<h2>Reading Activity</h2>
<p>Start a book!</p>
{% endif %}
</div>
<div>
<h2>Recently Added Books</h2>
{% for book in recent_books %}
<div class="book-preview">
{% include 'snippets/book.html' with book=book size="small" %}
{% if not book in user_books.all %}
{% include 'snippets/shelve-button.html' with book=book %}
{% endif %}
</div>
{% endfor %}
</div>
</div>
<div id="feed">
<div id="feed-tabs">
{% for tab in feed_tabs %}
<div class="{% if tab == active_tab %}active{% endif %}">
<a href="/{{ tab }}">{{ tab }}</a>
</div>
{% endfor %}
</div>
{% for activity in activities %}
{% include 'snippets/status.html' with activity=activity %}
{% endfor %}
</div>
{% endblock %}