From e79536baae1cc05c4d35d2760654a67c2be6e863 Mon Sep 17 00:00:00 2001 From: shy Date: Sun, 19 Nov 2023 23:19:44 +0800 Subject: [PATCH] add mp/theme.json --- index.css | 2 +- publish/client/mp/app.js | 2 +- publish/client/mp/app.json | 13 +++--- publish/client/mp/app.wxml | 16 +++++--- publish/client/mp/app.wxss | 48 ++++++++++++++-------- publish/client/mp/pages/action/action.js | 43 +++++++++++-------- publish/client/mp/pages/action/action.wxml | 1 + publish/client/mp/pages/insert/insert.wxml | 1 + publish/client/mp/pages/river/river.js | 6 ++- publish/client/mp/pages/river/river.wxml | 1 + publish/client/mp/theme.json | 27 ++++++++++++ publish/client/mp/utils/const.js | 2 + publish/client/mp/utils/lib/base.js | 6 +++ publish/client/mp/utils/lib/misc.js | 21 +++++++--- publish/client/mp/utils/lib/page.js | 1 + publish/client/mp/utils/lib/user.js | 33 +++++++++++++-- publish/client/mp/utils/proto.js | 10 +++-- 17 files changed, 173 insertions(+), 60 deletions(-) create mode 100644 publish/client/mp/theme.json diff --git a/index.css b/index.css index d2e7ad84..86ea352b 100644 --- a/index.css +++ b/index.css @@ -65,7 +65,7 @@ table.content.full { width:100%; } table.content thead { position:sticky; top:2px; } table.content tr.offline { color:var(--disable-fg-color); } table.content tr.offline a { color:var(--disable-fg-color); } -table.content th { padding:5px; box-shadow: var(--box-shadow); } +table.content th { padding:5px; box-shadow:var(--box-shadow); } table.content td { padding:5px; } table.content.detail td:first-child { width:80px; } table.content.action th:last-child { position:sticky; right:2px; } diff --git a/publish/client/mp/app.js b/publish/client/mp/app.js index 4fae87cf..22e3676e 100644 --- a/publish/client/mp/app.js +++ b/publish/client/mp/app.js @@ -5,7 +5,7 @@ const page = require("utils/lib/page.js") const user = require("utils/lib/user.js") App({ - data: {}, conf: {serve: "https://2021.shylinux.com"}, + data: {}, conf: {serve: "https://2021.shylinux.com", appid: "wxf4e5104d83476ed6"}, base: base, core: core, misc: misc, page: page, user: user, onLaunch: function() { console.log("app load", this.conf) }, }) diff --git a/publish/client/mp/app.json b/publish/client/mp/app.json index b5af881e..f9f1b7a8 100644 --- a/publish/client/mp/app.json +++ b/publish/client/mp/app.json @@ -5,12 +5,15 @@ "pages/insert/insert" ], "window": { - "backgroundColor": "#000", - "backgroundTextStyle": "dark", - "navigationBarBackgroundColor": "#000", - "navigationBarTitleText": "终端工具链", - "navigationBarTextStyle": "white" + "navigationBarBackgroundColor": "@navBgColor", + "navigationBarTextStyle": "@navTxtStyle", + "backgroundColor": "@bgColor", + "backgroundTextStyle": "@bgTxtStyle", + "backgroundColorTop": "@bgColorTop", + "backgroundColorBottom": "@bgColorBottom" }, "style": "v2", + "darkmode": true, + "themeLocation": "theme.json", "sitemapLocation": "sitemap.json" } diff --git a/publish/client/mp/app.wxml b/publish/client/mp/app.wxml index 24943871..1f43ba0b 100644 --- a/publish/client/mp/app.wxml +++ b/publish/client/mp/app.wxml @@ -1,11 +1,17 @@ + +