bookwyrm/fedireads/templates/feed.html
2020-01-27 23:20:32 -08:00

49 lines
1.9 KiB
HTML

{% extends 'layout.html' %}
{% block content %}
<div id="sidebar">
{% for shelf in shelves %}
<h1>{{ shelf.name }}</h1>
{% for book in shelf.books.all %}
<div class="book-preview">
<img class="cover" src="static/images/small.jpg">
<p class="title"><a href="{{ book.openlibrary_key }}">{{ book.data.title }}</a></p>
<p>by <a href="" class="author">{{ book.authors.first.data.name }}</a></p>
{% if shelf.type == 'reading' %}
<button>done reading</button>
{% endif %}
</div>
{% endfor %}
{% endfor %}
</div>
<div id="main">
<div class="carosel">
{% for book in recent_books %}
<div class="book-preview">
<img class="cover" src="static/images/small.jpg">
<p class="title">
<a href="{{ book.openlibrary_key }}">{{ book.data.title }}</a>
</p>
<p>by <a href="" class="author">{{ book.authors.first.data.name }}</a></p>
{% if not book.user_shelves %}
<form name="shelve" action="/shelve/{{ request.user.localname }}_to-read/{{ book.id }}" method="post">
<input type="hidden" name="book" value="book.id"></input>
<input type="submit" value="want to read"></input>
</form>
{% endif %}
</div>
{% endfor %}
</div>
{% for activity in activities %}
<div class="update">
<div class="user-preview">
<img class="user-pic" src="static/images/profile.jpg">
<span><a href="/user/{% if activity.user.localname %}{{ activity.user.localname }}{% else %}{{ activity.user.username }}{% endif %}" class="user">
{% if activity.user.localname %}{{ activity.user.localname }}{% else %}{{ activity.user.username }}{% endif %}</a>
did {{ activity.activity_type }} </span>
</div>
</div>
{% endfor %}
</div>
{% endblock %}