moviewyrm/fedireads/templates/feed.html

49 lines
1.9 KiB
HTML
Raw Normal View History

2020-01-25 23:25:19 +00:00
{% 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">
2020-01-28 02:47:54 +00:00
<p class="title"><a href="{{ book.openlibrary_key }}">{{ book.data.title }}</a></p>
2020-01-25 23:25:19 +00:00
<p>by <a href="" class="author">{{ book.authors.first.data.name }}</a></p>
{% if shelf.type == 'reading' %}
2020-01-27 01:55:02 +00:00
<button>done reading</button>
2020-01-25 23:25:19 +00:00
{% endif %}
</div>
{% endfor %}
{% endfor %}
</div>
<div id="main">
2020-01-27 01:55:02 +00:00
<div class="carosel">
{% for book in recent_books %}
<div class="book-preview">
<img class="cover" src="static/images/small.jpg">
2020-01-28 02:47:54 +00:00
<p class="title">
<a href="{{ book.openlibrary_key }}">{{ book.data.title }}</a>
</p>
2020-01-27 01:55:02 +00:00
<p>by <a href="" class="author">{{ book.authors.first.data.name }}</a></p>
{% if not book.user_shelves %}
2020-01-28 07:20:32 +00:00
<form name="shelve" action="/shelve/{{ request.user.localname }}_to-read/{{ book.id }}" method="post">
2020-01-27 01:55:02 +00:00
<input type="hidden" name="book" value="book.id"></input>
<input type="submit" value="want to read"></input>
</form>
{% endif %}
</div>
{% endfor %}
</div>
2020-01-28 02:47:54 +00:00
{% for activity in activities %}
2020-01-25 23:25:19 +00:00
<div class="update">
<div class="user-preview">
<img class="user-pic" src="static/images/profile.jpg">
2020-01-28 07:20:32 +00:00
<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>
2020-01-25 23:25:19 +00:00
</div>
</div>
2020-01-28 02:47:54 +00:00
{% endfor %}
2020-01-25 23:25:19 +00:00
</div>
{% endblock %}