mirror of https://github.com/vtrois/kratos
fix: attachment breadcrumb (#511)
parent
bbf16b417a
commit
cd5b0bbaf2
23
single.php
23
single.php
|
@ -4,7 +4,7 @@
|
||||||
* 文章内容
|
* 文章内容
|
||||||
* @author Seaton Jiang <hi@seatonjiang.com>
|
* @author Seaton Jiang <hi@seatonjiang.com>
|
||||||
* @license GPL-3.0 License
|
* @license GPL-3.0 License
|
||||||
* @version 2022.02.20
|
* @version 2022.05.27
|
||||||
*/
|
*/
|
||||||
|
|
||||||
get_header();
|
get_header();
|
||||||
|
@ -20,6 +20,7 @@ $col_array = array(
|
||||||
<?php if (have_posts()) : the_post();
|
<?php if (have_posts()) : the_post();
|
||||||
update_post_caches($posts); ?>
|
update_post_caches($posts); ?>
|
||||||
<div class="article">
|
<div class="article">
|
||||||
|
<?php if (!is_attachment()) { ?>
|
||||||
<div class="breadcrumb-box">
|
<div class="breadcrumb-box">
|
||||||
<ol class="breadcrumb">
|
<ol class="breadcrumb">
|
||||||
<li class="breadcrumb-item">
|
<li class="breadcrumb-item">
|
||||||
|
@ -46,16 +47,26 @@ $col_array = array(
|
||||||
<li class="breadcrumb-item active" aria-current="page"> <?php _e('正文', 'kratos'); ?></li>
|
<li class="breadcrumb-item active" aria-current="page"> <?php _e('正文', 'kratos'); ?></li>
|
||||||
</ol>
|
</ol>
|
||||||
</div>
|
</div>
|
||||||
|
<?php } ?>
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<h1 class="title"><?php the_title(); ?></h1>
|
<h1 class="title"><?php the_title(); ?></h1>
|
||||||
<div class="meta">
|
<div class="meta">
|
||||||
<span><?php echo get_the_date(); ?></span>
|
<span><?php echo get_the_date(); ?></span>
|
||||||
<?php if (kratos_option('g_post_views', true)) { ?>
|
<?php if (kratos_option('g_post_views', true)) { ?>
|
||||||
<span><?php echo get_post_views(); _e('点热度', 'kratos'); ?></span>
|
<span><?php echo get_post_views();
|
||||||
<?php } if (kratos_option('g_post_loves', true)) { ?>
|
_e('点热度', 'kratos'); ?></span>
|
||||||
<span><?php if (get_post_meta($post->ID, 'love', true)) { echo get_post_meta($post->ID, 'love', true); } else { echo '0'; } _e('人点赞', 'kratos'); ?></span>
|
<?php }
|
||||||
<?php } if (kratos_option('g_post_comments', true)) { ?>
|
if (kratos_option('g_post_loves', true)) { ?>
|
||||||
<span><?php comments_number('0', '1', '%'); _e('条评论', 'kratos'); ?></span>
|
<span><?php if (get_post_meta($post->ID, 'love', true)) {
|
||||||
|
echo get_post_meta($post->ID, 'love', true);
|
||||||
|
} else {
|
||||||
|
echo '0';
|
||||||
|
}
|
||||||
|
_e('人点赞', 'kratos'); ?></span>
|
||||||
|
<?php }
|
||||||
|
if (kratos_option('g_post_comments', true)) { ?>
|
||||||
|
<span><?php comments_number('0', '1', '%');
|
||||||
|
_e('条评论', 'kratos'); ?></span>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if (current_user_can('edit_posts')) {
|
<?php if (current_user_can('edit_posts')) {
|
||||||
echo '<span>';
|
echo '<span>';
|
||||||
|
|
|
@ -920,7 +920,7 @@ ol {
|
||||||
}
|
}
|
||||||
|
|
||||||
.k-main .details .article .header .title {
|
.k-main .details .article .header .title {
|
||||||
padding-bottom: 0;
|
padding: 24px 0 0;
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -955,7 +955,6 @@ ol {
|
||||||
content: '';
|
content: '';
|
||||||
}
|
}
|
||||||
|
|
||||||
.k-main .details .article h1,
|
|
||||||
.k-main .details .article .content h2,
|
.k-main .details .article .content h2,
|
||||||
.k-main .details .article .content h3,
|
.k-main .details .article .content h3,
|
||||||
.k-main .details .article .content h4,
|
.k-main .details .article .content h4,
|
||||||
|
@ -967,6 +966,12 @@ ol {
|
||||||
line-height: 1.25;
|
line-height: 1.25;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.k-main .details .article h1 {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
font-weight: 500;
|
||||||
|
line-height: 1.25;
|
||||||
|
}
|
||||||
|
|
||||||
.k-main .details .article h1 {
|
.k-main .details .article h1 {
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
font-size: 34px;
|
font-size: 34px;
|
||||||
|
|
Loading…
Reference in New Issue