{% extends 'main/layout.html' %}
{% block title %}{{ image.name }} — {{ request.user.username }}{% endblock %}
{% block content %}
<main>
<h1>{{ image.name }}</h1>
<div class="images-item-byline">
<a class="images-item-back" href="{% url 'image_list' %}">« all assets</a>
— Uploaded on <time datetime="{{ image.uploaded_at|date:'Y-m-d' }}">{{ image.uploaded_at|date:'F j, Y' }}</time>
| <a href="{% url 'image_update' image.slug %}">Edit asset</a>
| <a href="{% url 'image_delete' image.slug %}">Delete</a>
</div>
<p>
Use markdown syntax to add this asset in a post as an image:
</p>
<code>

</code>
<p>
Markdown syntax for linkified image to full size version:
</p>
<code>
[]({{ request.scheme }}:{{ image.raw_url_absolute }})
</code>
{% if used_by_posts %}
<p>Used by posts:</p>
<ul>
{% for post in used_by_posts %}
<li><a href="{% url 'post_detail' post.slug %}">{{ post.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
</main>
<section class="images-item">
<img src="{% url 'image_raw' image.slug image.extension %}" alt="{{ image.name }}">
</section>
{% endblock content %}