Skip to content

Commit

Permalink
✨ 调整卡片模式下【置顶】标识为缩略图左上方
Browse files Browse the repository at this point in the history
  • Loading branch information
Licoy committed Jan 9, 2025
1 parent 8da26c6 commit c4def51
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 21 deletions.
48 changes: 43 additions & 5 deletions assets/dist/js/libs.min.js

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions assets/dist/style/libs.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/dist/style/style.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/style/common.less
Original file line number Diff line number Diff line change
Expand Up @@ -711,4 +711,4 @@ a {
animation: blink 1s step-end infinite;
margin-left: 5px;
}
}
}
18 changes: 18 additions & 0 deletions assets/style/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -843,6 +843,24 @@ a:hover {
}
}
}
.post-tags{
position: absolute;
top:6px;
left: 6px;
display: flex;
flex-wrap: nowrap;
overflow: hidden;
.badge{
transition: all .3s;
opacity: .8;
&:not(:last-child){
margin-right: 2px;
}
&:hover{
opacity: 1;
}
}
}
}

&:hover {
Expand Down
8 changes: 5 additions & 3 deletions templates/module-post.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,18 @@ class="fa-regular fa-clock"></i> <?php pk_get_post_date() ?></span>
<?php else: ?>
<article class="block card-plain post-item col-md-6 col-12 post-item-card">
<div class="p-block post-item-block">
<div class="thumbnail">
<div class="thumbnail position-relative">
<a class="t-sm ww" <?php pk_link_target() ?> href="<?php the_permalink() ?>">
<img title="<?php the_title() ?>"
alt="<?php the_title() ?>" <?php echo pk_get_lazy_img_info(get_post_images(), '', 400, 200) ?> />
</a>
<div class="post-tags">
<?php if (is_sticky()): ?><span class="badge bg-danger"><i
class="fa fa-bolt-lightning"></i>置顶</span><?php endif; ?>
</div>
</div>
<div class="post-info">
<h2 class="info-title">
<?php if (is_sticky()): ?><span class="badge bg-danger"><i
class="fa fa-bolt-lightning"></i>置顶</span><?php endif; ?>
<?php echo get_post_category_link('badge d-none d-md-inline-block bg-' . pk_get_color_tag(['danger', 'warning', 'dark']) . ' ahfff') ?>
<a class="a-link puock-text" title="<?php the_title() ?>" <?php pk_link_target() ?>
href="<?php the_permalink() ?>"><?php the_title() ?></a>
Expand Down

0 comments on commit c4def51

Please sign in to comment.