{% extends "base.html" %}

{% block title %}
    Wiki: {{ page.title }}
{% endblock %}

{% block content %}
    <div class="wikiview">
        <div class="dbox wiki-doublebox">
            <div class="dbox-top">
                <span class="left">
                    Wiki page
                </span>
                <span class="right">
                    {% if session.royal %}
                        <a class="edit no-icon" href="{{ url_for("wikiedit.wikiedit_by_id", page_id=page.page_short_id, title=page.title) }}">Modifica</a>
                    {% else %}
                        <a class="edit no-icon disabled" title="Devi fare il login per modificare pagine!">Modifica</a>
                    {% endif %}
                    |
                    <a class="permalink no-icon" href="{{ url_for("wikiview.wikiview_by_id", page_id=page.page_short_id, title=page.title) }}">Permalink</a>
                </span>
            </div>
            <div class="dbox-bot">
                <div class="wikiview-page">
                    <h1 class="wikiview-title">
                        {{ page.title }}
                    </h1>
                    <div class="wikiview-content">
                        {{ parsed_content }}
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}
