mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-16 04:25:11 -05:00
feat: stuff is fucked but I'm too tired to continue tonight
This commit is contained in:
parent
d2056e032e
commit
277ba17421
37 changed files with 683 additions and 1491 deletions
|
@ -380,6 +380,17 @@ sidebarLogo input =
|
|||
|
||||
items : NavbarInput contentMsg -> Element contentMsg
|
||||
items input =
|
||||
let
|
||||
navbarUnfucker : List (Attr () msg)
|
||||
navbarUnfucker =
|
||||
[ transparent True
|
||||
, htmlAttribute (style "position" "absolute")
|
||||
, htmlAttribute (style "z-index" "-10")
|
||||
, htmlAttribute (style "opacity" "0")
|
||||
, htmlAttribute (style "pointer-events" "none")
|
||||
, htmlAttribute (style "visibility" "hidden")
|
||||
]
|
||||
in
|
||||
column
|
||||
[ scrollbarY
|
||||
, height fill
|
||||
|
@ -388,15 +399,37 @@ items input =
|
|||
<|
|
||||
List.map
|
||||
(\x ->
|
||||
makeItem input
|
||||
{ icon = x.icon
|
||||
, isCurrent = x.isCurrent
|
||||
, isNewTabLink = x.isNewTabLink
|
||||
, isSubscriberOnly = x.isSubscriberOnly
|
||||
, name = x.name
|
||||
, sharedModel = input.sharedModel
|
||||
, url = x.url
|
||||
}
|
||||
el
|
||||
([ width fill
|
||||
, transitionStyleMedium
|
||||
]
|
||||
++ (if input.model.isNavbarExpanded then
|
||||
case input.sharedModel.device.class of
|
||||
_ ->
|
||||
[ transparent False ]
|
||||
|
||||
else
|
||||
case input.sharedModel.device.class of
|
||||
Phone ->
|
||||
navbarUnfucker
|
||||
|
||||
Tablet ->
|
||||
navbarUnfucker
|
||||
|
||||
_ ->
|
||||
[ transparent False ]
|
||||
)
|
||||
)
|
||||
<|
|
||||
makeItem input
|
||||
{ icon = x.icon
|
||||
, isCurrent = x.isCurrent
|
||||
, isNewTabLink = x.isNewTabLink
|
||||
, isSubscriberOnly = x.isSubscriberOnly
|
||||
, name = x.name
|
||||
, sharedModel = input.sharedModel
|
||||
, url = x.url
|
||||
}
|
||||
)
|
||||
[ { icon = home
|
||||
, isCurrent = input.route.path == Path.Home_
|
||||
|
@ -464,6 +497,25 @@ items input =
|
|||
]
|
||||
|
||||
|
||||
makeItemLogic : NavbarInput contentMsg -> RowInput contentMsg -> Element contentMsg
|
||||
makeItemLogic input route =
|
||||
if input.model.isNavbarExpanded then
|
||||
case input.sharedModel.device.class of
|
||||
_ ->
|
||||
makeItem input route
|
||||
|
||||
else
|
||||
case input.sharedModel.device.class of
|
||||
Phone ->
|
||||
el [] none
|
||||
|
||||
Tablet ->
|
||||
el [] none
|
||||
|
||||
_ ->
|
||||
makeItem input route
|
||||
|
||||
|
||||
makeItem : NavbarInput contentMsg -> RowInput contentMsg -> Element contentMsg
|
||||
makeItem input route =
|
||||
(if route.isNewTabLink then
|
||||
|
@ -555,15 +607,15 @@ makeItem input route =
|
|||
[]
|
||||
)
|
||||
)
|
||||
[ itemIcon route
|
||||
[ itemIcon input route
|
||||
, itemText input route
|
||||
]
|
||||
, url = route.url
|
||||
}
|
||||
|
||||
|
||||
itemIcon : RowInput contentMsg -> Element contentMsg
|
||||
itemIcon route =
|
||||
itemIcon : NavbarInput contentMsg -> RowInput contentMsg -> Element contentMsg
|
||||
itemIcon input route =
|
||||
el
|
||||
([ height <| px 50
|
||||
, width <| px 20
|
||||
|
@ -645,6 +697,7 @@ footerItems input =
|
|||
, isNewTabLink = True
|
||||
, url = "https://x.com/upRootNutrition"
|
||||
}
|
||||
|
||||
-- , { icon = mastodon
|
||||
-- , isNewTabLink = True
|
||||
-- , url = "https://social.uprootnutrition.com/@nick"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue