-
Notifications
You must be signed in to change notification settings - Fork 615
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e66276
commit 8af851f
Showing
8 changed files
with
30 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* 核心函数 | ||
* @author Seaton Jiang <[email protected]> | ||
* @license MIT License | ||
* @version 2021.03.11 | ||
* @version 2021.05.18 | ||
*/ | ||
|
||
if (kratos_option('g_cdn', false)) { | ||
|
@@ -73,6 +73,7 @@ function theme_autoload() | |
wp_enqueue_script('jquery', ASSET_PATH . '/assets/js/jquery.min.js', array(), '3.4.1', false); | ||
wp_enqueue_script('bootstrap-bundle', ASSET_PATH . '/assets/js/bootstrap.bundle.min.js', array(), '4.5.0', true); | ||
wp_enqueue_script('layer', ASSET_PATH . '/assets/js/layer.min.js', array(), '3.1.1', true); | ||
wp_enqueue_script('sticky', ASSET_PATH . '/assets/js/theia-sticky-sidebar.min.js', array(), '1.5.0', true); | ||
wp_enqueue_script('kratos', ASSET_PATH . '/assets/js/kratos.min.js', array(), THEME_VERSION, true); | ||
wp_enqueue_script('custom', get_template_directory_uri() . '/custom/custom.js', array(), THEME_VERSION, true); | ||
|
||
|
@@ -84,7 +85,8 @@ function theme_autoload() | |
'repeat' => __('您已经赞过了', 'kratos'), | ||
'thanks' => __('感谢您的支持', 'kratos'), | ||
'donate' => __('打赏作者', 'kratos'), | ||
'scan' => __('扫码支付', 'kratos'), | ||
'scan' => __('扫码支付', 'kratos'), | ||
'sticky' => kratos_option('g_sticky', false), | ||
); | ||
wp_localize_script('kratos', 'kratos', $data); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* 主题选项 | ||
* @author Seaton Jiang <[email protected]> | ||
* @license MIT License | ||
* @version 2021.04.15 | ||
* @version 2021.05.18 | ||
*/ | ||
|
||
function getrobots() | ||
|
@@ -111,6 +111,14 @@ function kratos_options() | |
'type' => 'checkbox', | ||
); | ||
|
||
$options[] = array( | ||
'name' => __('侧边栏随动', 'kratos'), | ||
'desc' => __('开启小工具侧边栏随动功能', 'kratos'), | ||
'std' => '0', | ||
'id' => 'g_sticky', | ||
'type' => 'checkbox', | ||
); | ||
|
||
$options[] = array( | ||
'name' => __('搜索增强', 'kratos'), | ||
'desc' => __('仅查找文章标题,而不全文搜索(适用于文章数量较多的站点)', 'kratos'), | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* 首页模板 | ||
* @author Seaton Jiang <[email protected]> | ||
* @license MIT License | ||
* @version 2020.04.12 | ||
* @version 2021.05.18 | ||
*/ | ||
|
||
get_header(); ?> | ||
|
@@ -40,7 +40,7 @@ | |
pagelist(); | ||
wp_reset_query(); ?> | ||
</div> | ||
<div class="col-lg-4 sidebar d-none d-lg-block"> | ||
<div class="col-lg-4 sidebar sticky-sidebar d-none d-lg-block"> | ||
<?php dynamic_sidebar('sidebar_tool'); ?> | ||
</div> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* 页面模板 | ||
* @author Seaton Jiang <[email protected]> | ||
* @license MIT License | ||
* @version 2020.03.14 | ||
* @version 2021.05.18 | ||
*/ | ||
|
||
get_header(); ?> | ||
|
@@ -51,7 +51,7 @@ | |
<?php endif; ?> | ||
<?php comments_template(); ?> | ||
</div> | ||
<div class="col-lg-4 sidebar d-none d-lg-block"> | ||
<div class="col-lg-4 sidebar sticky-sidebar d-none d-lg-block"> | ||
<?php dynamic_sidebar('sidebar_tool'); ?> | ||
</div> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
* 文章内容 | ||
* @author Seaton Jiang <[email protected]> | ||
* @license MIT License | ||
* @version 2021.03.20 | ||
* @version 2021.05.18 | ||
*/ | ||
|
||
get_header(); | ||
|
@@ -145,7 +145,7 @@ | |
<?php comments_template(); ?> | ||
</div> | ||
<?php if (kratos_option('g_article_widgets', 'two_side') == 'two_side'){ ?> | ||
<div class="col-lg-4 sidebar d-none d-lg-block"> | ||
<div class="col-lg-4 sidebar sticky-sidebar d-none d-lg-block"> | ||
<?php dynamic_sidebar('sidebar_tool'); ?> | ||
</div> | ||
<?php } ?> | ||
|