From cde860da558ad394ce9a1b2f6fdbf629b19a9ee2 Mon Sep 17 00:00:00 2001 From: gooseman <16601315+geese-suck@users.noreply.github.com> Date: Sun, 19 Jun 2022 00:18:14 -0700 Subject: [PATCH] update admin panel with snakes template thing --- files/templates/admin/admin_home.html | 152 +++++++++++++++----------- files/templates/util/assetcache.html | 4 +- 2 files changed, 92 insertions(+), 64 deletions(-) diff --git a/files/templates/admin/admin_home.html b/files/templates/admin/admin_home.html index 37669cf6a..73d8e890d 100644 --- a/files/templates/admin/admin_home.html +++ b/files/templates/admin/admin_home.html @@ -1,72 +1,100 @@ {% extends "default.html" %} -{% block title %} -{{SITE_NAME}} - -{% endblock %} +{# Title (~25char max), Description (~80char max), + Icon (fa-foo-bar), Color (#ff0000), URL (/post/12345/) #} +{%- +set ADMIN_INDEX = [ + ( + 'Content', + 'fa-book', '#6b8e23', + ( + ('/admin/image_posts','Image Posts'), + ('/admin/reported/posts','Reported Posts/Comments'), + ('/admin/removed/posts','Removed Posts/Comments'), + ), + ), + ( + 'Users', + 'fa-user', '#f5fffa', + ( + ('/admin/users','Users Feed'), + ('/admin/shadowbanned','Shadowbanned Users'), + ('/banned','Permabanned Users'), + ('/agendaposters','Users with Chud Theme'), + ('/grassed','Currently Grassed Users'), + ('/patrons','Patrons / Paypigs'), + ('/admin/loggedin','Currently Logged-in Users'), + ('/admin/loggedout','Currently Logged-out Users'), + ), + ), + ( + 'Safety', + 'fa-shield', '#87cefa', + ( + ('/admin/banned_domains','Banned Domains'), + ('/admin/alt_votes','Multi Vote Analysis'), + ), + ), + ( + 'Grant', + 'fa-award', '#adff2f', + ( + ('/admin/awards','Give User Award'), + ('/admin/badge_grant','Grant Badges'), + ('/admin/badge_remove','Remove Badges'), + ), + ), + ( + 'API Access Control', + 'fa-robot', 'red', + ( + ('/admin/apps','Apps'), + ), + ), + ( + 'Statistics', + 'fa-chart-line', '#c9d1d9', + ( + ('/stats','Content Stats'), + ('/weekly_chart','Weekly Stat Chart'), + ('/daily_chart','Daily Stat Chart'), + ), + ), +] +-%} {% block content %} -

-

-

 Admin Tools

- -

Content

- - -

Users

- - -

Safety

- - -

Grant

- - -

API Access Control

- - +
+{% for thread in ADMIN_INDEX %} + +{% endfor %} {% if LOTTERY_ENABLED -%} -

Lottery

- + {%- endif %} - -

Statistics

- - {% if SITE_NAME == 'PCM' %} -

Configuration

- + {% endif %} +
{% if v.admin_level > 2 %}

@@ -105,4 +133,4 @@
 	Live Revision: {{ gitref }} 
-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/files/templates/util/assetcache.html b/files/templates/util/assetcache.html index a336873a1..1ec97a7a0 100644 --- a/files/templates/util/assetcache.html +++ b/files/templates/util/assetcache.html @@ -1,6 +1,6 @@ {%- set CACHE_VER = { - 'css/main.css': 326, + 'css/main.css': 327, 'css/4chan.css': 61, 'css/classic.css': 61, @@ -25,7 +25,7 @@ set CACHE_VER = { 'js/submit.js': 262, 'js/userpage.js': 241, 'js/userpage_v.js': 245, - + 'images/badges/': 1021, } -%}