Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify static font #103

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions components/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,16 @@
</nav>
</div>
<p id="footer-meta" class="clear">
<span class="left"><a class="icp" href="<?php $this->options->icpUrl(); ?>" rel="noopener noreferrer"><?php echo G::getICP(); ?></a></span>
<span class="right"><?php echo $this->options->buildYear . " - " . date("Y"); ?> &copy <?php $this->options->title(); ?></span>

<span class="left">
<a class="icp" href="<?php $this->options->icpUrl(); ?>" rel="noopener noreferrer"><?php echo G::getICP(); ?></a>
<br>
<p class="recordcode">
<a class="icon-police"><img src="/usr/themes/G-master/static/img/jinghui.png" /></a>
<a class="beian" href="<?php $this->options->beianUrl(); ?>" rel="noopener noreferrer"><?php echo G::getBeiAn(); ?></a>
<span class="right"><?php echo $this->options->buildYear . " - " . date("Y"); ?> &copy <?php $this->options->title(); ?></span>
</p>
</span>
</p>
</footer>
</div>
Expand Down
6 changes: 6 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,12 @@ function themeConfig($form)
$icpUrl = new Typecho_Widget_Helper_Form_Element_Text('icpUrl', null, 'https://beian.miit.gov.cn', _t('备案号指向链接'), _t('默认指向工信部'));
$form->addInput($icpUrl);

$beian = new Typecho_Widget_Helper_Form_Element_Text('beian', null, null, _t('公安备案号'), _t('没有可以不填哟'));
$form->addInput($beian);

$beianUrl = new Typecho_Widget_Helper_Form_Element_Text('beianUrl', null, 'http://www.beian.gov.cn', _t('公安备案号指向链接'), _t('默认指向公安部'));
$form->addInput($beianUrl);

$background = new Typecho_Widget_Helper_Form_Element_Text('background', null, null, _t('背景图片'), _t('可填颜色代码或者图片url'));
$form->addInput($background);

Expand Down
17 changes: 17 additions & 0 deletions libs/G.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class G
'defaultBanner' => '',
'buildYear' => '',
'icp' => '',
'beian' => '',
'defaultArticlePath' => '',
'enableIndexPage' => '',
'advanceSetting' => '',
Expand Down Expand Up @@ -186,6 +187,22 @@ public static function getICP()
return '还没有备案噢';
}

/**
* 获取公安备案号
*
* @return String
*/
public static function getBeiAn()
{
if (Helper::options()->beian != '')
return Helper::options()->beian;
if (isset(self::$advanceConfig["customBeiAn"]))
return self::$advanceConfig["customBeiAn"];
return '还没有备案噢';
}



/**
* 获取赞助按钮文字
*
Expand Down
Binary file added static/font/苹方黑体-纤细-简.ttf
Binary file not shown.
Binary file added static/img/jinghui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.