|
1
|
{% extends "base.html" %} |
|
2
|
{% block title %}{{ page.name }} — Fossilrepo{% endblock %} |
|
3
|
|
|
4
|
{% block content %} |
|
5
|
<div class="overflow-hidden rounded-lg bg-gray-800 shadow border border-gray-700"> |
|
6
|
<div class="px-6 py-5 sm:flex sm:items-center sm:justify-between border-b border-gray-700"> |
|
7
|
<div> |
|
8
|
<h1 class="text-2xl font-bold text-gray-100">{{ page.name }}</h1> |
|
9
|
<p class="mt-1 text-sm text-gray-400"> |
|
10
|
{% if not page.is_published %} |
|
11
|
<span class="inline-flex rounded-full bg-yellow-900/50 px-2 text-xs font-semibold leading-5 text-yellow-300 mr-2">Draft</span> |
|
12
|
{% endif %} |
|
13
|
Updated {{ page.updated_at|date:"N j, Y g:i a" }}{% if page.updated_by %} by {{ page.updated_by }}{% endif %} |
|
14
|
</p> |
|
15
|
</div> |
|
16
|
<div class="mt-4 flex gap-3 sm:mt-0"> |
|
17
|
{% if perms.pages.change_page %} |
|
18
|
<a href="{% url 'pages:update' slug=page.slug %}" |
|
19
|
class="rounded-md bg-gray-700 px-3 py-2 text-sm font-semibold text-gray-100 shadow-sm ring-1 ring-inset ring-gray-600 hover:bg-gray-600"> |
|
20
|
Edit |
|
21
|
</a> |
|
22
|
{% endif %} |
|
23
|
{% if perms.pages.delete_page %} |
|
24
|
<a href="{% url 'pages:delete' slug=page.slug %}" |
|
25
|
class="rounded-md bg-red-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-red-500"> |
|
26
|
Delete |
|
27
|
</a> |
|
28
|
{% endif %} |
|
29
|
</div> |
|
30
|
</div> |
|
31
|
|
|
32
|
<div class="px-6 py-6"> |
|
33
|
<div class="prose prose-invert prose-gray max-w-none"> |
|
34
|
{{ content_html }} |
|
35
|
</div> |
|
36
|
</div> |
|
37
|
</div> |
|
38
|
{% endblock %} |
|
39
|
|