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">
{% csrf_token %}
<input type="hidden" name="status" value="{{ status.id }}">
<button type="submit" class="button">
<button class="button is-danger" type="submit">
Delete post
</button>
</form>

View file

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