From 4e59384b569246180b7dcc5521e0022ec971b50d Mon Sep 17 00:00:00 2001 From: wzj <244142824@qq.com> Date: Wed, 9 Jul 2025 09:59:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=A6=96=E9=A1=B5=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E3=80=81=E7=99=BB=E9=99=86=E9=A1=B5=E9=9D=A2=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/index.html | 54 ++++++++-------- templates/login.html | 147 +++++++++++++++++++++++++++++++++++++------ 2 files changed, 158 insertions(+), 43 deletions(-) diff --git a/templates/index.html b/templates/index.html index 6e5eef1..e2afee9 100644 --- a/templates/index.html +++ b/templates/index.html @@ -797,7 +797,10 @@ body.dark-theme .secondary-filters-container::after { border-top: 1px solid #eee; text-align: center; color: #777; - width: 100%; + width: 102%; + margin-left: -13px; + margin-right: -20px; + box-sizing: border-box; } @@ -830,6 +833,7 @@ body.dark-theme .secondary-filters-container::after { 加载中... +
@@ -1446,31 +1450,31 @@ body.dark-theme .secondary-filters-container::after { } else { // 如果未登录,先检查本地存储 const localSettings = localStorage.getItem('navSettings'); - if (localSettings) { - const localSettingsObj = JSON.parse(localSettings); - // 从本地存储加载主题和卡片样式 - settings.theme = localSettingsObj.theme || guestSettings.theme; - settings.card_style = localSettingsObj.card_style || guestSettings.card_style; - settings.search_history = localSettingsObj.search_history || []; - } else { - // 首次访问,使用接口返回的默认配置 - settings.theme = guestSettings.theme; - settings.card_style = guestSettings.card_style; - } - - // 设置背景图片(始终使用服务器配置) - const lightBg = guestSettings.bg_image === 'none' ? 'none' : - (guestSettings.bg_image || '/static/background_light.jpg'); - const darkBg = guestSettings.dark_bg_image === 'none' ? 'none' : - (guestSettings.dark_bg_image || '/static/background_dark.jpg'); - - setBackgroundImages(lightBg, darkBg); - } - - applySettings(); - } catch (error) { - console.error('加载设置失败:', error); + if (localSettings) { + const localSettingsObj = JSON.parse(localSettings); + // 从本地存储加载主题和卡片样式 + settings.theme = localSettingsObj.theme || guestSettings.theme; + settings.card_style = localSettingsObj.card_style || guestSettings.card_style; + settings.search_history = localSettingsObj.search_history || []; + } else { + // 首次访问,使用接口返回的默认配置 + settings.theme = guestSettings.theme; + settings.card_style = guestSettings.card_style; } + + // 设置背景图片(始终使用服务器配置) + const lightBg = guestSettings.bg_image === 'none' ? 'none' : + (guestSettings.bg_image || '/static/background_light.jpg'); + const darkBg = guestSettings.dark_bg_image === 'none' ? 'none' : + (guestSettings.dark_bg_image || '/static/background_dark.jpg'); + + setBackgroundImages(lightBg, darkBg); + } + + applySettings(); +} catch (error) { + console.error('加载设置失败:', error); +} } // 设置背景图片 diff --git a/templates/login.html b/templates/login.html index df34238..cf51656 100644 --- a/templates/login.html +++ b/templates/login.html @@ -3,32 +3,128 @@ - 登录 + 应用导航系统 - 登录 @@ -40,30 +136,45 @@ {% with messages = get_flashed_messages(with_categories=true) %} {% if messages %} {% for category, message in messages %} -
{{ message }}
+ {% endfor %} {% endif %} {% endwith %}
-
+
- +
-
+
- +
-
+
- - + +
- +
+ + + \ No newline at end of file