mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-16 04:25:11 -05:00
feat: removed boilerplate
This commit is contained in:
parent
cb51b17c08
commit
a462c01f88
14 changed files with 277 additions and 378 deletions
|
@ -88,7 +88,7 @@ view :
|
|||
}
|
||||
-> View contentMsg
|
||||
view { content, model, toContentMsg, props } =
|
||||
{ title = content.title
|
||||
{ title = "uRN :: " ++ content.title
|
||||
, attributes = [ F.family [ spartanFont ] ]
|
||||
, element =
|
||||
row
|
||||
|
@ -158,13 +158,13 @@ view { content, model, toContentMsg, props } =
|
|||
, F.size 17
|
||||
, spacing 8
|
||||
]
|
||||
(buttonMaker pageNames.pageRoot
|
||||
:: List.map buttonMaker
|
||||
(homeButtonMaker
|
||||
:: List.map pagesButtonMaker
|
||||
[ pageNames.pageServices
|
||||
, pageNames.pageHyperBlog
|
||||
, pageNames.pageDebate
|
||||
, pageNames.pageGibberish
|
||||
, pageNames.pageDodgers
|
||||
, pageNames.pageCucks
|
||||
, pageNames.pageNutriDex
|
||||
, pageNames.pageInterviews
|
||||
, pageNames.pageDonate
|
||||
|
@ -242,10 +242,10 @@ iconList =
|
|||
]
|
||||
|
||||
|
||||
buttonMaker : String -> Element msg
|
||||
buttonMaker name =
|
||||
buttonMaker : String -> String -> Element msg
|
||||
buttonMaker name url =
|
||||
row
|
||||
[]
|
||||
[ spacing 10 ]
|
||||
[ column [ E.width <| px 36 ]
|
||||
[ E.image
|
||||
[ alignLeft
|
||||
|
@ -253,14 +253,14 @@ buttonMaker name =
|
|||
, E.width <| px 30
|
||||
]
|
||||
{ src = "navbar/" ++ String.toLower name ++ ".png"
|
||||
, description = ""
|
||||
, description = name ++ " icon"
|
||||
}
|
||||
]
|
||||
, column
|
||||
[ alignBottom ]
|
||||
[ link
|
||||
[]
|
||||
{ url = localhostUrl ++ String.toLower name
|
||||
{ url = url
|
||||
, label =
|
||||
el
|
||||
[ mouseOver [ F.color colourTheme.textLightOrange ]
|
||||
|
@ -272,3 +272,13 @@ buttonMaker name =
|
|||
}
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
homeButtonMaker : Element msg
|
||||
homeButtonMaker =
|
||||
buttonMaker "home" localhostUrl
|
||||
|
||||
|
||||
pagesButtonMaker : String -> Element msg
|
||||
pagesButtonMaker name =
|
||||
buttonMaker name (localhostUrl ++ String.toLower name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue