moviewyrm/fedireads/templates/feed.html
Mouse Reeve 7ee59c5fd5 Reviews
2020-01-27 18:47:54 -08:00

46 lines
1.6 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.username }}_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="" class="user">Mouse</a> did {{ activity.activity_type }} </span>
</div>
</div>
{% endfor %}
</div>
{% endblock %}