tweaks tag markup

This commit is contained in:
Mouse Reeve 2020-11-06 14:01:43 -08:00
parent 404ec82657
commit 9d1f1ce84b
2 changed files with 17 additions and 19 deletions

View file

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

View file

@ -1,24 +1,22 @@
<div class="control"> <div class="control">
<div class="tags has-addons"> <form name="tag" action="/{% if tag.identifier in user_tags %}untag{% else %}tag{% endif %}/" method="post">
<a class="tag is-link" href="/tag/{{ tag.identifier|urlencode }}"> {% csrf_token %}
{{ tag.name }} <input type="hidden" name="book" value="{{ book.id }}">
</a> <input type="hidden" name="name" value="{{ tag.name }}">
<div class="tag">
<div class="tags has-addons">
<a class="tag" href="/tag/{{ tag.identifier|urlencode }}">
{{ tag.name }}
</a>
{% if tag.identifier in user_tags %} {% if tag.identifier in user_tags %}
<form name="tag" action="/untag/" method="post"> <button class="tag is-delete" type="submit">
{% csrf_token %} <span class="is-sr-only">remove tag</span>
<input type="hidden" name="book" value="{{ book.id }}"> </button>
<input type="hidden" name="name" value="{{ tag.name }}">
<button type="submit">x<span class="is-sr-only"> remove tag</span></button>
</form>
{% else %} {% else %}
<form name="tag" action="/tag/" method="post"> <button class="tag" type="submit">+
{% csrf_token %} <span class="is-sr-only">add tag</span>
<input type="hidden" name="book" value="{{ book.id }}"> </button>
<input type="hidden" name="name" value="{{ tag.name }}">
<button type="submit">+<span class="is-sr-only"> add tag</span></button>
</form>
{% endif %} {% endif %}
</div> </div>
</div> </form>
</div> </div>