Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

line-claimp #1213

Merged
merged 2 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/formatDate.js
Expand Up @@ -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)
Expand Down
10 changes: 0 additions & 10 deletions styles/globals.css
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion themes/matery/components/LatestPostsGroup.js
Expand Up @@ -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>
Expand Down