fix: tag effective click position (#375)

pull/384/head
Seaton Jiang 2021-05-20 10:25:51 +08:00
parent 1a93f16b6c
commit 332f75b1d1
No known key found for this signature in database
GPG Key ID: C1086BAE716FF138
3 changed files with 20 additions and 4 deletions

View File

@ -2084,7 +2084,6 @@ ol {
display: inline-block; display: inline-block;
overflow: hidden; overflow: hidden;
margin: 0 1px 4px 0; margin: 0 1px 4px 0;
padding: 4px 0;
width: 164px; width: 164px;
border: 1px solid #eeeeee; border: 1px solid #eeeeee;
list-style: none; list-style: none;
@ -2101,6 +2100,8 @@ ol {
.k-main .sidebar .widget_categories ul li a, .k-main .sidebar .widget_categories ul li a,
.k-main .sidebar .widget_archive ul li a { .k-main .sidebar .widget_archive ul li a {
display: block;
padding: 4px 0;
color: #333; color: #333;
} }

File diff suppressed because one or more lines are too long

View File

@ -3,7 +3,7 @@
* 侧栏小工具 * 侧栏小工具
* @author Seaton Jiang <seaton@vtrois.com> * @author Seaton Jiang <seaton@vtrois.com>
* @license MIT License * @license MIT License
* @version 2021.05.18 * @version 2021.05.20
*/ */
// 添加小工具 // 添加小工具
@ -22,7 +22,6 @@ function widgets_init()
'WP_Widget_Pages', 'WP_Widget_Pages',
'WP_Widget_Meta', 'WP_Widget_Meta',
'WP_Widget_Media_Image', 'WP_Widget_Media_Image',
'WP_Widget_Archives',
'WP_Widget_Calendar', 'WP_Widget_Calendar',
'WP_Widget_Recent_Posts', 'WP_Widget_Recent_Posts',
'WP_Widget_Recent_Comments', 'WP_Widget_Recent_Comments',
@ -38,6 +37,22 @@ function widgets_init()
} }
add_action('widgets_init', 'widgets_init'); add_action('widgets_init', 'widgets_init');
// 分类目录计数
function cat_count_span( $links ) {
$links = str_replace( '</a> (', '<span> / ', $links );
$links = str_replace( ')', __('篇', 'kratos') . '</span></a>', $links );
return $links;
}
add_filter( 'wp_list_categories', 'cat_count_span' );
// 文章归档计数
function archive_count_span( $links ) {
$links = str_replace( '</a>&nbsp;(', '<span> / ', $links );
$links = str_replace( ')', __('篇', 'kratos') . '</span></a>', $links );
return $links;
}
add_filter( 'get_archives_link', 'archive_count_span' );
// 小工具文章聚合 - 热点文章 // 小工具文章聚合 - 热点文章
function most_comm_posts($days = 30, $nums = 6) function most_comm_posts($days = 30, $nums = 6)
{ {