aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-04-12 11:54:02 +0100
committerGravatar Gareth Coles <[email protected]>2018-04-12 11:54:02 +0100
commitcec1ab596024dfcee929a3246715a88b432bfe8a (patch)
tree338b3ceb612687c258083b8251cd74e7d874dbc3 /templates
parentUpdate resources page with new icons and formatting. (diff)
Add page source view to wiki
Diffstat (limited to 'templates')
-rw-r--r--templates/wiki/base.html24
-rw-r--r--templates/wiki/page_source.html13
2 files changed, 31 insertions, 6 deletions
diff --git a/templates/wiki/base.html b/templates/wiki/base.html
index 4bb227df..9464782b 100644
--- a/templates/wiki/base.html
+++ b/templates/wiki/base.html
@@ -33,21 +33,33 @@
<div class="uk-flex uk-flex-row uk-flex-1">
<div class="uk-card uk-card-body uk-flex-left uk-flex uk-card-primary">
<ul class="uk-nav-default uk-nav-parent-icon" uk-nav>
- {% if (can_edit or debug) and current_page == "page" %}
+ {% if (can_edit or debug) and current_page != "edit" %}
<li>
<a href="{{ url_for("wiki.edit", page=page) }}">
- <i class="fas fa-pencil-alt"></i> &nbsp;Edit
+ <i class="fas fa-fw fa-pencil-alt"></i> &nbsp;Edit
</a>
</li>
- <li class="uk-nav-divider"></li>
- {% elif current_page == "edit" %}
+ {% else %}
<li>
<a href="{{ url_for("wiki.page", page=page) }}">
- <i class="fas fa-arrow-left fa-fw"></i> &nbsp;Back
+ <i class="fas fa-fw fa-arrow-left"></i> &nbsp;Back
</a>
</li>
- <li class="uk-nav-divider"></li>
{% endif %}
+ {% if current_page != "source" %}
+ <li>
+ <a href="{{ url_for("wiki.source", page=page) }}">
+ <i class="fas fa-fw fa-code"></i> &nbsp;Source
+ </a>
+ </li>
+ {% else %}
+ <li>
+ <a href="{{ url_for("wiki.page", page=page) }}">
+ <i class="fas fa-fw fa-arrow-left"></i> &nbsp;Back
+ </a>
+ </li>
+ {% endif %}
+ <li class="uk-nav-divider"></li>
<li class="uk-active"><a href="#">Placeholder</a></li>
<li class="uk-parent">
<a href="#">Parent</a>
diff --git a/templates/wiki/page_source.html b/templates/wiki/page_source.html
new file mode 100644
index 00000000..15384aa9
--- /dev/null
+++ b/templates/wiki/page_source.html
@@ -0,0 +1,13 @@
+{% extends "wiki/base.html" %}
+{% block title %}Wiki | {{ data["title"] }}{% endblock %}
+{% block og_title %}Wiki | {{ data["title"] }}{% endblock %}
+{% block og_description %}{% endblock %}
+{% block content %}
+ <div class="uk-container uk-container-small">
+ <h2 class="uk-title">
+ {{ data["title"] }}
+ </h2>
+
+ {{ rst | safe }}
+ </div>
+{% endblock %} \ No newline at end of file