Update PostLayout.astro

This commit is contained in:
2026-06-16 22:49:59 +08:00
committed by GitHub
parent 588505d39b
commit 696752b2f0
+6 -7
View File
@@ -39,25 +39,24 @@ const structuredData = {
<slot /> <slot />
</article> </article>
<!-- 评论区域:宽度对齐、居中、清除浮动 --> <!-- 评论区域:宽度对齐、居中,并强制清除浮动和溢出隐藏,确保容器包裹所有内容 -->
<div class="comment-wrapper max-w-3xl mx-auto px-4 mt-8 w-full" style="clear: both;"> <div class="comment-wrapper max-w-3xl mx-auto px-4 mt-8 w-full" style="clear: both; overflow: hidden;">
<Comment /> <Comment />
</div> </div>
</Layout> </Layout>
<!-- 全局样式修复黑线问题(仅针对评论区域 --> <!-- 额外样式备用(若 Comment 中的样式未生效 -->
<style is:global> <style is:global>
.comment-wrapper a, .comment-wrapper a,
.comment-wrapper button, .comment-wrapper button,
.comment-wrapper .tk-submit { .comment-wrapper .tk-submit {
text-decoration: none !important; text-decoration: none !important;
border-bottom: none !important; border-bottom: none !important;
box-shadow: none !important; /* 有时黑线是 box-shadow 造成的 */ box-shadow: none !important;
} }
/* 如果评论框内部输入框出现黑线 */
.comment-wrapper input, .comment-wrapper input,
.comment-wrapper textarea { .comment-wrapper textarea {
border: 1px solid #ccc; /* 保持边框但去掉下划线风格 */ border: 1px solid #ccc;
border-bottom: 1px solid #ccc !important; /* 保证底部不是黑色 */ border-bottom: 1px solid #ccc !important;
} }
</style> </style>