diff options
| author | Fuwn <[email protected]> | 2023-07-25 17:43:51 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-07-25 17:43:51 -0700 |
| commit | a708659689c301d2d7af1c1ae85db3ccc72ce3e1 (patch) | |
| tree | 268ef1b2a48aa3ea3529c5bc7001b08d3e0ae509 /src | |
| parent | feat(html): return to home shortcut (diff) | |
| download | old.due.moe-a708659689c301d2d7af1c1ae85db3ccc72ce3e1.tar.xz old.due.moe-a708659689c301d2d7af1c1ae85db3ccc72ce3e1.zip | |
feat(index): hide manga by default
Diffstat (limited to 'src')
| -rw-r--r-- | src/due/routes/index.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/due/routes/index.py b/src/due/routes/index.py index e9e355c..4e5042c 100644 --- a/src/due/routes/index.py +++ b/src/due/routes/index.py @@ -11,10 +11,10 @@ bp = Blueprint("index", __name__) @bp.route("/") def home(): response = make_response("") - disable_manga = False + disable_manga = True - if request.args.get("hide_manga") is not None: - disable_manga = True + if request.args.get("show_manga") is not None: + disable_manga = False if request.args.get("hide_message") is not None: if request.cookies.get("hide_message") is None: @@ -59,7 +59,7 @@ def home(): (anime_html, anime_length) = anime_to_html(releasing_outdated_anime) anime_time = time.time() - start start = time.time() - manga_body = "" + manga_body = '<a href="/?show_manga">Show manga</a>' if not disable_manga: (current_manga, _) = create_collection(anilist, "MANGA") @@ -81,7 +81,7 @@ def home(): <p></p> <details closed> - <summary>Manga [{manga_length}] <small style="opacity: 50%">{round(manga_time, 2)}s</small> <a href="/?hide_manga">Hide temporarily</a></summary> + <summary>Manga [{manga_length}] <small style="opacity: 50%">{round(manga_time, 2)}s</small></summary> {manga_html} </details> """ |