From f4744f14b7928f6b78cd1a02fb50627c974b1a49 Mon Sep 17 00:00:00 2001 From: Craig Oates Date: Sat, 17 Sep 2022 14:04:47 +0100 Subject: [PATCH] update links to /page and /pages and add HTML templates. The templates added allow the viewer to view the 'pages' individually or as a list (index page of 'pages' basically). --- templates/index.html | 1 + templates/page.html | 32 ++++++++++++++++++++++++++++++++ templates/pages.html | 35 +++++++++++++++++++++++++++++++++++ templates/user/dashboard.html | 2 +- templates/user/edit-page.html | 2 +- 5 files changed, 70 insertions(+), 2 deletions(-) create mode 100644 templates/page.html create mode 100644 templates/pages.html diff --git a/templates/index.html b/templates/index.html index 9a979ed..efe29dd 100644 --- a/templates/index.html +++ b/templates/index.html @@ -6,4 +6,5 @@ Dashboard Log In Sign Up +Pages {% endblock %} diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..ce06364 --- /dev/null +++ b/templates/page.html @@ -0,0 +1,32 @@ +{% extends "layouts/default.html" %} +{% block title %}View page.{% endblock %} +{% block content %} +
+ {% if roles.logged-in %} + Dashboard + Edit Account +
+ + +
+
+ + +
+ Create Page + View Pages + + {% if roles.administrator %} + Site Settings + Users + {% endif %} + + {% else %} + Home + Log-in + {% endif %} +
+ {{data | safe}} +
+
+{% endblock %} diff --git a/templates/pages.html b/templates/pages.html new file mode 100644 index 0000000..2966a80 --- /dev/null +++ b/templates/pages.html @@ -0,0 +1,35 @@ +{% extends "layouts/default.html" %} +{% block title %}A list of the site's pages.{% endblock %} +{% block content %} +

Pages

+
+ {% if roles.logged-in %} + Dashboard + Edit Account +
+ + +
+
+ + +
+ Create Page + View Pages + {% if roles.administrator %} + Site Settings + Users + {% endif %} + {% else %} + Home + Log-in + {% endif %} +
+ +{% for page in pages %} +
+ {{page}} +
+{% endfor %} + +{% endblock %} diff --git a/templates/user/dashboard.html b/templates/user/dashboard.html index 269ab3d..4f7f9fe 100644 --- a/templates/user/dashboard.html +++ b/templates/user/dashboard.html @@ -15,7 +15,7 @@ Create Page - View Pages + View Pages {% if roles.administrator %} Site Settings Users diff --git a/templates/user/edit-page.html b/templates/user/edit-page.html index ff9f12f..a59178f 100644 --- a/templates/user/edit-page.html +++ b/templates/user/edit-page.html @@ -15,7 +15,7 @@ Create Page - View Pages + View Pages {% if roles.administrator %} Site Settings