From 79616bb8d2666d834b352c98e01b4b744a4c231c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?X=C3=A9fir=20Destiny?= Date: Wed, 11 Dec 2019 18:43:14 +0100 Subject: [PATCH] Fix bugs and clean css --- connectors.py | 3 ++- static/css/styles.css | 36 +++++++----------------------------- templates/admin/list.html | 4 ++-- templates/layout.html | 12 ++++++------ templates/search.html | 2 +- 5 files changed, 18 insertions(+), 39 deletions(-) diff --git a/connectors.py b/connectors.py index ba0b845..564ccc3 100644 --- a/connectors.py +++ b/connectors.py @@ -66,9 +66,10 @@ class Cache: def get_keywords(self): timestamp = datetime.now().timestamp() - if self.CACHE_KEYWORDS['timeout'] > timestamp: + if self.CACHE_KEYWORDS['timeout'] < timestamp: self.CACHE_KEYWORDS['data'] = AnimeTitle.query.all() self.CACHE_KEYWORDS['timeout'] = timestamp + return self.CACHE_KEYWORDS['data'] def clear_keywords(self): self.CACHE_KEYWORDS = { diff --git a/static/css/styles.css b/static/css/styles.css index a8cf405..a7115b1 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -1,7 +1,3 @@ -.search td:first-child { - width: 70%; -} - section { overflow-x: auto; } @@ -27,10 +23,6 @@ th.error { display: none; } -div.navbar-end { - margin-left: auto; -} - .table td:last-child { white-space: nowrap; } @@ -40,37 +32,37 @@ div.navbar-end { } .table td.is-primary, .table tr.is-primary { - background-color: rgba(0, 209, 178, 0.2) !important; + background-color: rgba(0, 209, 178, 0.2); border-color: rgba(0, 209, 178, 0.1); white-space: nowrap; } .table td.is-link, .table tr.is-link { - background-color: rgba(50, 115, 220, 0.2) !important; + background-color: rgba(50, 115, 220, 0.2); border-color: rgba(50, 115, 220, 0.1); white-space: nowrap; } .table td.is-info, .table tr.is-info { - background-color: rgba(32, 156, 238, 0.2) !important; + background-color: rgba(32, 156, 238, 0.2); border-color: rgba(32, 156, 238, 0.1); white-space: nowrap; } .table td.is-success, .table tr.is-success { - background-color: rgba(35, 209, 96, 0.2) !important; + background-color: rgba(35, 209, 96, 0.2); border-color: rgba(35, 209, 96, 0.1); white-space: nowrap; } .table td.is-warning, .table tr.is-warning { - background-color: rgba(255, 221, 87, 0.2) !important; + background-color: rgba(255, 221, 87, 0.2); border-color: rgba(255, 221, 87, 0.1); white-space: nowrap; } .table td.is-danger, .table tr.is-danger { - background-color: rgba(255, 56, 96, 0.2) !important; + background-color: rgba(255, 56, 96, 0.2); border-color: rgba(255, 56, 96, 0.1); white-space: nowrap; } @@ -86,7 +78,7 @@ div.navbar-end { .favicon { width: 16px; - height: 12px; + height: 16px; position: relative; top: 2px; } @@ -97,17 +89,3 @@ div.navbar-end { background: none; border: none; } - -.tooltip.is-tooltip-bottom::before { - left: 100%; -} - -.table.is-hoverable tbody tr:not(.is-selected):hover { - background-color: #f1f1f1 !important; -} - -@media screen and (min-width: 1088px) { - .tooltip:hover::before, .tooltip:hover::after { - display: none !important; - } -} diff --git a/templates/admin/list.html b/templates/admin/list.html index 289b9a3..501d978 100644 --- a/templates/admin/list.html +++ b/templates/admin/list.html @@ -4,7 +4,7 @@

Quick Scroll : {% for folder in folders %} - {% if not loop.index0 %} + {% if loop.index0 %} {{ folder.name }} {% endif %} {% endfor %} @@ -52,7 +52,7 @@   - +   diff --git a/templates/layout.html b/templates/layout.html index 773a4fc..3e165c7 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -16,27 +16,27 @@