diff options
| author | Eltrac Koalar <hi@guhub.cn> | 2022-09-18 20:11:13 +0800 |
|---|---|---|
| committer | Eltrac Koalar <hi@guhub.cn> | 2022-09-18 20:11:13 +0800 |
| commit | 240637726201ddadbe23fb24ef4a95f0b4dca79b (patch) | |
| tree | d9029ecf258446eafdef9da4ef9dae1d759b1b32 | |
| parent | 29359064f7caad63e5afe86516347d00349465ec (diff) | |
:link: Add: 文章缩略图可点击
| -rw-r--r-- | assets/matcha.css | 9 | ||||
| -rw-r--r-- | includes/post-list.php | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/assets/matcha.css b/assets/matcha.css index 5c566c6..c348eb7 100644 --- a/assets/matcha.css +++ b/assets/matcha.css @@ -228,11 +228,15 @@ button { flex-shrink: 0; border-radius: 5px; position: absolute; - top: 0; - bottom: 0; + top: .25em; + bottom: .25em; right: 0 } +.post-thumbnail:hover img { + transform: rotate(10deg) scale(1.2) +} + .post-thumbnail, .post-thumbnail-atpage { overflow: hidden; @@ -246,6 +250,7 @@ button { .post-thumbnail-atpage img { width: 100%; display: block; + transition: transform .3s } .post-thumbnail-atpage { diff --git a/includes/post-list.php b/includes/post-list.php index 89fc08f..c774ceb 100644 --- a/includes/post-list.php +++ b/includes/post-list.php @@ -22,7 +22,7 @@ </div> </div><?php if($this->fields->thumbnail!=''): ?> <div class="post-thumbnail" md-hidden> - <img class="lazy" data-src="<?php $this->fields->thumbnail(); ?>"> + <a href="<?php $this->permalink() ?>"><img class="lazy" data-src="<?php $this->fields->thumbnail(); ?>"></a> </div><?php endif;?> </article> <?php endwhile; ?> |
