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

@ -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>