From a3d046ee3f4c5e5e1df67f74312bd7fea7521978 Mon Sep 17 00:00:00 2001 From: Jui-Ch'i Lau <21096362+KurococLiu@users.noreply.github.com> Date: Wed, 1 Mar 2023 02:29:48 +0800 Subject: =?UTF-8?q?=F0=9F=93=B0=20Add:=20=E6=94=AF=E6=8C=81umami=E7=BB=9F?= =?UTF-8?q?=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + libs/Matcha.php | 4 ++++ libs/Options.php | 2 ++ 3 files changed, 7 insertions(+) diff --git a/README.md b/README.md index 587f7b8..26eefa3 100644 --- a/README.md +++ b/README.md @@ -88,6 +88,7 @@ Matcha 主题采用[语义化版本 2.0.0](https://semver.org/lang/zh-CN/) 标 [Fluidbox](http://terrymun.github.io/Fluidbox/demo/index.html) | [Throttle-Debounce](https://benalman.com/projects/jquery-throttle-debounce-plugin/) | [tocbot.js](https://tscanlin.github.io/tocbot/) +[umami](https://github.com/umami-software/umami) #### 矢量图 diff --git a/libs/Matcha.php b/libs/Matcha.php index b606840..2ab0978 100644 --- a/libs/Matcha.php +++ b/libs/Matcha.php @@ -393,6 +393,10 @@ class Matcha } //附加信息 if (Helper::options()->footerInfo!='') echo ''; + //umami + if (Helper::options()->umamiID!='') { + echo ''; + } } /** diff --git a/libs/Options.php b/libs/Options.php index ef12f80..935a7be 100644 --- a/libs/Options.php +++ b/libs/Options.php @@ -59,6 +59,8 @@ function themeConfig($form) { $form->addInput($icpNum); $startDate = new Typecho_Widget_Helper_Form_Element_Text('startDate', NULL, date('Y-m-d'), _t('网站建立日期'), _t('用于显示在页脚的版权信息,以及计算网站建立时长,格式为 Y-m-d')); $form->addInput($startDate); + $umamiID = new Typecho_Widget_Helper_Form_Element_Text('umamiID', NULL, NULL, _t('umami Website ID'), _t('在这里填入对应域名的 Umami Website ID(如 9caf0ded-6e8e-409c-9ds4-231fe253a8ac ),留空则不开启功能')); + $form->addInput($umamiID); /** * 进阶功能 -- cgit v1.2.3