{% mbd_token as token %}

<header class="mbd-grid-lcr">
	<strong>{% if uri %}File <code>{{ uri|mbd_basename }}</code>{% else %}{{ title|default:"Data" }}{% endif %}</strong>
	<span></span>
	<nav>
		<ul>
			{% if content is not None %}
				<li>
					<a class="mbd-clipboard" data-clipboard-target="#{{ token }}">
						<img class="mbd-icon" src="{% static 'icons/actions/edit-copy.svg' %}" alt="Copy to clipboard" title="Copy to clipboard">
					</a>
				</li>
			{% endif %}
			{% if uri %}
				<li><a href="{{ uri }}" download><img class="mbd-icon" src="{% static 'icons/actions/download.svg' %}" alt="Download" title="{{ uri }}"></li></a>
			{% endif %}
		</ul>
	</nav>
</header>

{% if toc %}
	<details open>
		<summary>Table Of Contents</summary>
		<ul>
			{% for entry in toc %}
				<li><a class="{{ entry.class }}" href="#{{ entry.token }}">{{ entry.title }}</a></li>
			{% endfor %}
		</ul>
	</details>
{% endif %}

{% if content is None %}
	<div class="mbd-info">No filter -- content will not be displayed.</div>
{% else %}
	<pre id="{{ token }}">{{ content }}</pre>
{% endif %}
