@@ -274,32 +274,76 @@ def grid_card_unique(title: str, description: str, url: str, component) -> rx.Co
274274
275275
276276def new_resource_section ():
277- return nav_menu .content (
278- rx .box (
279- # Links
277+ _company_items = [
278+ {"label" : "Newsletter" , "url" : changelog .path , "icon" : "mails" },
279+ {"label" : "Blog" , "url" : "/blog" , "icon" : "library-big" },
280+ ]
281+
282+ _open_source_items = [
283+ {"label" : "Templates" , "url" : "/templates" , "icon" : "layout-panel-top" },
284+ {"label" : "Changelog" , "url" : changelog .path , "icon" : "history" },
285+ {
286+ "label" : "Contributing" ,
287+ "url" : "https://github.com/reflex-dev/reflex/blob/main/CONTRIBUTING.md" ,
288+ "icon" : "handshake" ,
289+ },
290+ {
291+ "label" : "Discussions" ,
292+ "url" : "https://github.com/orgs/reflex-dev/discussions" ,
293+ "icon" : "message-square-text" ,
294+ },
295+ {
296+ "label" : "FAQ" ,
297+ "url" : faq .path ,
298+ "icon" : "table-of-contents" ,
299+ },
300+ ]
301+
302+ def _link_button (label : str , url : str , icon : str ) -> rx .Component :
303+ return rx .link (
304+ resources_button (
305+ rx .icon (icon , class_name = "size-4" ),
306+ label ,
307+ size = "md" ,
308+ variant = "transparent" ,
309+ class_name = "justify-start w-full items-center" ,
310+ ),
311+ href = url ,
312+ is_external = True ,
313+ underline = "none" ,
314+ class_name = "!w-full" ,
315+ )
316+
317+ def _resource_section_column (
318+ section_title : str , resource_item : list [dict [str , str ]]
319+ ):
320+ return rx .box (
280321 rx .box (
281- link_button ("Changelog" , changelog .path ),
282- link_button (
283- "Contributing" ,
284- "https://github.com/reflex-dev/reflex/blob/main/CONTRIBUTING.md" ,
322+ rx .text (
323+ section_title ,
324+ class_name = "text-sm text-slate-10 font-semibold px-2.5 py-1" ,
285325 ),
286- link_button (
287- "Discussions" , "https://github.com/orgs/reflex-dev/discussions"
326+ rx .foreach (
327+ resource_item ,
328+ lambda item : _link_button (item ["label" ], item ["url" ], item ["icon" ]),
288329 ),
289- link_button ("FAQ" , faq .path ),
290330 class_name = "flex flex-col w-full p-2" ,
291331 ),
292- class_name = "flex flex-col w-full max-w-[10.1875rem] border-r border-slate-5" ,
293- ),
332+ class_name = "flex flex-col w-full max-w-[9.1875rem]" ,
333+ )
334+
335+ return nav_menu .content (
336+ _resource_section_column ("Open Source" , _open_source_items ),
337+ _resource_section_column ("Company" , _company_items ),
294338 # Grid cards
295339 rx .box (
296- grid_card (
297- "Blog" ,
298- "See what's new in the Reflex ecosystem." ,
299- f"/blog" ,
300- "/blog/top_python_web_frameworks.png" ,
301- "absolute bottom-0 rounded-tl-md" ,
302- ),
340+ # grid_card(
341+ # "Blog",
342+ # "See what's new in the Reflex ecosystem.",
343+ # f"/blog",
344+ # "/blog/top_python_web_frameworks.png",
345+ # "absolute bottom-0 rounded-tl-md",
346+ # ),
303347 grid_card (
304348 "Customers" ,
305349 "Meet the teams who chose Reflex." ,
@@ -312,7 +356,7 @@ def new_resource_section():
312356 ),
313357 class_name = "grid grid-cols-2 gap-3 p-3 bg-slate-1" ,
314358 ),
315- class_name = "flex flex-row shadow-large rounded-xl bg-slate-2 border border-slate-5 w-[41 .55rem] font-sans overflow-hidden" ,
359+ class_name = "flex flex-row shadow-large rounded-xl bg-slate-2 border border-slate-5 w-[34 .55rem] font-sans overflow-hidden" ,
316360 )
317361
318362
0 commit comments