mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
Merge pull request #1213 from tangly1024/fix/hexo-titlle-clamp
line-claimp
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
* @returns {string}
|
||||
*/
|
||||
export default function formatDate (date, local) {
|
||||
if (!date) return ''
|
||||
if (!date || !local) return date || ''
|
||||
const d = new Date(date)
|
||||
const options = { year: 'numeric', month: 'short', day: 'numeric' }
|
||||
const res = d.toLocaleDateString(local, options)
|
||||
|
||||
@@ -181,16 +181,6 @@ nav {
|
||||
margin: -0.125em 0.25em;
|
||||
}
|
||||
|
||||
/* 固定两行 */
|
||||
.text-line-2 {
|
||||
overflow : hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 2;
|
||||
-webkit-box-orient: vertical;
|
||||
word-wrap: break-word;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.nobelium{
|
||||
@apply flex flex-col justify-between
|
||||
|
||||
@@ -51,7 +51,7 @@ const LatestPostsGroup = ({ latestPosts, siteInfo }) => {
|
||||
}
|
||||
>
|
||||
<div>
|
||||
<div className='text-line-2'>{post.title}</div>
|
||||
<div className='line-clamp-2'>{post.title}</div>
|
||||
<div className="text-gray-500">{post.lastEditedTime}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user