This commit is contained in:
Michel Roux 2023-01-02 00:44:48 +01:00
parent 660f1732ce
commit 0d8dd65028
5 changed files with 29 additions and 16 deletions

View File

@ -1,3 +1,4 @@
from datetime import datetime
from secrets import token_hex from secrets import token_hex
from flask import Flask, render_template from flask import Flask, render_template
@ -11,6 +12,11 @@ app.config["SECRET_KEY"] = token_hex()
@app.context_processor @app.context_processor
def utility_processor(): def utility_processor():
current_date = datetime.now()
next_year = current_date.year + 5 - (current_date.year % 5)
print(next_year)
return dict(_=i18n, current_lang=current_lang(), search_form=SearchForm()) return dict(_=i18n, current_lang=current_lang(), search_form=SearchForm())

View File

@ -0,0 +1,6 @@
from pynyaata.bridge.animeultime import AnimeUltime
from pynyaata.bridge.nyaa import EraiRaws, Nyaa
from pynyaata.bridge.yggtorrent import YggAnimation, YggTorrent
BRIDGES = [Nyaa(), EraiRaws(), YggTorrent(), YggAnimation(), AnimeUltime()]

View File

@ -1,3 +0,0 @@
.has-addons .button {
border-left: 0
}

View File

@ -1,5 +1,8 @@
{% extends "layout.html.j2" %} {% extends "layout.html.j2" %}
{% block body %} {% block body %}
<section class="hero is-fullheight-with-navbar">
<div class="hero-body m-auto">
<p class="title">{{ _("π😼た") }}</p>
</div>
</section>
{% endblock body %} {% endblock body %}

View File

@ -23,28 +23,29 @@
<body> <body>
<nav class="navbar" role="navigation" aria-label="main navigation"> <nav class="navbar" role="navigation" aria-label="main navigation">
<div class="navbar-brand"> <div class="navbar-brand">
<a class="navbar-item" href="{{ url_for('index') }}">{{ _("😼た") }}</a> <a class="navbar-item" href="{{ url_for('index') }}">{{ _("π😼た") }}</a>
</div> </div>
<div class="navbar-start"> <div class="navbar-start">
{% block links %} {% block links %}
{% endblock links %} {% endblock links %}
</div> </div>
<div class="navbar-end"> <div class="navbar-end">
<form action="{{ url_for('index') }}" class="navbar-item"> {% if request.endpoint != "index" %}
<div class="field has-addons"> <form action="{{ url_for('index') }}" class="navbar-item">
<div class="control"> <div class="control has-icons-right">
{{ search_form.q(placeholder=_("Search animes ..."), class="input", value=request.args.get("q", "")) }} {{ search_form.q(placeholder=_("Search animes ..."), class="input is-rounded", value=request.args.get("q", "")) }}
</div> <span class="icon is-small is-right">
<div class="control">
<button type="submit" class="button">
<i class="fa fa-search"></i> <i class="fa fa-search"></i>
</button> </span>
</div> </div>
</div> </form>
</form> {% endif %}
</div> </div>
</nav> </nav>
{% block body %} {% block body %}
{% endblock body %} {% endblock body %}
<footer>
lol
</footer>
</body> </body>
</html> </html>