summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rw-r--r--cleanthat.yaml15
-rw-r--r--includes/head.php2
-rw-r--r--libs/Matcha.php11
-rw-r--r--libs/Options.php2
5 files changed, 30 insertions, 3 deletions
diff --git a/README.md b/README.md
index 4046411..26eefa3 100644
--- a/README.md
+++ b/README.md
@@ -72,7 +72,7 @@ Matcha 主题采用[语义化版本 2.0.0](https://semver.org/lang/zh-CN/) 标å‡
- [BracketDown](https://github.com/BigCoke233/typecho-plugin-BracketDown):语法拓展插件,如果想要在文章里使用短代码就需要安装这个插件
- [CopyDog](https://github.com/BigCoke233/typecho-plugin-CopyDog):版权狗插件,可以在文章末尾生成一个显示版权信息的卡片
- [ExSearch](https://github.com/AlanDecode/Typecho-Plugin-ExSearch):搜索增强插件 _1.2.0-beta.1 及以后版本支持_
-- [WordsCounter](https://github.com/elatisy/Typecho_WordsCounter):字数统计插件,可以统计全站的字数
+- [WordsCounter](https://github.com/KurococLiu/Typecho_WordsCounter):字数统计插件,可以统计全站的字数 _为Matcha重新微调的版本_
## 鸣谢
@@ -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/cleanthat.yaml b/cleanthat.yaml
new file mode 100644
index 0000000..85a6f9f
--- /dev/null
+++ b/cleanthat.yaml
@@ -0,0 +1,15 @@
+syntax_version: "2021-08-02"
+meta:
+ labels:
+ - "cleanthat"
+ refs:
+ branches:
+ - "refs/heads/develop"
+ - "refs/heads/main"
+ - "refs/heads/master"
+source_code:
+ excludes: []
+ includes: []
+ encoding: "UTF-8"
+ line_ending: "UNKNOWN"
+languages: []
diff --git a/includes/head.php b/includes/head.php
index ccadbf9..d90791c 100644
--- a/includes/head.php
+++ b/includes/head.php
@@ -1,6 +1,6 @@
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<!DOCTYPE HTML>
-<html lang="zh-cmn-Hans-CN">
+<html lang="zh-cmn-Hans-CN-Latn-pinyin">
<head>
<meta charset="<?php $this->options->charset(); ?>">
<!-- IE 8浏览器的页面渲染方式 & 默认使用极速内核:针对国内浏览器产商 -->
diff --git a/libs/Matcha.php b/libs/Matcha.php
index 6ae4fb9..047150a 100644
--- a/libs/Matcha.php
+++ b/libs/Matcha.php
@@ -389,9 +389,14 @@ class Matcha
*/
static public function footerInfo()
{
- echo '<br />';
+ //ICP备案号
+ if (Helper::options()->icpNum!='') {
+ echo '<br />';
+ echo '<a rel="nofollow" href="http://beian.miit.gov.cn"> '.Helper::options()->icpNum.' </a>';
+ }
//字数统计
if (Helper::options()->EnableWordsCounter=='able') {
+ echo '<br />';
echo '书写了 ';
WordsCounter_Plugin::allOfCharacters();
echo ' 字';
@@ -405,6 +410,10 @@ class Matcha
}
//附加信息
if (Helper::options()->footerInfo!='') echo '<div class="footer-info">'.Helper::options()->footerInfo.'</div>';
+ //umami
+ if (Helper::options()->umamiID!='') {
+ echo '<script async defer src="https://analytics.umami.is/script.js" data-website-id="'.Helper::options()->umamiID.'"></script>';
+ }
}
/**
diff --git a/libs/Options.php b/libs/Options.php
index 3f9964d..bacfe6c 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('在这里填入对应域名的 <a rel="nofollow" target="_blank" href="https://cloud.umami.is/">Umami</a> Website ID(如 <code>9caf0ded-6e8e-409c-9ds4-231fe253a8ac</code> ),留空则不开启功能'));
+ $form->addInput($umamiID);
/**
* 进阶功能