mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 11:31:08 +00:00
Clean up edit book page
This commit is contained in:
parent
31f74c1a8c
commit
da69b82d8a
2 changed files with 78 additions and 8 deletions
|
@ -42,6 +42,16 @@ h2 {
|
||||||
border-bottom: 3px solid #B2DBBF;
|
border-bottom: 3px solid #B2DBBF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h3 {
|
||||||
|
font-size: 1rem;
|
||||||
|
margin: 1rem 0 0.5rem 0;
|
||||||
|
border-bottom: 3px solid #70C1B2;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
h3 small {
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
#top-bar {
|
#top-bar {
|
||||||
overflow: visible;
|
overflow: visible;
|
||||||
padding: 0.5rem;
|
padding: 0.5rem;
|
||||||
|
@ -222,9 +232,30 @@ ul.menu a {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.book-form textarea {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
font-size: 0.9em;
|
||||||
|
}
|
||||||
|
.book-form label {
|
||||||
|
display: inline-block;
|
||||||
|
width: 8rem;
|
||||||
|
vertical-align: top;
|
||||||
|
}
|
||||||
|
.book-form .row label {
|
||||||
|
width: max-content;
|
||||||
|
}
|
||||||
form input {
|
form input {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
}
|
}
|
||||||
|
form div {
|
||||||
|
margin-bottom: 1em;
|
||||||
|
}
|
||||||
|
textarea {
|
||||||
|
padding: 0.5em;
|
||||||
|
}
|
||||||
.content-container button {
|
.content-container button {
|
||||||
border: none;
|
border: none;
|
||||||
background-color: #247BA0;
|
background-color: #247BA0;
|
||||||
|
|
|
@ -1,15 +1,54 @@
|
||||||
{% extends 'layout.html' %}
|
{% extends 'layout.html' %}
|
||||||
|
{% load humanize %}
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<div class="content-container">
|
<div class="content-container">
|
||||||
<h2>Edit "{{ book.title }}"</h2>
|
<h2>Edit "{{ book.title }}"</h2>
|
||||||
|
<div class="book-preview">
|
||||||
<p class="book-cover">{% include 'snippets/book_cover.html' with book=book %}</p>
|
{% include 'snippets/book_cover.html' with book=book size="small" %}
|
||||||
|
<p>Added: {{ book.created_date | naturaltime }}</p>
|
||||||
<form name="edit-book" action="/edit_book/{{ book.id }}" method="post" enctype="multipart/form-data">
|
<p>Updated: {{ book.updated_date | naturaltime }}</p>
|
||||||
{% csrf_token %}
|
</div>
|
||||||
{{ form.as_p }}
|
|
||||||
<button type="submit">Update book</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<form class="book-form content-container" name="edit-book" action="/edit_book/{{ book.id }}" method="post" enctype="multipart/form-data">
|
||||||
|
{% csrf_token %}
|
||||||
|
<h3>Data sync
|
||||||
|
<small>If sync is enabled, any changes will be over-written</small>
|
||||||
|
</h3>
|
||||||
|
<div>
|
||||||
|
<div class="row">
|
||||||
|
<p><label for="id_sync">Sync:</label> <input type="checkbox" name="sync" id="id_sync"></p>
|
||||||
|
<p><label for="id_sync_cover">Sync cover:</label> <input type="checkbox" name="sync_cover" id="id_sync_cover"></p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3>Cover</h3>
|
||||||
|
<div class="image-form">
|
||||||
|
<p>{{ form.cover }} </p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3>Book Identifiers</h2>
|
||||||
|
<div>
|
||||||
|
<p><label for="id_fedireads_key">Fedireads key:</label> {{ form.fedireads_key }} </p>
|
||||||
|
<p><label for="id_openlibrary_key">Openlibrary key:</label> {{ form.openlibrary_key }} </p>
|
||||||
|
<p><label for="id_librarything_key">Librarything key:</label> {{ form.librarything_key }} </p>
|
||||||
|
<p><label for="id_goodreads_key">Goodreads key:</label> {{ form.goodreads_key }} </p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h3>Metadata</h3>
|
||||||
|
<div>
|
||||||
|
<p><label for="id_title">Title:</label> {{ form.title }} </p>
|
||||||
|
<p><label for="id_sort_title">Sort title:</label> {{ form.sort_title }} </p>
|
||||||
|
<p><label for="id_subtitle">Subtitle:</label> {{ form.subtitle }} </p>
|
||||||
|
<p><label for="id_description">Description:</label> {{ form.description }} </p>
|
||||||
|
<p><label for="id_language">Language:</label> {{ form.language }} </p>
|
||||||
|
<p><label for="id_series">Series:</label> {{ form.series }} </p>
|
||||||
|
<p><label for="id_series_number">Series number:</label> {{ form.series_number }} </p>
|
||||||
|
<p><label for="id_first_published_date">First published date:</label> {{ form.first_published_date }} </p>
|
||||||
|
<p><label for="id_published_date">Published date:</label> {{ form.published_date }} </p>
|
||||||
|
</div>
|
||||||
|
<button type="submit">Update book</button>
|
||||||
|
</form>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue