feat: slow refactor

This commit is contained in:
Nick 2024-12-27 01:30:21 -06:00
parent 903c16efed
commit e6f3a09919
54 changed files with 1103 additions and 1128 deletions

View file

@ -6,7 +6,7 @@ import Config.Helpers.Format
( paragraphFontSize
, paragraphSpacing
)
import Config.Style.Colour exposing (colourTheme)
import Config.Style.Colour.Helpers exposing (colourTheme)
import Config.Style.Fonts exposing (spartanFont)
import Config.Style.Glow exposing (glowDeepDarkGreyNavbar)
import Config.Style.Icons.Icons
@ -22,6 +22,7 @@ import Config.Style.Icons.Icons
, hyperBlog
, interviews
, leaving
, line
, lock
, mastodon
, nutriDex
@ -203,6 +204,7 @@ navbarContainer input maker =
[ height fill
, width fill
, scrollbarY
, E.htmlAttribute (H.id "scroll-container")
]
input.content.element
@ -253,6 +255,18 @@ topbar input =
topbarLogo : NavbarInput contentMsg -> Element contentMsg
topbarLogo input =
let
svgFormat =
{ elementAttributes =
[ centerX
, centerY
, Events.onClick input.contentMessage
, transitionStyleSlow
]
, sharedModel = input.sharedModel
, svgAttributes = [ SvgAttr.width "30" ]
}
in
row
([ height <| px barReservedRegion.topbar
, transitionStyleMedium
@ -276,22 +290,90 @@ topbarLogo input =
[ height <| px 50
, width <| px 40
, alignRight
, centerY
, moveUp 5
]
<|
(if input.model.isNavbarExpanded then
circleX
-- (if input.model.isNavbarExpanded then
column [ centerY ]
[ line
(if input.model.isNavbarExpanded then
{ elementAttributes =
[ centerX
, centerY
, moveDown 13
, rotate (degrees 45)
, Events.onClick input.contentMessage
, transitionStyleSlow
]
, sharedModel = input.sharedModel
, svgAttributes = [ SvgAttr.width "30" ]
}
else
circleDots
)
{ elementAttributes =
[ centerX
, centerY
, Events.onClick input.contentMessage
]
, sharedModel = input.sharedModel
, svgAttributes = [ SvgAttr.width "30" ]
}
else
{ elementAttributes =
[ centerX
, centerY
, Events.onClick input.contentMessage
, transitionStyleSlow
]
, sharedModel = input.sharedModel
, svgAttributes = [ SvgAttr.width "30" ]
}
)
, line
(if input.model.isNavbarExpanded then
{ elementAttributes =
[ centerX
, centerY
, moveUp 22
, transparent True
, Events.onClick input.contentMessage
, transitionStyleSlow
]
, sharedModel = input.sharedModel
, svgAttributes = [ SvgAttr.width "30" ]
}
else
{ elementAttributes =
[ centerX
, centerY
, moveUp 22
, Events.onClick input.contentMessage
, transitionStyleSlow
]
, sharedModel = input.sharedModel
, svgAttributes = [ SvgAttr.width "30" ]
}
)
, line
(if input.model.isNavbarExpanded then
{ elementAttributes =
[ centerX
, centerY
, rotate (degrees -45)
, moveUp 56
, Events.onClick input.contentMessage
, transitionStyleSlow
]
, sharedModel = input.sharedModel
, svgAttributes = [ SvgAttr.width "30" ]
}
else
{ elementAttributes =
[ centerX
, centerY
, moveUp 44
, Events.onClick input.contentMessage
, transitionStyleSlow
]
, sharedModel = input.sharedModel
, svgAttributes = [ SvgAttr.width "30" ]
}
)
]
]