Skip to content

Commit 6d08ae8

Browse files
authored
add turncate to blog authors (#1410)
1 parent 908809a commit 6d08ae8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pcweb/pages/blog/blog.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ def first_post_card(meta: dict, path: str) -> rx.Component:
3838
rx.box(
3939
rx.text(
4040
meta["author"],
41-
class_name="font-small text-nowrap text-slate-9",
41+
class_name="font-small text-slate-9 truncate overflow-hidden text-ellipsis max-w-[50%] min-w-0 flex-shrink",
4242
),
4343
rx.el.button(
4444
rx.text(
4545
"Read more",
4646
class_name="font-small text-slate-9",
4747
),
4848
get_icon(icon="new_tab", class_name="p-[5px]"),
49-
class_name="flex items-center border-slate-5 bg-slate-1 hover:bg-slate-3 shadow-small pl-[5px] border rounded-md w-auto max-w-full text-slate-9 transition-bg cursor-pointer overflow-hidden",
49+
class_name="flex items-center border-slate-5 bg-slate-1 hover:bg-slate-3 shadow-small pl-[5px] border rounded-md w-auto max-w-full text-slate-9 transition-bg cursor-pointer overflow-hidden flex-shrink-0",
5050
),
51-
class_name="flex flex-row justify-between items-center gap-1 w-full h-auto",
51+
class_name="flex flex-row justify-between items-center gap-1 min-w-0 w-full h-auto",
5252
),
5353
class_name="flex flex-col justify-between p-[0rem_0.75rem_0.75rem_0.75rem] w-full h-full",
5454
),
@@ -93,7 +93,7 @@ def card_content(meta: dict, path: str) -> rx.Component:
9393
rx.box(
9494
rx.text(
9595
meta["author"],
96-
class_name="font-small text-nowrap text-slate-9",
96+
class_name="font-small text-slate-9 truncate overflow-hidden text-ellipsis max-w-[50%] min-w-0 flex-shrink",
9797
),
9898
rx.el.button(
9999
rx.text(

0 commit comments

Comments
 (0)