From 3707bcaf348e8b26aa693b957dbb8ca9c1e29f1c Mon Sep 17 00:00:00 2001 From: wzj <244142824@qq.com> Date: Tue, 24 Jun 2025 13:09:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- static/styles.css | 36 +++++++++++++++++++ templates/base.html | 45 ++++++++++++++++++++++++ templates/clients.html | 78 ++++++++++++++++++----------------------- templates/index.html | 68 +++++++++++------------------------ templates/settings.html | 77 +++++++++++++++------------------------- 5 files changed, 165 insertions(+), 139 deletions(-) create mode 100644 templates/base.html diff --git a/static/styles.css b/static/styles.css index a7dd7e7..f7d7213 100644 --- a/static/styles.css +++ b/static/styles.css @@ -1,4 +1,40 @@ /*s tyle.css */ +/* 导航栏样式 */ +.main-nav { + display: flex; + background-color: #2c3e50; + border-radius: 8px; + padding: 0 20px; + margin-bottom: 30px; +} + +.nav-link { + color: white; + text-decoration: none; + padding: 15px 20px; + transition: background-color 0.3s; +} + +.nav-link:hover { + background-color: #34495e; +} + +.nav-link.active { + background-color: #4285f4; + font-weight: bold; +} + +.nav-logout { + margin-left: auto; + align-self: center; + padding: 8px 16px; +} + +/* 内容区域 */ +.content { + min-height: 60vh; +} + body { font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif; max-width: 900px; diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..e98bb80 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,45 @@ + + + + + + {% block title %}Squid代理用户管理系统{% endblock %} + + + +
+ + + + +
+ {% block content %}{% endblock %} +
+ + + +
+ + + + + + {% block scripts %}{% endblock %} + + \ No newline at end of file diff --git a/templates/clients.html b/templates/clients.html index 240980a..eb3f312 100644 --- a/templates/clients.html +++ b/templates/clients.html @@ -1,50 +1,41 @@ - - - - - - 用户管理 - Squid代理用户管理系统 - - - -
-

用户管理

+ +{% extends "base.html" %} -
- - 返回首页 - -
+{% block title %}用户管理 - Squid代理用户管理系统{% endblock %} - - - - - - - {% for user in users %} - - - - - - {% endfor %} -
用户名状态操作
{{ user.name }}{{ "启用" if user.is_active else "禁用" }} -
- - - -
-
+{% block content %} +

用户管理

+
+ +
+ + + + + + + + {% for user in users %} + + + + + + {% endfor %} +
用户名状态操作
{{ user.name }}{{ "启用" if user.is_active else "禁用" }} +
+ + + +
+
-
- +{% endblock %} +{% block scripts %} - - \ No newline at end of file +{% endblock %} \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index ebf705c..7bd2c3e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,54 +1,28 @@ - - - - - - Squid代理用户管理系统 - - - -
-

Squid代理用户管理系统

+ +{% extends "base.html" %} -
-
-

用户数量

-

{{ user_count }}

-
+{% block title %}Squid代理用户管理系统{% endblock %} -
-

代理地址

-

{{ proxy_address }}:{{ proxy_port }}

-
+{% block content %} +

Squid代理用户管理系统

+ +
+
+

用户数量

+

{{ user_count }}

-
-

代理使用说明

-

1. 在浏览器或系统设置中配置代理服务器

-

2. 地址: {{ proxy_address }} 端口: {{ proxy_port }}

-

3. 使用格式: http://用户名:密码@{{ proxy_address }}:{{ proxy_port }}

-

4. 或者在PAC文件中配置: PROXY {{ proxy_address }}:{{ proxy_port }}

+
+

代理地址

+

{{ proxy_address }}:{{ proxy_port }}

- - - -
- 由 Flask 重构 - 基于原项目 ckazi -
- - - \ No newline at end of file +
+

代理使用说明

+

1. 在浏览器或系统设置中配置代理服务器

+

2. 地址: {{ proxy_address }} 端口: {{ proxy_port }}

+

3. 使用格式: http://用户名:密码@{{ proxy_address }}:{{ proxy_port }}

+

4. 或者在PAC文件中配置: PROXY {{ proxy_address }}:{{ proxy_port }}

+
+{% endblock %} \ No newline at end of file diff --git a/templates/settings.html b/templates/settings.html index 8a6a002..5af6aff 100644 --- a/templates/settings.html +++ b/templates/settings.html @@ -1,54 +1,33 @@ - - - - - - 系统设置 - Squid代理用户管理系统 - - - -
-

系统设置

+ +{% extends "base.html" %} -
- 返回首页 - +{% block title %}系统设置 - Squid代理用户管理系统{% endblock %} + +{% block content %} +

系统设置

+ +
+
+ +
- -
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
- -
- - 取消 -
-
-
- - - - \ No newline at end of file +
+ + 取消 +
+ +{% endblock %} \ No newline at end of file