Fix bugs and clean css

This commit is contained in:
Michel Roux 2019-12-11 18:43:14 +01:00
parent e6b4495bad
commit 79616bb8d2
5 changed files with 18 additions and 39 deletions

View File

@ -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 = {

View File

@ -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;
}
}

View File

@ -4,7 +4,7 @@
<p id="quick_scroll">
Quick Scroll :
{% for folder in folders %}
{% if not loop.index0 %}
{% if loop.index0 %}
<a href="#{{ folder.name }}">{{ folder.name }}</a>
{% endif %}
{% endfor %}
@ -52,7 +52,7 @@
<i class="fa fa-search"></i>
</a>
<i>&nbsp;</i>
<a href="{{ url_for('admin_edit', id=link.id) }}">
<a href="{{ url_for('admin_edit', link_id=link.id) }}">
<i class="fa fa-pencil"></i>
</a>
<i>&nbsp;</i>

View File

@ -16,27 +16,27 @@
<nav class="navbar is-dark" role="navigation" aria-label="main navigation">
<div class="navbar-start">
<a class="navbar-item tooltip is-tooltip-bottom" data-tooltip="Home" href="{{ url_for('home') }}">
<a class="navbar-item tooltip has-tooltip-bottom" data-tooltip="Home" href="{{ url_for('home') }}">
𝛑 =^._.^= た
</a>
<a class="navbar-item tooltip is-tooltip-bottom" data-tooltip="Latest torrents" href="{{ url_for('latest') }}">
<a class="navbar-item tooltip has-tooltip-bottom" data-tooltip="Latest torrents" href="{{ url_for('latest') }}">
<i class="fa fa-newspaper-o"></i><i>&nbsp;</i><span class="is-hidden-mobile">Latest torrents</span>
</a>
<a class="navbar-item tooltip is-tooltip-bottom" data-tooltip="My seeded torrents"
<a class="navbar-item tooltip has-tooltip-bottom" data-tooltip="My seeded torrents"
href="{{ url_for('list_animes') }}">
<i class="fa fa-cloud-download"></i><i>&nbsp;</i><span class="is-hidden-mobile">My seeded torrents</span>
</a>
{% if request.args.get('q') %}
<a class="navbar-item tooltip is-tooltip-bottom" data-tooltip="TVDB"
<a class="navbar-item tooltip has-tooltip-bottom" data-tooltip="TVDB"
href="https://www.thetvdb.com/search?menu%5Btype%5D=TV&query={{ request.args.get('q') }}"
target="_blank">
<i class="fa fa-television"></i><i>&nbsp;</i><span class="is-hidden-mobile">TVDB</span>
</a>
<a class="navbar-item tooltip is-tooltip-bottom" data-tooltip="Nautiljon"
<a class="navbar-item tooltip has-tooltip-bottom" data-tooltip="Nautiljon"
href="https://www.nautiljon.com/search.php?q={{ request.args.get('q') }}" target="_blank">
<i class="fa fa-rss"></i><i>&nbsp;</i><span class="is-hidden-mobile">Nautiljon</span>
</a>
<a class="navbar-item tooltip is-tooltip-bottom" data-tooltip="Animes-Mangas-DDL"
<a class="navbar-item tooltip has-tooltip-bottom" data-tooltip="Animes-Mangas-DDL"
href="https://animemangaddl.com/?s={{ request.args.get('q') }}" target="_blank">
<i class="fa fa-adn"></i><i>&nbsp;</i><span class="is-hidden-mobile">A-M-DDL</span>
</a>

View File

@ -1,7 +1,7 @@
{% extends "layout.html" %}
{% block title %} - {{ request.args.get('q') }}{% endblock %}
{% block body %}
<table class="table is-bordered is-striped is-narrow is-fullwidth is-hoverable search">
<table class="table is-bordered is-striped is-narrow is-fullwidth is-hoverable">
<thead>
<tr>
<th>Name</th>