From 2bb7d053e6e388c9d9241c79f5f70434c2c93110 Mon Sep 17 00:00:00 2001 From: Craig Oates Date: Mon, 19 Sep 2022 19:19:33 +0100 Subject: [PATCH] clean up old and unused code in HTML templates. It was getting out of hand and difficult to navigate around the pages when viewing them in the browser. --- templates/index.html | 6 ------ templates/layouts/default.html | 9 ++++++--- templates/page.html | 31 +++--------------------------- templates/pages.html | 27 +++----------------------- templates/user/dashboard.html | 22 ++++----------------- templates/user/edit.html | 10 +++++++--- templates/user/index.html | 2 -- templates/user/pages.html | 32 ++++--------------------------- templates/user/site-settings.html | 11 ++++++++--- 9 files changed, 35 insertions(+), 115 deletions(-) diff --git a/templates/index.html b/templates/index.html index d825c1a..e1a19fd 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,12 +1,6 @@ {% extends "layouts/default.html" %} {% block title %}Nicola Ellis & Ritherdon Archive{% endblock %} {% block content %} -

Index

-Create Account -Dashboard -Log In -Sign Up -Pages
{{content | safe }}
diff --git a/templates/layouts/default.html b/templates/layouts/default.html index 223b141..5601dfe 100644 --- a/templates/layouts/default.html +++ b/templates/layouts/default.html @@ -16,8 +16,11 @@ -

{% if alert %}{{alert}}{% endif %}

- - {% block content %}{% endblock %} +
+

{% if alert %}{{alert}}{% endif %}

+
+ {% include "/layouts/header.html" %} + {% block content %}{% endblock %} + {% include "/layouts/footer.html" %} diff --git a/templates/page.html b/templates/page.html index ce06364..57f399e 100644 --- a/templates/page.html +++ b/templates/page.html @@ -1,32 +1,7 @@ {% 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}} -
-
+
+ {{data | safe}} +
{% endblock %} diff --git a/templates/pages.html b/templates/pages.html index 2966a80..9646292 100644 --- a/templates/pages.html +++ b/templates/pages.html @@ -2,33 +2,12 @@ {% 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}} + {% if page.can-delete == 1 %} + {{page.title}} + {% endif %}
{% endfor %} diff --git a/templates/user/dashboard.html b/templates/user/dashboard.html index 4f7f9fe..e8bf240 100644 --- a/templates/user/dashboard.html +++ b/templates/user/dashboard.html @@ -3,26 +3,12 @@ {% block content %}

Dashboard

- {% if roles.logged-in %} - Dashboard - Edit Account -
- - -
-
- - -
Create Page - View Pages + Manage Pages + Upload File + Manage Files {% if roles.administrator %} - Site Settings - Users - {% endif %} - {% else %} - Home - Log-in + Manage Users {% endif %}
diff --git a/templates/user/edit.html b/templates/user/edit.html index ec3601f..5a365c9 100644 --- a/templates/user/edit.html +++ b/templates/user/edit.html @@ -6,8 +6,8 @@

Note: Username cannot be changed.

-
- + + @@ -15,6 +15,10 @@ -
+ +
+ + +
{% endblock %} diff --git a/templates/user/index.html b/templates/user/index.html index 8fefb72..9d0a92b 100644 --- a/templates/user/index.html +++ b/templates/user/index.html @@ -2,8 +2,6 @@ {% block title %}Users{% endblock %} {% block content %}

Users

-Dashboard -
Create New Account diff --git a/templates/user/pages.html b/templates/user/pages.html index 72e99c3..7c8453e 100644 --- a/templates/user/pages.html +++ b/templates/user/pages.html @@ -2,44 +2,20 @@ {% 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 %} +{% if page.can-delete == 1 %}
- {{page}} + {{page.title}} + Edit {% if roles.administrator %} - Edit - {% ifequal page.can-delete 1 %}
{% endif %} - {% endif %}
+{% endif %} {% endfor %} {% endblock %} diff --git a/templates/user/site-settings.html b/templates/user/site-settings.html index abe21cc..dc53a8b 100644 --- a/templates/user/site-settings.html +++ b/templates/user/site-settings.html @@ -2,7 +2,6 @@ {% block title %}Nicola Ellis & Ritherdon Archive{% endblock %} {% block content %}

Site Settings

-Dashboard

Sign-Up

@@ -22,8 +21,14 @@

Currently set to: {{settings.home-page}}