Reviews
This commit is contained in:
27
fedireads/templates/book.html
Normal file
27
fedireads/templates/book.html
Normal file
@ -0,0 +1,27 @@
|
||||
{% extends 'layout.html' %}
|
||||
{% block content %}
|
||||
<div id="main">
|
||||
<div class="book-profile">
|
||||
<img class="book-cover" src="/static/images/med.jpg">
|
||||
<h1>{{ book.data.title }}</h1>
|
||||
by {{ book.authors.first.data.name }}
|
||||
{{ rating }} stars
|
||||
</div>
|
||||
<form name="review" action="/review/" method="post">
|
||||
<input type="hidden" name="book" value="{{ book.openlibrary_key }}"></input>
|
||||
<input type="text" name="name"></input>
|
||||
<textarea name="content">Your review</textarea>
|
||||
<input type="number" name="rating"></input>
|
||||
<input type="submit" value="Post review"></input>
|
||||
</form>
|
||||
|
||||
<div class="reviews">
|
||||
<h2>Reviews</h2>
|
||||
{% for review in reviews %}
|
||||
<p><span class="review-title">{{ review.name }}</span>{{ review.rating }} stars, by {{ review.user.username }}</p>
|
||||
<p>{{ review.review_content }}</p>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
@ -6,7 +6,7 @@
|
||||
{% for book in shelf.books.all %}
|
||||
<div class="book-preview">
|
||||
<img class="cover" src="static/images/small.jpg">
|
||||
<p class="title">{{ book.data.title }}</p>
|
||||
<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>
|
||||
@ -21,7 +21,9 @@
|
||||
{% for book in recent_books %}
|
||||
<div class="book-preview">
|
||||
<img class="cover" src="static/images/small.jpg">
|
||||
<p class="title">{{ book.data.title }}</p>
|
||||
<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">
|
||||
@ -32,35 +34,13 @@
|
||||
</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> is currently reading</span>
|
||||
</div>
|
||||
<div class="book-preview">
|
||||
<img class="cover" src="static/images/med.jpg">
|
||||
<p class="title">Moby Dick</p>
|
||||
<p>by <a href="" class="author">Herman Melville</a></p>
|
||||
<p>"Command the murderous chalices! Drink ye harpooners! Drink and swear, ye men that man the deathful whaleboat's bow -- Death to Moby Dick!" So Captain Ahab binds his crew to fulfil his obsession -- the destruction of the great white whale. Under his lordly but maniacal command the Pequod's commercial mission is perverted to one of vengeance...</p>
|
||||
</div>
|
||||
<div class="interact">
|
||||
<span>⭐️ Like</span>
|
||||
<span>💬 <input type="text"></input></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="update">
|
||||
<img class="user-pic" src="static/images/profile.jpg">
|
||||
<span><a href="" class="user">Mouse</a> is currently reading</span>
|
||||
<div class="book-preview">
|
||||
<img class="cover" src="static/images/med.jpg">
|
||||
<p class="title">Moby Dick</p>
|
||||
<p>by <a href="" class="author">Herman Melville</a></p>
|
||||
<p>"Command the murderous chalices! Drink ye harpooners! Drink and swear, ye men that man the deathful whaleboat's bow -- Death to Moby Dick!" So Captain Ahab binds his crew to fulfil his obsession -- the destruction of the great white whale. Under his lordly but maniacal command the Pequod's commercial mission is perverted to one of vengeance...</p>
|
||||
</div>
|
||||
<div class="interact">
|
||||
<span>⭐️ Like</span>
|
||||
<span>💬 <input type="text"></input></span>
|
||||
<span><a href="" class="user">Mouse</a> did {{ activity.activity_type }} </span>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
Reference in New Issue
Block a user