{% extends "base.html" %}
{% block title %}{{ page.title }} (r{{ rev.rev_num }}) — Wiki{% endblock %}
{% block content %}
{% include "wiki/_layout.html" %}

<div class="alert alert-warning">
    <i class="bi bi-clock-history"></i>
    Viewing revision <strong>r{{ rev.rev_num }}</strong> of
    <a href="{{ url_for('wiki.view', slug=page.slug) }}">{{ page.title }}</a>
    — saved {{ rev.created_at.strftime('%Y-%m-%d %H:%M UTC') }}
    {% if rev.author %}by <a href="{{ url_for('profile.view_user', username=rev.author.username) }}">{{ rev.author.username }}</a>{% endif %}.
    {% if rev.edit_summary %}<br><em>“{{ rev.edit_summary }}”</em>{% endif %}
    <br>
    <a href="{{ url_for('wiki.view', slug=page.slug) }}" class="btn btn-sm btn-outline-secondary mt-2">
        <i class="bi bi-arrow-right"></i> Jump to current version</a>
    <a href="{{ url_for('wiki.history', slug=page.slug) }}" class="btn btn-sm btn-outline-secondary mt-2">
        <i class="bi bi-clock-history"></i> Full history</a>
</div>

<article class="wiki-body">{{ body_html }}</article>
{% endblock %}
