mirror of
https://github.com/usememos/memos.git
synced 2024-12-26 23:22:47 +08:00
feat: limit the num of lines for filename (#1424)
* feat: limit the linenum of filename * change the implement of line-clamp
This commit is contained in:
parent
526fbbba45
commit
3c2578f666
3 changed files with 5 additions and 1 deletions
|
@ -33,6 +33,7 @@
|
|||
"zustand": "^4.3.6"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/line-clamp": "^0.4.2",
|
||||
"@types/lodash-es": "^4.17.5",
|
||||
"@types/node": "^18.0.3",
|
||||
"@types/qs": "^6.9.7",
|
||||
|
|
|
@ -45,7 +45,7 @@ const ResourceCard = ({
|
|||
<ResourceCover resource={resource} />
|
||||
</div>
|
||||
<div className="w-full flex flex-col justify-start items-center px-1 select-none">
|
||||
<div className="w-full text-base text-center text-ellipsis overflow-hidden">{resource.filename}</div>
|
||||
<div className="w-full text-base text-center text-ellipsis overflow-hidden line-clamp-3">{resource.filename}</div>
|
||||
<div className="text-xs text-gray-400 text-center">{dayjs(resource.createdTs).locale("en").format("YYYY/MM/DD HH:mm:ss")}</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -34,4 +34,7 @@ module.exports = {
|
|||
},
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
require('@tailwindcss/line-clamp'),
|
||||
],
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue