Skip to content

Commit

Permalink
✨ 支持自定义 Header & Footer.
Browse files Browse the repository at this point in the history
  • Loading branch information
ZoharWang committed Feb 6, 2018
1 parent 5adff0e commit 92d4052
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,8 @@
</section>
<script src="<?php $this->options->themeUrl('highlight.js'); ?>"></script>
<script>hljs.initHighlightingOnLoad();</script>
<?php $this->footer(); ?>
<?php $this->options->footer(); ?>

</body>
</html>
6 changes: 6 additions & 0 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,10 @@ function themeConfig($form) {

$icpNumber = new Typecho_Widget_Helper_Form_Element_Text('icpNumber', NULL, NULL, _t('ICP 备案许可证号'), _t('在这里填入一个 ICP 备案许可证号, 留空则不显示.'));
$form->addInput($icpNumber);

$header = new Typecho_Widget_Helper_Form_Element_Textarea('header', NULL, NULL, _t('自定义 Header'), _t('在这里填入自定义 Header, 如自定义 CSS 样式等.'));
$form->addInput($header);

$footer = new Typecho_Widget_Helper_Form_Element_Textarea('footer', NULL, NULL, _t('自定义 Footer'), _t('在这里填入自定义 Footer, 如自定义 JavaScript 脚本等.'));
$form->addInput($footer);
}
1 change: 1 addition & 0 deletions header.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<link rel="stylesheet" href="<?php $this->options->themeUrl('style.css'); ?>">
<link rel="stylesheet" href="<?php $this->options->themeUrl('highlight.css'); ?>">
<?php $this->header(); ?>
<?php $this->options->header(); ?>

</head>
<body>
Expand Down

0 comments on commit 92d4052

Please sign in to comment.