Remove leftover theme detection now that the site is dark only.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Artemii Peretiachenko 2026-09-23 20:29:21 +02:00
parent b42b03f7a6
commit 8dac694a3c
2 changed files with 0 additions and 15 deletions

View file

@ -272,17 +272,6 @@ LANG_REDIRECT_SCRIPT = r"""<script>
</script>""" </script>"""
THEME_SCRIPT = """<script>
(function () {
var saved = localStorage.getItem('theme');
var theme = (saved === 'light' || saved === 'dark')
? saved
: (window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');
document.documentElement.setAttribute('data-theme', theme);
})();
</script>"""
def home_href(locale: dict) -> str: def home_href(locale: dict) -> str:
return f"{locale['prefix']}/" if locale["prefix"] else "/" return f"{locale['prefix']}/" if locale["prefix"] else "/"
@ -300,7 +289,6 @@ def build_page(locale: dict, page: dict, translations: dict, template: str) -> s
html = html.replace("{{HTML_LANG}}", locale["html_lang"]) html = html.replace("{{HTML_LANG}}", locale["html_lang"])
html = html.replace("{{PAGE_LANG}}", locale["id"]) html = html.replace("{{PAGE_LANG}}", locale["id"])
html = html.replace("{{HEAD_META}}", head_meta(locale, page, translations)) html = html.replace("{{HEAD_META}}", head_meta(locale, page, translations))
html = html.replace("{{THEME_SCRIPT}}", THEME_SCRIPT)
html = html.replace("{{LANG_REDIRECT_SCRIPT}}", LANG_REDIRECT_SCRIPT) html = html.replace("{{LANG_REDIRECT_SCRIPT}}", LANG_REDIRECT_SCRIPT)
html = html.replace("{{HOME_HREF}}", home_href(locale)) html = html.replace("{{HOME_HREF}}", home_href(locale))
html = html.replace("{{TERMINAL_HREF}}", terminal_href(locale)) html = html.replace("{{TERMINAL_HREF}}", terminal_href(locale))

View file

@ -123,7 +123,6 @@
"form.statusLoading": "...", "form.statusLoading": "...",
"form.statusSuccess": "Отправлено ✓", "form.statusSuccess": "Отправлено ✓",
"form.statusError": "Не удалось отправить. Попробуйте ещё раз.", "form.statusError": "Не удалось отправить. Попробуйте ещё раз.",
"a11y.toggleTheme": "Переключить тему",
"a11y.sections": "Разделы", "a11y.sections": "Разделы",
"terminal.meta.title": "428th Terminal — автотрейдинг по TradingView сигналам", "terminal.meta.title": "428th Terminal — автотрейдинг по TradingView сигналам",
"terminal.meta.description": "428th Terminal — автотрейдинг по сигналам TradingView на BingX, Bybit и MEXC. Автоматическое открытие позиций со стопом и тейком.", "terminal.meta.description": "428th Terminal — автотрейдинг по сигналам TradingView на BingX, Bybit и MEXC. Автоматическое открытие позиций со стопом и тейком.",
@ -289,7 +288,6 @@
"form.statusLoading": "...", "form.statusLoading": "...",
"form.statusSuccess": "Надіслано ✓", "form.statusSuccess": "Надіслано ✓",
"form.statusError": "Не вдалося надіслати. Спробуйте ще раз.", "form.statusError": "Не вдалося надіслати. Спробуйте ще раз.",
"a11y.toggleTheme": "Перемкнути тему",
"a11y.sections": "Розділи", "a11y.sections": "Розділи",
"terminal.meta.title": "428th Terminal — автотрейдинг за сигналами TradingView", "terminal.meta.title": "428th Terminal — автотрейдинг за сигналами TradingView",
"terminal.meta.description": "428th Terminal — автотрейдинг за сигналами TradingView на BingX, Bybit і MEXC. Автоматичне відкриття позицій зі стопом і тейком.", "terminal.meta.description": "428th Terminal — автотрейдинг за сигналами TradingView на BingX, Bybit і MEXC. Автоматичне відкриття позицій зі стопом і тейком.",
@ -455,7 +453,6 @@
"form.statusLoading": "...", "form.statusLoading": "...",
"form.statusSuccess": "Sent ✓", "form.statusSuccess": "Sent ✓",
"form.statusError": "Could not send. Please try again.", "form.statusError": "Could not send. Please try again.",
"a11y.toggleTheme": "Toggle theme",
"a11y.sections": "Sections", "a11y.sections": "Sections",
"terminal.meta.title": "428th Terminal — auto trading via TradingView signals", "terminal.meta.title": "428th Terminal — auto trading via TradingView signals",
"terminal.meta.description": "428th Terminal — auto-trading via TradingView signals on BingX, Bybit and MEXC. Positions open automatically with stop-loss and take-profit.", "terminal.meta.description": "428th Terminal — auto-trading via TradingView signals on BingX, Bybit and MEXC. Positions open automatically with stop-loss and take-profit.",