Merge pull request #330 from mouse-reeve/wave-evaluator

Various small WAVE suggestions
This commit is contained in:
Mouse Reeve
2020-11-09 13:12:50 -08:00
committed by GitHub
27 changed files with 89 additions and 71 deletions

View File

@ -2,7 +2,7 @@
{% load fr_display %}
{% block content %}
<div class="block">
<h2 class="title">{{ author.display_name }}</h2>
<h1 class="title">{{ author.display_name }}</h1>
{% if author.bio %}
<p>

View File

@ -5,9 +5,9 @@
<div class="block">
<div class="level">
<h2 class="title level-left">
<h1 class="title level-left">
<span>{% include 'snippets/book_titleby.html' with book=book %}</span>
</h2>
</h1>
{% if request.user.is_authenticated and perms.bookwyrm.edit_book %}
<div class="level-right">
@ -132,7 +132,7 @@
<form name="delete-readthrough-{{ readthrough.id }}" action="/delete-readthrough" method="POST">
{% csrf_token %}
<input type="hidden" name="id" value="{{ readthrough.id }}">
<button class="button is-danger" type="submit">
<button class="button is-danger is-light" type="submit">
Delete
</button>
<label for="delete-readthrough-{{ readthrough.id }}" class="button">Cancel</button>

View File

@ -3,9 +3,9 @@
{% block content %}
<div class="block">
<div class="level">
<h2 class="title level-left">
<h1 class="title level-left">
Edit "{{ book.title }}"
</h2>
</h1>
<div class="level-right">
<a href="/book/{{ book.id }}">
<span class="edit-link icon icon-close">
@ -14,23 +14,18 @@
</a>
</div>
</div>
<div class="columns">
<div class="column is-narrow">
{% include 'snippets/book_cover.html' with book=book size="small" %}
</div>
<div class="column is-narrow">
<p>Added: {{ book.created_date | naturaltime }}</p>
<p>Updated: {{ book.updated_date | naturaltime }}</p>
</div>
<div>
<p>Added: {{ book.created_date | naturaltime }}</p>
<p>Updated: {{ book.updated_date | naturaltime }}</p>
</div>
</div>
<form class="block" name="edit-book" action="/edit_book/{{ book.id }}" method="post" enctype="multipart/form-data">
{% csrf_token %}
<div class="block">
<h3 class="title is-4">Data sync</h3>
<h4 class="subtitle is-5">If sync is enabled, any changes will be over-written</h4>
</h3>
<h2 class="title is-4">Data sync
<p class="subtitle is-6">If sync is enabled, any changes will be over-written</p>
</h2>
<div class="columns">
<div class="column is-narrow">
<label class="checkbox" for="id_sync"><input class="checkbox" type="checkbox" name="sync" id="id_sync"> Sync</label>
@ -43,7 +38,7 @@
<div class="columns">
<div class="block column">
<h3 class="title is-4">Book Identifiers</h3>
<h2 class="title is-4">Book Identifiers</h2>
<p class="fields is-grouped"><label class="label"for="id_isbn_13">ISBN 13:</label> {{ form.isbn_13 }} </p>
<p class="fields is-grouped"><label class="label"for="id_isbn_10">ISBN 10:</label> {{ form.isbn_10 }} </p>
<p class="fields is-grouped"><label class="label"for="id_openlibrary_key">Openlibrary key:</label> {{ form.openlibrary_key }} </p>
@ -52,13 +47,20 @@
</div>
<div class="column">
<div class="block">
<h3 class="title is-4">Cover</h3>
<p>{{ form.cover }} </p>
<div class="columns">
<div class="column is-narrow">
{% include 'snippets/book_cover.html' with book=book size="small" %}
</div>
<div class="column is-narrow">
<div class="block">
<h2 class="title is-4">Cover</h2>
<p>{{ form.cover }} </p>
</div>
</div>
</div>
<div class="block">
<h3 class="title is-4">Physical Properties</h3>
<h2 class="title is-4">Physical Properties</h2>
<p class="fields is-grouped"><label class="label"for="id_physical_format">Format:</label> {{ form.physical_format }} </p>
<p class="fields is-grouped"><label class="label"for="id_pages">Pages:</label> {{ form.pages }} </p>
</div>
@ -66,7 +68,7 @@
</div>
<div class="block">
<h3 class="title is-4">Metadata</h3>
<h2 class="title is-4">Metadata</h2>
<p class="fields is-grouped"><label class="label"for="id_title">Title:</label> {{ form.title }} </p>
<p class="fields is-grouped"><label class="label"for="id_sort_title">Sort title:</label> {{ form.sort_title }} </p>
<p class="fields is-grouped"><label class="label"for="id_subtitle">Subtitle:</label> {{ form.subtitle }} </p>
@ -78,7 +80,7 @@
</div>
<div class="block">
<button class="button is-primary" type="submit">Save</button>
<a class="button is-danger is-light" href="/book/{{ book.id }}">Cancel</a>
<a class="button" href="/book/{{ book.id }}">Cancel</a>
</div>
</form>

View File

@ -2,7 +2,7 @@
{% block content %}
<div class="block columns">
<div class="column is-half">
<h2 class="title">Profile</h2>
<h1 class="title">Profile</h1>
{% if form.non_field_errors %}
<p class="notification is-danger">{{ form.non_field_errors }}</p>
{% endif %}

View File

@ -2,7 +2,7 @@
{% load fr_display %}
{% block content %}
<div class="block">
<h2 class="title">Editions of <a href="/book/{{ work.id }}">"{{ work.title }}"</a></h2>
<h1 class="title">Editions of <a href="/book/{{ work.id }}">"{{ work.title }}"</a></h1>
{% include 'snippets/book_tiles.html' with books=editions %}
</div>

View File

@ -2,7 +2,7 @@
{% block content %}
<div class="block">
<h2 class="title">Server Error</h2>
<h1 class="title">Server Error</h1>
<p>Something went wrong! Sorry about that.</p>
</div>

View File

@ -2,25 +2,21 @@
{% load humanize %}
{% block content %}
<div class="block">
<h2 class="title">Import Books from GoodReads</h2>
<h1 class="title">Import Books from GoodReads</h1>
<form name="import" action="/import_data/" method="post" enctype="multipart/form-data">
{% csrf_token %}
<div class="field">
{{ import_form.as_p }}
</div>
<div class="field">
<label class="label" for="include_reviews"><input type="checkbox" name="include_reviews" checked> Include reviews</label>
<label class="label">
<input type="checkbox" name="include_reviews" checked> Include reviews
</label>
</div>
<div class="field">
<label class="label" for="privacy">Privacy setting for imported reviews</label>
<div class="select">
<select name="privacy">
<option value="public" selected>Public</option>
<option value="unlisted">Unlisted</option>
<option value="followers">Followers only</option>
<option value="direct">Private</option>
</select>
</div>
<label class="label">Privacy setting for imported reviews
{% include 'snippets/privacy_select.html' with no_label=True %}
</label>
</div>
<button class="button is-primary" type="submit">Import</button>
</form>

View File

@ -4,7 +4,7 @@
<div class="columns">
<div class="column">
<div class="block login">
<h2 class="title">Create an Account</h2>
<h1 class="title">Create an Account</h1>
<div>
<form name="register" method="post" action="/user-register">
<input type=hidden name="invite_code" value="{{ invite.code }}">

View File

@ -36,10 +36,8 @@
</div>
</form>
<label for="main-nav" role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false" data-target="mainNav">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<label for="main-nav" role="button" class="navbar-item" aria-label="menu" aria-expanded="false" data-target="mainNav" onclick="toggleMenu(this)">
<div class="icon icon-dots-three-vertical"><span class="is-sr-only">Main navigation menu</div>
</label>
</div>

View File

@ -2,7 +2,7 @@
{% load humanize %}
{% block content %}
<div class="block">
<h2 class="title">Invites</h2>
<h1 class="title">Invites</h1>
<table class="table is-striped">
<tr>
<th>Link</th>

View File

@ -2,7 +2,7 @@
{% block content %}
<div class="block">
<h2 class="title">Not Found</h2>
<h1 class="title">Not Found</h1>
<p>The page your requested doesn't seem to exist!</p>
</div>

View File

@ -2,11 +2,11 @@
{% load humanize %}l
{% block content %}
<div class="block">
<h2 class="title">Notifications</h2>
<h1 class="title">Notifications</h1>
<form name="clear" action="/clear-notifications" method="POST">
{% csrf_token %}
<button class="button is-danger" type="submit" class="secondary">Delete notifications</button>
<button class="button is-danger is-light" type="submit" class="secondary">Delete notifications</button>
</form>
</div>

View File

@ -4,7 +4,7 @@
<div class="columns">
<div class="column">
<div class="block">
<h2 class="title">Reset Password</h2>
<h1 class="title">Reset Password</h1>
{% for error in errors %}
<p class="is-danger">{{ error }}</p>
{% endfor %}

View File

@ -4,7 +4,7 @@
<div class="columns is-centered">
<div class="column is-half">
<div class="block">
<h2 class="title">Reset Password</h2>
<h1 class="title">Reset Password</h1>
{% if message %}<p>{{ message }}</p>{% endif %}
<p>A link to reset your password will be sent to your email address</p>
<form name="reset-password" method="post" action="/reset-password-request">

View File

@ -9,21 +9,29 @@
</div>
{% endif %}
<div class="control">
<label class="label" for="id_content_{{ book.id }}_{{ type }}">{{ type|title }}:</label>
<label class="label" for="id_{% if type == 'quote' %}quote{% else %}content{% endif %}_{{ book.id }}_{{ type }}">{{ type|title }}:</label>
{% if type == 'review' %}
<span class="is-sr-only">Rating</span>
<div class="field is-grouped stars form-rate-stars">
<input class="hidden" type="radio" name="rating" value="" checked>
{% for i in '12345'|make_list %}
<input class="is-sr-only" id="book{{book.id}}-star-{{ forloop.counter }}" type="radio" name="rating" value="{{ forloop.counter }}">
<label class="icon icon-star-empty" for="book{{book.id}}-star-{{ forloop.counter }}">
<span class="is-sr-only">{{ forloop.counter }} star{{ forloop.counter | pluralize }}</span>
<fieldset>
<legend class="is-sr-only">Rating</legend>
<div class="field is-grouped stars form-rate-stars">
<label class="is-sr-only">No rating
<input class="is-sr-only" type="radio" name="rating" value="" checked>
</label>
{% endfor %}
</div>
{% for i in '12345'|make_list %}
<input class="is-sr-only" id="book{{book.id}}-star-{{ forloop.counter }}" type="radio" name="rating" value="{{ forloop.counter }}">
<label class="icon icon-star-empty" for="book{{book.id}}-star-{{ forloop.counter }}">
<span class="is-sr-only">{{ forloop.counter }} star{{ forloop.counter | pluralize }}</span>
</label>
{% endfor %}
</div>
</fieldset>
{% endif %}
{% if type == 'quote' %}
<textarea name="quote" class="textarea" id="id_quote_{{ book.id }}_{{ type }}" placeholder="{{ placeholder }}" required></textarea>
{% else %}
<textarea name="content" class="textarea" id="id_content_{{ book.id }}_{{ type }}" placeholder="{{ placeholder }}" required></textarea>
{% endif %}
<textarea name="{% if type == 'quote' %}quote{% else %}content{% endif %}" class="textarea" id="id_quote_{{ book.id }}_{{ type }}" placeholder="{{ placeholder }}" required></textarea>
</div>
{% if type == 'quote' %}

View File

@ -19,6 +19,6 @@ Follow request already sent.
<form action="/unfollow/" method="POST" onsubmit="interact(event)" class="follow-{{ user.id }} {% if not request.user in user.followers.all %}hidden{%endif %}" data-id="follow-{{ user.id }}">
{% csrf_token %}
<input type="hidden" name="user" value="{{ user.username }}">
<button class="button is-small is-danger" type="submit">Unfollow</button>
<button class="button is-small is-danger is-light" type="submit">Unfollow</button>
</form>
{% endif %}

View File

@ -8,6 +8,6 @@
<form action="/delete_follow_request/" method="POST">
{% csrf_token %}
<input type="hidden" name="user" value="{{ user.username }}">
<button class="button is-danger is-small" type="submit" class="warning">Delete</button>
<button class="button is-danger is-light is-small" type="submit" class="warning">Delete</button>
</form>
{% endif %}

View File

@ -1,9 +1,15 @@
{% load fr_display %}
<div class="select">
<select name="privacy">
{% with 0|uuid as uuid %}
{% if not no_label %}
<label class="is-sr-only" for="privacy-{{ uuid }}">Post privacy</label>
{% endif %}
<select name="privacy" id="privacy-{{ uuid }}">
<option value="public" selected>Public</option>
<option value="unlisted">Unlisted</option>
<option value="followers">Followers only</option>
<option value="direct">Private</option>
</select>
{% endwith %}
</div>

View File

@ -23,7 +23,7 @@
{% csrf_token %}
<input type="hidden" name="book" value="{{ book.id }}">
<input type="hidden" name="shelf" value="{{ current.id }}">
<button class="button is-small is-danger" type="submit">Unshelve</button>
<button class="button is-small is-danger is-light" type="submit">Unshelve</button>
</form>
</li>
</ul>

View File

@ -97,7 +97,7 @@
<form name="delete-{{status.id}}" action="/delete-status" method="post">
{% csrf_token %}
<input type="hidden" name="status" value="{{ status.id }}">
<button class="button is-danger" type="submit">
<button class="button is-danger is-light" type="submit">
Delete post
</button>
</form>

View File

@ -3,7 +3,7 @@
{% block content %}
<div class="block">
<h2 class="title">Books tagged "{{ tag.name }}"</h2>
<h1 class="title">Books tagged "{{ tag.name }}"</h1>
{% include 'snippets/book_tiles.html' with books=books.all %}
</div>