#!/usr/bin/env python3 """Shared inline page templates for ani-cli-web.""" PAGE_LINKS = ( ("search", "Search", "/"), ("config", "Config", "/config"), ("watchlist", "Watchlist", "/watchlist"), ) def render_sidebar_brand(note, badge, badge_id=""): badge_attr = f' id="{badge_id}"' if badge_id else "" return ( '
\n' '
\n' '

ani-cli web

\n' f"

{note}

\n" "
\n" f" {badge}\n" "
\n" ) def render_page_links(active_page): links = [] for key, label, href in PAGE_LINKS: class_name = "page-link active" if key == active_page else "page-link" links.append(f' {label}') return "
\n" + "\n".join(links) + "\n
\n" INDEX_HTML = r""" ani-cli web

Select a result

Episodes will appear here.

Download queue

""" CONFIG_HTML = r""" ani-cli web - config

Defaults

Manage the folder, mode, and quality that the Search page starts with.

Tip: these are the saved defaults only. The active search form can still be adjusted per download.
""" WATCHLIST_HTML = r""" ani-cli web - watchlist

Tracked shows

Compact cards with local AnimeSchedule cover caching when artwork is available.

0 Tracked shows
0 Sub episodes
0 Dub episodes

Watchlist library

Compact poster grid for faster scanning.

"""