From c279f62d020268b5d6986622fddf0171631c7eda Mon Sep 17 00:00:00 2001 From: hjdhnx Date: Tue, 6 Sep 2022 23:23:13 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E7=BE=8E=E5=8C=96=E5=B9=B6?= =?UTF-8?q?=E5=8D=87=E7=BA=A7=E4=BA=86=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- controllers/home.py | 4 +- js/version.txt | 2 +- readme.md | 1 + static/css/home.css | 77 +++++++++++++++++++++++ templates/index.html | 143 ++++++++++++++++++++++--------------------- 5 files changed, 156 insertions(+), 71 deletions(-) create mode 100644 static/css/home.css diff --git a/controllers/home.py b/controllers/home.py index 237c1fd..3ed6e58 100644 --- a/controllers/home.py +++ b/controllers/home.py @@ -17,6 +17,7 @@ from utils.system import cfg,getHost,is_linux from utils import parser from utils.log import logger from utils.files import getAlist,get_live_url +from utils.update import getLocalVer from js.rules import getJxs import random @@ -43,7 +44,8 @@ def index(): manager0 += f':{sup_port}' manager1 += f':{sup_port}' manager2 += f':{sup_port}' - return render_template('index.html',getHost=getHost,manager0=manager0,manager1=manager1,manager2=manager2,is_linux=is_linux()) + ver = getLocalVer() + return render_template('index.html',ver=ver,getHost=getHost,manager0=manager0,manager1=manager1,manager2=manager2,is_linux=is_linux()) @home.route('/rules/clear') def rules_to_clear(): diff --git a/js/version.txt b/js/version.txt index 0444f32..acf9bf0 100644 --- a/js/version.txt +++ b/js/version.txt @@ -1 +1 @@ -3.2.1 \ No newline at end of file +3.2.2 \ No newline at end of file diff --git a/readme.md b/readme.md index 12de5cf..281518d 100644 --- a/readme.md +++ b/readme.md @@ -55,6 +55,7 @@ - [X] 6.升级到3.2.0,进行了全面后端重构用了蓝图写法,app.py文件以后尽量不动 - [X] 7.后台管理界面显示美化-感谢蓝莓果酱 - [X] 8.打包升级后的三平台镜像(v3.2.1) +- [X] 9.首页美化,升级版本号(v3.2.2) ###### 2022/09/05 - [X] 1.内置jar修复了原本tv_box无法播放直播的问题 - [X] 2.重新构建了三种平台的镜像 amd64,armv7,arm64 diff --git a/static/css/home.css b/static/css/home.css new file mode 100644 index 0000000..888d824 --- /dev/null +++ b/static/css/home.css @@ -0,0 +1,77 @@ +body { + text-align: center; + margin: 0 auto; +} + +.title { + background-image: linear-gradient(to right, orange, purple); + -webkit-background-clip: text; + color: transparent; + font-size: 30px; + text-align: center; + line-height: height; +} + +.ver_title { + font-size: 15px; + padding-left: 5px +} +.image{ + width: 100%; + height: 100%; + position: relative; + /*position: fixed;*/ + text-align: center; + /*fixed center;*/ +} +.image::after{ + content: ""; + background:url('https://tuapi.eees.cc/api.php?category=dongman&type=302&px=m'); + background-repeat: no-repeat; + opacity: 0.5; + /*position: fixed;*/ + position: absolute; + left: 0; + top: 0; + right: 0; + bottom: 0; + z-index: -1; +} + +.btn { + margin-bottom: 1rem; + border: 1px solid #5fdefe; + width: 360px; + height: 30px; + text-align: center; + background-color: #1379cb; + color: #ffffff; + border-radius: 50px; + line-height: 30px; +} + +.btn1 { + margin-bottom: 1rem; + border: 1px solid #5c6cf6; + width: 360px; + height: 30px; + text-align: center; + border-radius: 50px; + line-height: 30px; +} +.btn1 a { + color: #000000; +} +.btn a { + color: #ffffff; +} + +a { + text-decoration: none; + text-align: center; + line-height: 30px; +} + +.jyw { + margin-bottom: 5rem; +} \ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 799764c..af9966e 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,88 +1,93 @@ - + - + dr_py首页 - + + - - + + + +
-

欢迎使用drpy项目

+

欢迎使用DR-PY首页界面
当前版本: {{ver}}框架开发:道长框架美化:蓝莓
+

可以简单的自定义爬虫实现cms数据接口

+
+
+ + + + + + + {% if is_linux %} + + {% endif %} + + {% if '192.168' in getHost(1) %} + + {% if is_linux %} + + {% endif %} + + {% endif %} + + {% if is_linux %} + + {% endif %} - - - - - - - -{% if is_linux %} - -{% endif %} - -局域网:{{ getHost(1) }} -{% if '192.168' in getHost(1) %} - -{% if is_linux %} - -{% endif %} - -{% endif %} - -{% if is_linux %} - -{% endif %} - +
\ No newline at end of file -- GitLab