From 3c2578f666b86b081a926bcb76124d954482be72 Mon Sep 17 00:00:00 2001 From: CorrectRoadH Date: Wed, 29 Mar 2023 20:27:54 +0800 Subject: [PATCH] feat: limit the num of lines for filename (#1424) * feat: limit the linenum of filename * change the implement of line-clamp --- web/package.json | 1 + web/src/components/ResourceCard.tsx | 2 +- web/tailwind.config.js | 3 +++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/web/package.json b/web/package.json index 1c0029d9..ea757f5c 100644 --- a/web/package.json +++ b/web/package.json @@ -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", diff --git a/web/src/components/ResourceCard.tsx b/web/src/components/ResourceCard.tsx index 9ff41b06..68b06476 100644 --- a/web/src/components/ResourceCard.tsx +++ b/web/src/components/ResourceCard.tsx @@ -45,7 +45,7 @@ const ResourceCard = ({
-
{resource.filename}
+
{resource.filename}
{dayjs(resource.createdTs).locale("en").format("YYYY/MM/DD HH:mm:ss")}
diff --git a/web/tailwind.config.js b/web/tailwind.config.js index f52061c6..fb113ac9 100644 --- a/web/tailwind.config.js +++ b/web/tailwind.config.js @@ -34,4 +34,7 @@ module.exports = { }, }, }, + plugins: [ + require('@tailwindcss/line-clamp'), + ], };