feat: refactored some stuff

This commit is contained in:
Nick 2024-11-28 00:33:22 -06:00
parent 5e25267fbe
commit ed73a38cbe
6 changed files with 380 additions and 141 deletions

View file

@ -160,46 +160,6 @@ paragraphAlignCenter =
++ paragraphText
myTooltip : String -> Element msg
myTooltip str =
el
[ B.color colourTheme.backgroundColour
, F.color colourTheme.nonHighlightedText
, padding 15
, D.rounded 5
, D.width 2
, F.center
, clip
, E.width <| px 300
, D.color colourTheme.highlightText
, F.size 15
, D.shadow
{ offset = ( 0, 3 ), blur = 6, size = 0, color = rgba 0 0 0 0.32 }
, E.htmlAttribute (H.style "position" "fixed")
, E.htmlAttribute (H.style "z-index" "9999")
, F.color colourTheme.nonHighlightedText
, F.regular
, F.size 14
]
(text str)
tooltip : (Element msg -> Attribute msg) -> Element Never -> Attribute msg
tooltip usher tooltip_ =
inFront <|
el
[ E.width fill
, height fill
, transparent True
, htmlAttribute <| style "transition" "all 0.1s ease-in-out"
, mouseOver [ transparent False ]
, (usher << map never) <|
el [ htmlAttribute (style "pointerEvents" "none") ]
tooltip_
]
none
basicDivider : Element msg
basicDivider =
el