From e24737739f5c201f3a4ec248d90a0d01cfcae6d6 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Sat, 25 Nov 2023 03:58:11 -0500 Subject: [PATCH] Split out a lot of css and html templates into seperate files for ease of use later on in development --- src/static/styles/core.css | 9 ++++++ src/static/styles/pages/index.css | 20 +++++++++++++ .../{index.css => utils/login-logout.css} | 29 ------------------ src/templates/index.html | 30 ++----------------- src/templates/utils/login-logout.html | 28 +++++++++++++++++ 5 files changed, 59 insertions(+), 57 deletions(-) create mode 100644 src/static/styles/core.css create mode 100644 src/static/styles/pages/index.css rename src/static/styles/{index.css => utils/login-logout.css} (66%) create mode 100644 src/templates/utils/login-logout.html diff --git a/src/static/styles/core.css b/src/static/styles/core.css new file mode 100644 index 0000000..d614c0f --- /dev/null +++ b/src/static/styles/core.css @@ -0,0 +1,9 @@ +body { + background-color: #2e3440; + color: #fff; + font-family: Arial, sans-serif; +} + +.txt-danger, .txt-danger:hover, .txt-danger:visited, .txt-danger:active { + color: #ff0000 !important; +} diff --git a/src/static/styles/pages/index.css b/src/static/styles/pages/index.css new file mode 100644 index 0000000..d1aad5a --- /dev/null +++ b/src/static/styles/pages/index.css @@ -0,0 +1,20 @@ +@import url('../core.css'); + +#menu { + position: fixed; + left: 0; + top: 0; + bottom: 0; + width: 200px; + background-color: #3b4252; + padding: 20px; +} + +#menu ul { + list-style-type: none; + padding: 0; +} + +#menu li { + margin-bottom: 10px; +} diff --git a/src/static/styles/index.css b/src/static/styles/utils/login-logout.css similarity index 66% rename from src/static/styles/index.css rename to src/static/styles/utils/login-logout.css index c88c627..acc6778 100644 --- a/src/static/styles/index.css +++ b/src/static/styles/utils/login-logout.css @@ -1,32 +1,3 @@ -body { - background-color: #333; - color: #fff; - font-family: Arial, sans-serif; -} - -#menu { - position: fixed; - left: 0; - top: 0; - bottom: 0; - width: 200px; - background-color: #444; - padding: 20px; -} - -#menu ul { - list-style-type: none; - padding: 0; -} - -#menu li { - margin-bottom: 10px; -} - -.txt-danger, .txt-danger:hover, txt-danger:visited, .txt-danger:active { - color: #ff0000 !important; -} - .dropdown-content { display: none; position: relative; diff --git a/src/templates/index.html b/src/templates/index.html index 7d8af67..bf4aac8 100644 --- a/src/templates/index.html +++ b/src/templates/index.html @@ -2,7 +2,7 @@ Audit Log - + - {% if not user %} -
- -
- {% elif user %} -
- -
- {% endif %} + {% include 'utils/login-logout.html' %} diff --git a/src/templates/utils/login-logout.html b/src/templates/utils/login-logout.html new file mode 100644 index 0000000..3bf1cb5 --- /dev/null +++ b/src/templates/utils/login-logout.html @@ -0,0 +1,28 @@ + +{% if not user %} +
+ +
+{% elif user %} +
+ +
+{% endif %}