{% extends "base" %}
{% block title %}Your account - {% endblock title %}
{% block main %}
<aside>
	<p class="subnav">
		<a href="/account/new_tag">New tag</a>
		<a href="/account/settings">Account settings</a>
		<a href="/logout">Log out</a>
	</p>
</aside>
<section>
	<h2>Your {{tags | length}} tags</h2>

	{% for profile in tags %}
	<article class="profile">
		<div class="header">
			<p class="ident">
				Tag ID <span class="id">{{profile.id | pretty_id}}</span>,
				{% if profile.microchip_id %}
				Microchip ID <span class="id">{{profile.microchip_id}}</span>
				{% else %}
				Not microchipped
				{% endif %}
			</p>
			<p class="pronouns">
				<span class="label">Pronouns</span>
				<span class="pronoun_fragment">{{profile.pronoun_subject}}</span> /
				<span class="pronoun_fragment">{{profile.pronoun_object}}</span> /
				<span class="pronoun_fragment">{{profile.pronoun_possessive}}</span>
			</p>
		</div>
		<h3>{{profile.name}}</h3>
		<div class="subnav">
			<a href="/profile/{{profile.id}}">Public page</a>
			<a href="/account/edit_tag/{{profile.id}}">Edit</a>
			<a href="/account/delete/{{profile.id}}">Delete</a>
		</div>
	</article>
	{% endfor %}
</section>

{% if archived_tags | length > 0 %}
<section>
	<h2>Your archived tags</h2>

	<p>You have {{archived_tags | length}} archived tags for which you may reuse the ID.</p>

	<ul>
		{% for id in archived_tags %}
		<li><a href="/account/edit_tag/{{id}}">{{id}}</a></li>
		{% endfor %}
	</ul>
</section>
{% endif %}
{% endblock main %}