summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEltrac <hi@guhub.cn>2023-06-21 17:38:54 +0800
committerGitHub <noreply@github.com>2023-06-21 17:38:54 +0800
commit0eebc62ab6f25acfb9a384cd963da2cf18522180 (patch)
treeab738de9d38766e9f4d38b531382b9c552ad9c90
parent845cbc0509448f7a5c625db1f5cfa7ff04d00613 (diff)
parent18a7e01e4327d3e3ad639b5173f77feb79a876da (diff)
Merge pull request #32 from 1989car/main
增加公安备案号设置
-rw-r--r--assets/matcha/matcha.page.css4
-rw-r--r--libs/Matcha.php7
-rw-r--r--libs/Options.php4
3 files changed, 12 insertions, 3 deletions
diff --git a/assets/matcha/matcha.page.css b/assets/matcha/matcha.page.css
index d6a0d84..c5dfcaa 100644
--- a/assets/matcha/matcha.page.css
+++ b/assets/matcha/matcha.page.css
@@ -126,7 +126,7 @@
}
#footer {
- padding: 2em 0;
+ padding: 1em 0;
line-height: 1.5;
text-align: center;
color: var(--text-gray);
@@ -628,4 +628,4 @@
.section-title:first-child {
margin-top: 0
-} \ No newline at end of file
+}
diff --git a/libs/Matcha.php b/libs/Matcha.php
index aa4e71c..772b3c1 100644
--- a/libs/Matcha.php
+++ b/libs/Matcha.php
@@ -394,6 +394,11 @@ class Matcha
echo '<br />';
echo '<a rel="nofollow" href="http://beian.miit.gov.cn"> '.Helper::options()->icpNum.' </a>';
}
+ //公安备案号
+ if (Helper::options()->policeNum!='') {
+ echo ' | ';
+ echo '<a target="_blank" rel="nofollow" href="'.Helper::options()->policeUrl.'">'.Helper::options()->policeNum.'<img src="/police.png" /></a>';
+ }
//字数统计
if (Helper::options()->EnableWordsCounter=='able') {
echo '<br />';
@@ -649,4 +654,4 @@ class Matcha
}
return false;
}
-} \ No newline at end of file
+}
diff --git a/libs/Options.php b/libs/Options.php
index 5caae6d..d8394df 100644
--- a/libs/Options.php
+++ b/libs/Options.php
@@ -57,6 +57,10 @@ function themeConfig($form) {
$icpNum = new Typecho_Widget_Helper_Form_Element_Text('icpNum', NULL, NULL, _t('网站备案号'), _t('在这里填入中国大陆的ICP网站备案号(无需带a标签,如 <code>浙ICP备19006255号-1</code> ),留空则不显示'));
$form->addInput($icpNum);
+ $policeNum = new Typecho_Widget_Helper_Form_Element_Text('policeNum', NULL, NULL, _t('公安备案号'), _t('在这里填入中国大陆的公安网站备案号(无需带a标签,如 <code>京公网安备11010102002019号</code> ),留空则不显示'));
+ $form->addInput($policeNum);
+ $policeUrl = new Typecho_Widget_Helper_Form_Element_Text('policeUrl', NULL, NULL, _t('公安备案号链接地址'), _t('在这里填入中国大陆的公安网站备案号链接地址(无需带a标签,如 <code>http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=11010102002019</code> ),留空则不显示'));
+ $form->addInput($policeUrl);
$startDate = new Typecho_Widget_Helper_Form_Element_Text('startDate', NULL, date('Y-m-d'), _t('网站建立日期'), _t('用于显示在页脚的版权信息,以及计算网站建立时长,格式为 Y-m-d'));
$form->addInput($startDate);
$umamiURL = new Typecho_Widget_Helper_Form_Element_Text('umamiURL', NULL, NULL, _t('umami Website URL'), _t('在这里填入对应域名的 <a rel="nofollow" target="_blank" href="https://cloud.umami.is/">Umami</a> Track URL(如 <code>https://analytics.umami.is/script.js</code> ),留空则不开启功能'));