@@ -14,7 +14,8 @@ def first_post_card(meta: dict, path: str) -> rx.Component:
1414 rx .box (
1515 rx .image (
1616 src = meta ["image" ],
17- loading = "lazy" ,
17+ loading = "eager" ,
18+ custom_attrs = {"fetchPriority" : "high" },
1819 alt = "Image preview for blog post: " + str (meta ["title" ]),
1920 class_name = "group-hover:scale-105 w-full h-full transition-transform duration-150 ease-out object-left object-cover" ,
2021 ),
@@ -29,27 +30,27 @@ def first_post_card(meta: dict, path: str) -> rx.Component:
2930 rx .moment (
3031 str (meta ["date" ]),
3132 format = "MMM DD, YYYY" ,
32- class_name = "font-normal text-slate-9 text-sm" ,
33+ class_name = "font-normal text-secondary-11 text-sm" ,
3334 ),
3435 class_name = "flex flex-col gap-1 p-[0.625rem_0.75rem_0rem_0.75rem] w-full" ,
3536 ),
3637 rx .box (
3738 rx .text (
3839 meta ["description" ],
39- class_name = "line-clamp-2 font-base text-slate -11" ,
40+ class_name = "line-clamp-2 font-base text-secondary -11" ,
4041 ),
4142 rx .box (
4243 rx .text (
4344 meta ["author" ],
44- class_name = "font-small text-slate-9 truncate overflow-hidden text-ellipsis max-w-[50%] min-w-0 flex-shrink" ,
45+ class_name = "font-small text-secondary-11 truncate overflow-hidden text-ellipsis max-w-[50%] min-w-0 flex-shrink" ,
4546 ),
4647 rx .el .button (
4748 rx .text (
4849 "Read more" ,
49- class_name = "font-small text-slate-9 " ,
50+ class_name = "font-small text-secondary-11 " ,
5051 ),
5152 get_icon (icon = "new_tab" , class_name = "p-[5px]" ),
52- 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" ,
53+ 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-secondary-11 transition-bg cursor-pointer overflow-hidden flex-shrink-0" ,
5354 ),
5455 class_name = "flex flex-row justify-between items-center gap-1 min-w-0 w-full h-auto" ,
5556 ),
@@ -69,42 +70,43 @@ def card_content(meta: dict, path: str) -> rx.Component:
6970 rx .box (
7071 rx .image (
7172 src = meta ["image" ],
72- loading = "lazy" ,
73+ loading = "eager" ,
74+ custom_attrs = {"fetchPriority" : "high" },
7375 alt = "Image preview for blog post: " + str (meta ["title" ]),
7476 class_name = "group-hover:scale-105 w-full h-full transition-transform duration-150 ease-out object-left object-cover" ,
7577 ),
7678 class_name = "relative flex-shrink-0 border-slate-5 border-b border-solid w-full h-[13.5rem] overflow-hidden" ,
7779 ),
7880 rx .box (
7981 rx .box (
80- rx .el .h4 (
82+ rx .el .span (
8183 meta ["title" ],
8284 class_name = "font-smbold text-slate-12" ,
8385 ),
8486 rx .moment (
8587 str (meta ["date" ]),
8688 format = "MMM DD, YYYY" ,
87- class_name = "font-normal text-slate-9 text-xs" ,
89+ class_name = "font-normal text-secondary-11 text-xs" ,
8890 ),
8991 class_name = "flex flex-col gap-1 p-[0.625rem_0.75rem_0rem_0.75rem] w-full" ,
9092 ),
9193 rx .box (
9294 rx .text (
9395 meta ["description" ],
94- class_name = "line-clamp-2 font-small text-slate -11" ,
96+ class_name = "line-clamp-2 font-small text-secondary -11" ,
9597 ),
9698 rx .box (
9799 rx .text (
98100 meta ["author" ],
99- class_name = "font-small text-slate-9 truncate overflow-hidden text-ellipsis max-w-[50%] min-w-0 flex-shrink" ,
101+ class_name = "font-small text-secondary-11 truncate overflow-hidden text-ellipsis max-w-[50%] min-w-0 flex-shrink" ,
100102 ),
101103 rx .el .button (
102104 rx .text (
103105 "Read more" ,
104- class_name = "font-small text-slate-9 " ,
106+ class_name = "font-small text-secondary-11 " ,
105107 ),
106108 get_icon (icon = "new_tab" , class_name = "p-[5px]" ),
107- 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" ,
109+ 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-secondary-11 transition-bg cursor-pointer overflow-hidden" ,
108110 ),
109111 class_name = "flex flex-row justify-between items-center gap-1 w-full h-auto" ,
110112 ),
0 commit comments