Rendering isn't great, but that seems to work good enough for now.
parent
27a96dc74e
commit
b3b84959e6
|
@ -95,10 +95,7 @@ handleQuery = case _ of
|
|||
render :: forall m. State -> H.ComponentHTML Action () m
|
||||
render { logged, active, admin }
|
||||
= HH.div_
|
||||
[ case active of
|
||||
true -> Bulma.btn "ACTIVE" ToggleMenu
|
||||
false -> Bulma.alert_btn "NOT ACTIVE" ToggleMenu
|
||||
, main_nav
|
||||
[ main_nav
|
||||
[ nav_brand [ logo, burger_menu ]
|
||||
, nav_menu
|
||||
[ navbar_start [ left_bar_div ]
|
||||
|
@ -125,20 +122,22 @@ render { logged, active, admin }
|
|||
logo = HH.a [HP.classes C.navbar_item, HP.href "/"] [HH.img [HP.src "/logo.jpeg", HP.width 112, HP.height 28]]
|
||||
|
||||
burger_menu =
|
||||
HH.a [ HP.classes C.navbar_burger
|
||||
HH.a [ HP.classes $ C.navbar_burger <> if active then C.is_active else []
|
||||
, ARIA.label "menu"
|
||||
, ARIA.expanded "false"
|
||||
, Bulma.data_target "navbarExample"
|
||||
, Bulma.data_target "navbar-netlibre"
|
||||
, HE.onClick (\_ -> ToggleMenu)
|
||||
] [ HH.span [ARIA.hidden "true"] []
|
||||
, HH.span [ARIA.hidden "true"] []
|
||||
, HH.span [ARIA.hidden "true"] []
|
||||
]
|
||||
|
||||
nav_brand = HH.div [HP.classes C.navbar_brand]
|
||||
nav_menu = HH.div [HP.id "navbarExample", HP.classes C.navbar_menu]
|
||||
nav_menu = HH.div [HP.id "navbar-netlibre", HP.classes $ C.navbar_menu <> if active then C.is_active else []]
|
||||
|
||||
navbar_start = HH.div [HP.classes C.navbar_start]
|
||||
navbar_end = HH.div [HP.classes C.navbar_end]
|
||||
|
||||
link_home = nav_button C.is_info "Home" (Navigate Home)
|
||||
link_domains = nav_button C.is_info "Domains" (Navigate DomainList)
|
||||
link_authd_admin = nav_button C.is_info "Admin" (Navigate Administration)
|
||||
|
@ -168,6 +167,6 @@ render { logged, active, admin }
|
|||
]
|
||||
|
||||
btn c action str
|
||||
= HH.a [ HP.classes (C.button <> c)
|
||||
= HH.a [ HP.classes (C.navbar_item <> C.button <> c)
|
||||
, HE.onClick (\_ -> action)
|
||||
] [ str ]
|
||||
|
|
Loading…
Reference in New Issue