diff --git a/input.css b/input.css index 73a1ece..14661a9 100644 --- a/input.css +++ b/input.css @@ -526,12 +526,12 @@ text-underline-offset: 0.3rem; } - /* 卡片封面:blur-img 结构,固定 4:3 比例,hover 缩放。 - 用属性选择器提升特异性,可靠覆盖 .blur-img 的 aspect-ratio: var(--ar) + /* 卡片封面:blur-img 结构,固定 16:9 比例,hover 缩放。 + 双类选择器提升特异性,可靠覆盖 .blur-img 的 aspect-ratio: var(--ar) (卡片不写 --ar,var(--ar) 解析为空会导致高度塌陷)。 */ .blur-img.post-card-cover-blur { margin: 0; - aspect-ratio: 4 / 3; + aspect-ratio: 16 / 9; } .post-card-cover-blur img { width: 100%; diff --git a/src/components/post_card.rs b/src/components/post_card.rs index 49ebd6d..0bce2c3 100644 --- a/src/components/post_card.rs +++ b/src/components/post_card.rs @@ -47,7 +47,7 @@ pub fn PostCard(post: PostListItem) -> Element { } img { class: "blur-img-full is-loaded", - src: "{cover_src}?thumb=400x300", + src: "{cover_src}?thumb=400x225", alt: "{post.title}", } }