Skip to content

Commit

Permalink
✨ 优化一些判断和布局
Browse files Browse the repository at this point in the history
  • Loading branch information
Licoy committed Nov 27, 2022
1 parent a503581 commit d817647
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ function get_post_category_link_exec($all = true, $class = '', $icon = '', $cid
}

//获取文章标签
function get_post_tags($class = '')
function get_post_tags($class = '',$item_class='')
{
global $puock_colors_name;
$tags = get_the_tags();
Expand All @@ -171,7 +171,7 @@ function get_post_tags($class = '')
$out .= '<div class="' . $class . '">';
foreach ($tags as $tag) {
// $color_index = mt_rand(0, count($puock_colors_name) - 1);
$out .= '<a href="' . get_tag_link($tag) . '" class="pk-badge pk-badge-sm mr5"><i class="fa-solid fa-tag"></i> ' . $tag->name . '</a>';
$out .= '<a href="' . get_tag_link($tag) . '" class="pk-badge pk-badge-sm mr5 '.$item_class.'"><i class="fa-solid fa-tag"></i> ' . $tag->name . '</a>';
}
$out .= '</div>';
} else {
Expand Down
8 changes: 5 additions & 3 deletions inc/ajax/page-front-login.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,11 @@ class="form-control form-control-sm t-sm" name="vd"
data-modal-title="注册"
data-self="#front-login-form" href="javascript:void(0)">还没有账号?立即注册</a>
<?php endif; ?>
<a class="c-sub t-hover-primary toggle-el-show-hide" data-target="#front-forget-password-form"
data-modal-title="找回密码"
data-self="#front-login-form" href="javascript:void(0)">忘记密码?立即找回密码</a>
<?php if (pk_is_checked('quick_login_forget_password')): ?>
<a class="c-sub t-hover-primary toggle-el-show-hide" data-target="#front-forget-password-form"
data-modal-title="找回密码"
data-self="#front-login-form" href="javascript:void(0)">忘记密码?立即找回密码</a>
<?php endif; ?>
</div>
</form>

Expand Down
2 changes: 1 addition & 1 deletion inc/ajax/page-poster.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function pk_poster_page_callback()

<div class="post-poster">
<div class="post-poster-main" id="<?php echo $el_id; ?>">
<div class="cover" style="background-image: url('<?php echo pkmp_get_post_images($post); ?>')"></div>
<div class="cover" style="background-image: url('<?php echo get_post_images($post); ?>')"></div>
<div class="content">
<p class="title mt20 fs16"><?php echo $title ?></p>
<p class="excerpt fs14 mt20 c-sub"><?php echo get_the_excerpt() ?></p>
Expand Down
6 changes: 1 addition & 5 deletions single.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,7 @@ class="fa-regular fa-pen-to-square mr-1"></i><?php _e('编辑', PUOCK) ?></div>
</div>
<?php endif; ?>
<div class="footer-info puock-text mt20">
<div class="mt20">
<div>
<?php echo get_post_tags('mt20 tags') ?>
</div>
</div>
<?php echo get_post_tags('mt20 tags','mb10') ?>
<div class="p-flex-sbc mt20 t-sm">
<div>
<span><?php _e('发表至:', PUOCK) ?></span><?php echo get_post_category_link_exec(true) ?>
Expand Down

0 comments on commit d817647

Please sign in to comment.