{% extends base_template %}
{% load i18n static %}

{% block extra_css %}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.11.1/build/styles/default.min.css">
{% endblock %}
{% block scripts %}
<script src="{% static 'tinywiki/js/htmx.min.js' %}"></script>
<script src="{% static 'tinywiki/js/highlight.min.js' %}"></script>
<script src="{% static 'tinywiki/js/bbcode.js' %}"></script>
{% endblock %}

{% block extra_scripts %}
<script>hljs.highlightAll();</script>
{% endblock %}

{% block content %}
{% if user_can_edit_wiki_page %}
    <a href="{% url 'tinywiki:page-edit' slug=page.slug %}">{% translate "Edit Page" %}</a>
{% endif %}
{% if user_can_delete_wiki_page %}
<a href="{% url 'tinywiki:page-delete' slug=page.slug %}">{% translate "Delete Page" %}</a>
{% endif %}
<h1>{{ page.title }}</h1>
{{ page.html_content }}
{% endblock content %}

{% block extra_body %}
{% block %}