hexo-card-two-line

This commit is contained in:
tangly1024
2023-03-17 23:45:50 +08:00
parent d5d9253391
commit 9110fe277b
2 changed files with 8 additions and 2 deletions

View File

@@ -2010,4 +2010,11 @@ code.language-mermaid {
.notion-equation-inline .katex-display {
margin: 0 0 !important;
}
.two-line-clamp {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}

View File

@@ -41,8 +41,7 @@ export const BlogPostCardInfo = ({ post, showPreview, showPageCover, showSummary
{/* 摘要 */}
{(!showPreview || showSummary) && !post.results && (
<p style={{ overflow: 'hidden', textOverflow: 'ellipsis', display: '-webkit-box', WebkitLineClamp: '3', WebkitBoxOrient: 'vertical' }}
className="replace my-3 text-gray-700 dark:text-gray-300 text-sm font-light leading-7">
<p className="two-line-clamp replace my-3 text-gray-700 dark:text-gray-300 text-sm font-light leading-7">
{post.summary}
</p>
)}