Skip to content

Commit

Permalink
feat: 文章标题过长自动截断 #291
Browse files Browse the repository at this point in the history
  • Loading branch information
Mereithhh committed Jun 26, 2023
1 parent fb2097b commit 32df7cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/website/components/PostCard/title.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ export function Title(props: {
return (
<div className="flex justify-center post-card-title ">
{props.type != "about" ? (
<Link href={`/post/${props.id}`} target={getTarget(newTab)}>
<Link href={`/post/${props.id}`} target={getTarget(newTab)} style={{width:"90%"}} title={props.title}>
<div
className={`text-lg block font-medium px-5 text-center mb-2 mt-2 dark:text-dark text-gray-700 ${
className={`text-lg block w-full font-medium overflow-hidden text-ellipsis whitespace-nowrap px-5 text-center mb-2 mt-2 dark:text-dark text-gray-700 ${
showEditButton ? "ml-8" : ""
} md:text-${props.type == "overview" ? "xl" : "2xl"} ua ua-link`}
>
Expand Down

0 comments on commit 32df7cd

Please sign in to comment.