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 flask import Flask, render_template
@ -11,6 +12,11 @@ app.config["SECRET_KEY"] = token_hex()
@app.context_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())

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" %}
{% block body %}
<section class="hero is-fullheight-with-navbar">
<div class="hero-body m-auto">
<p class="title">{{ _("π😼た") }}</p>
</div>
</section>
{% endblock body %}

View File

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