From 0f8f691a3ec1e0883bdd9e3918882fcca744507b Mon Sep 17 00:00:00 2001 From: iou1name Date: Fri, 27 Sep 2019 13:57:00 -0400 Subject: [PATCH] admin panel --- static/buckler.css | 12 +++++++++- static/buckler.js | 5 +++++ templates/index.html | 53 ++++++++++++++++++++++++-------------------- 3 files changed, 45 insertions(+), 25 deletions(-) diff --git a/static/buckler.css b/static/buckler.css index 1a070fc..b5e5c02 100644 --- a/static/buckler.css +++ b/static/buckler.css @@ -3,6 +3,7 @@ body { margin-right: 10%; background-color: lightgray; font-family: Helvetica,sans-serif; + font-size: 14px; } header { @@ -29,12 +30,21 @@ main section { 0 1px 5px 0 rgba(0, 0, 0, 0.12); } -h2 { +.sub_section { + box-shadow: none; + border: 1px solid lightgray; +} + +h2, h3 { font-size: 16px; margin: 0; cursor: pointer; } +h3 { + font-size: 14px; +} + #avail_sites { margin: 0; padding-left: 1em; diff --git a/static/buckler.js b/static/buckler.js index 9cf4471..5d7462a 100644 --- a/static/buckler.js +++ b/static/buckler.js @@ -1,5 +1,10 @@ function load() { let headers = document.querySelectorAll('h2'); + headers = Array.prototype.slice.call(headers); + let headers3 = document.querySelectorAll('h3'); + headers3 = Array.prototype.slice.call(headers3); + headers = headers.concat(headers3); + headers.forEach(function(header) { header.addEventListener('click', function() { let article = this.nextElementSibling; diff --git a/templates/index.html b/templates/index.html index f62f02f..4451747 100644 --- a/templates/index.html +++ b/templates/index.html @@ -30,31 +30,36 @@ {% if request['session']['admin'] %}
-

User Permissions

+

Admin Panel

-
- - - - - {% for app in apps %} - - {% endfor %} - - - - - {% for username, values in users.items() %} - - - {% for name, value in values.items() %} - - {% endfor %} - - - {% endfor %} - -
User{{ app['name'] }}
{{ username }}
+
+

User Permissions

+
+
+ + + + + {% for app in apps %} + + {% endfor %} + + + + + {% for username, values in users.items() %} + + + {% for name, value in values.items() %} + + {% endfor %} + + + {% endfor %} + +
User{{ app['name'] }}
{{ username }}
+
+
{% endif %}