Clearer netlib.re navbar.

beta
Philippe Pittoli 2023-07-08 02:59:30 +02:00
parent 46d9352a16
commit e4fbe59a3b
1 changed files with 44 additions and 43 deletions

View File

@ -411,47 +411,48 @@ modal_domain_delete domain =
netlibre_navbar :: forall w i. HH.HTML w i netlibre_navbar :: forall w i. HH.HTML w i
netlibre_navbar = netlibre_navbar =
HH.nav [HP.classes C.navbar, ARIA.label "main navigation", ARIA.role "navigation" ] main_nav
[ HH.div [HP.classes C.navbar_brand] [ nav_brand [ logo, burger_menu ]
[ HH.a [HP.classes C.navbar_item, HP.href "/"] , nav_menu
[HH.img [HP.src "/logo.jpeg", HP.width 112, HP.height 28]] [ navbar_start
, HH.a [HP.classes C.navbar_burger, ARIA.label "menu", ARIA.expanded "false", data_target "navbarExample" ] [ link_domains
, dropdown "List of something"
[ dropdown_element "something 1"
, dropdown_element "something 2"
, dropdown_element "something 3"
, dropdown_separator
, dropdown_element "something 4"
]
]
, navbar_end
[ navbar_item
[ HH.div [HP.classes C.buttons]
[ nav_button_strong "Register"
, nav_button_light "Login"
]
]
]
]
]
where
main_nav = HH.nav [ HP.classes C.navbar, ARIA.label "main navigation", ARIA.role "navigation" ]
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, ARIA.label "menu", ARIA.expanded "false", data_target "navbarExample" ]
[ HH.span [ARIA.hidden "true"] [] [ HH.span [ARIA.hidden "true"] []
, HH.span [ARIA.hidden "true"] [] , HH.span [ARIA.hidden "true"] []
, HH.span [ARIA.hidden "true"] [] , HH.span [ARIA.hidden "true"] []
] ]
] nav_brand = HH.div [HP.classes C.navbar_brand]
, HH.div [HP.id "navbarExample", HP.classes C.navbar_menu] nav_menu = HH.div [HP.id "navbarExample", HP.classes C.navbar_menu]
[ HH.div [HP.classes C.navbar_start] navbar_start = HH.div [HP.classes C.navbar_start]
[ HH.a [HP.classes C.navbar_item] navbar_end = HH.div [HP.classes C.navbar_end]
[HH.text "Home"] link_domains = HH.a [HP.classes C.navbar_item] [HH.text "My Domains"]
, HH.a [HP.classes C.navbar_item] dropdown title dropdown_elements
[HH.text "My Domains"] = HH.div [HP.classes (C.navbar_item <> C.has_dropdown <> C.is_hoverable)]
, HH.div [HP.classes (C.navbar_item <> C.has_dropdown <> C.is_hoverable)] [ dropdown_title title, HH.div [HP.classes C.navbar_dropdown] dropdown_elements ]
[ HH.a [HP.classes C.navbar_link] dropdown_title str = HH.a [HP.classes C.navbar_link] [HH.text str]
[HH.text "List of something"] dropdown_element str = HH.a [HP.classes C.navbar_item] [HH.text str]
, HH.div [HP.classes C.navbar_dropdown] dropdown_separator = HH.hr [HP.classes C.navbar_divider]
[ HH.a [HP.classes C.navbar_item] nav_button_strong str = HH.a [HP.classes (C.button <> C.is_primary)] [HH.strong [] [HH.text str]]
[HH.text "something 1"] nav_button_light str = HH.a [HP.classes (C.button <> C.is_light)] [HH.text str]
, HH.a [HP.classes C.navbar_item] navbar_item = HH.div [HP.classes C.navbar_item]
[HH.text "something 2"]
, HH.a [HP.classes C.navbar_item]
[HH.text "something 3"]
, HH.hr [HP.classes C.navbar_divider]
, HH.a [HP.classes C.navbar_item]
[HH.text "something 4"]
]
]
]
, HH.div [HP.classes C.navbar_end]
[ HH.div [HP.classes C.navbar_item]
[ HH.div [HP.classes C.buttons]
[ HH.a [HP.classes (C.button <> C.is_primary)]
[HH.strong [] [HH.text "SIGN UP NOW"]]
, HH.a [HP.classes (C.button <> C.is_light)]
[HH.text "STUFF"]
]
]
]
]
]