You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The layout component should implement at least the stack and the sidebar layouts, ref: https://every-layout.dev
The cover would be an excellent addition.
defmoduleSesameWeb.MenusdouseSesameWeb,:verified_routes# Public menu defpublic_menu_items(_user\\nil),do: [%{label: "Features",path: "/#features"},]# Signed out main menudefmain_menu_items(nil)do[]end# Signed in main menudefmain_menu_items(current_user)dobuild_menu([:my_notifications,:participants],current_user)endend
Hope this helps!
The text was updated successfully, but these errors were encountered:
Hi,
The layout component should implement at least the stack and the sidebar layouts, ref: https://every-layout.dev
The cover would be an excellent addition.
Petal's approach to structure is a decent start https://docs.petal.build/petal-pro-documentation/fundamentals/layouts-and-menus
Here is what I did to port the sidebar layout from the https://github.com/themesberg/flowbite-astro-admin-dashboard/tree/main (it also implements the stack) into one of my experiments.
main
tagcomponents/astro.ex
I don't remember much now, but
astro/sidebar.ex
andastro/navbar_sidebar.ex
basically loop over the menu items and render them accordingly:Then, I was able to choose which layout I wanted to use on a LiveView basis:
The
SesameWeb.Menus
contains definitions of menus as described in Petal docs https://docs.petal.build/petal-pro-documentation/fundamentals/layouts-and-menus#menusHope this helps!
The text was updated successfully, but these errors were encountered: