feat: added gibberish page and argument summaries

This commit is contained in:
Nick 2024-12-03 21:17:17 -06:00
parent 8b0c2b632e
commit 23ce3b3f68
67 changed files with 498 additions and 283 deletions

View file

@ -18,7 +18,7 @@ import View exposing (View)
type alias Props =
{}
{ currentRoute : String }
layout : Props -> Shared.Model -> Route () -> Layout () Model Msg contentMsg
@ -26,7 +26,7 @@ layout props shared route =
Layout.new
{ init = init
, update = update
, view = view
, view = \layoutArgs -> view { props = props, content = layoutArgs.content, model = layoutArgs.model, toContentMsg = layoutArgs.toContentMsg }
, subscriptions = subscriptions
}
@ -73,8 +73,14 @@ subscriptions model =
-- VIEW
view : { toContentMsg : Msg -> contentMsg, content : View contentMsg, model : Model } -> View contentMsg
view { toContentMsg, model, content } =
view :
{ content : View contentMsg
, model : Model
, toContentMsg : Msg -> contentMsg
, props : Props
}
-> View contentMsg
view { content, model, toContentMsg, props } =
{ title = content.title
, attributes = [ F.family [ spartanFont ] ]
, element =
@ -88,7 +94,7 @@ view { toContentMsg, model, content } =
, htmlAttribute (H.style "left" "0")
, htmlAttribute (H.style "top" "0")
, htmlAttribute (H.style "height" "100vh")
, htmlAttribute (H.style "z-index" "10") -- Ensure navbar stays on top
, htmlAttribute (H.style "z-index" "10")
, htmlAttribute (H.style "transform-style" "preserve-3d")
, D.widthEach { top = 0, bottom = 0, left = 0, right = 3 }
, D.color colourTheme.textDarkOrange
@ -151,11 +157,12 @@ view { toContentMsg, model, content } =
, spacing 8
]
<|
List.map buttonMaker
List.map (buttonMaker props.currentRoute)
[ pageNames.pageRoot
, pageNames.pageServices
, pageNames.pageHyperBlog
, pageNames.pageDebate
, pageNames.pageGibberish
, pageNames.pageDodgers
, pageNames.pageNutriDex
, pageNames.pageInterviews
@ -233,8 +240,8 @@ iconList =
]
buttonMaker : String -> Element msg
buttonMaker name =
buttonMaker : String -> String -> Element msg
buttonMaker currentRoute name =
row
[]
[ column [ E.width <| px 36 ]
@ -255,6 +262,12 @@ buttonMaker name =
, label =
el
[ mouseOver [ F.color colourTheme.textLightOrange ]
, F.color <|
if String.toLower name == currentRoute then
colourTheme.textLightOrange
else
colourTheme.textLightGrey
, htmlAttribute <| style "transition" "all 0.1s ease-in-out"
]
<|