website/frontend/src/Config/Format.elm

175 lines
3.3 KiB
Elm
Raw Normal View History

2024-11-11 21:57:27 -06:00
module Config.Format exposing (..)
2024-11-10 22:55:49 -06:00
2024-11-11 21:57:27 -06:00
import Config.Colour exposing (..)
2024-11-10 22:55:49 -06:00
import Element exposing (..)
import Element.Background as B
import Element.Font as F
2024-11-11 18:57:51 -06:00
import Html.Attributes as H exposing (style)
2024-11-10 22:55:49 -06:00
2024-11-11 00:43:03 -06:00
topLevelContainer : Element msg -> Element msg
topLevelContainer =
el
[ width fill
, height fill
, B.color colourTheme.backgroundColour
]
2024-11-11 18:57:51 -06:00
pageList : List (Attribute msg)
pageList =
[ spacing 40
, centerX
, centerY
, alignTop
2024-11-20 14:40:40 -06:00
, paddingEach { top = 30, bottom = 30, left = 30, right = 30 }
2024-11-11 18:57:51 -06:00
]
transitionStyle : Attribute msg
transitionStyle =
2024-11-16 16:44:46 -06:00
htmlAttribute <| style "transition" "all .1s"
2024-11-11 18:57:51 -06:00
transitionHighlightedLinkHover : Element msg -> Element msg
transitionHighlightedLinkHover =
el
[ mouseOver [ F.color colourTheme.highlightTextHover ]
, transitionStyle
]
transitionNonHighlightedLinkHover : Element msg -> Element msg
transitionNonHighlightedLinkHover =
el
[ mouseOver [ F.color colourTheme.highlightText ]
, transitionStyle
]
2024-11-12 19:23:16 -06:00
transitionNonHighlightedLinkHoverWithMove : Element msg -> Element msg
2024-11-16 00:44:39 -06:00
transitionNonHighlightedLinkHoverWithMove content =
2024-11-12 19:23:16 -06:00
el
2024-11-16 00:44:39 -06:00
[ width fill
, height (px 30)
2024-11-12 19:23:16 -06:00
]
2024-11-16 00:44:39 -06:00
(el
[ centerX
, centerY
, mouseOver [ F.color colourTheme.highlightText, F.size 25 ]
, transitionStyle
]
content
)
2024-11-12 19:23:16 -06:00
2024-11-11 00:43:03 -06:00
spartanFont : F.Font
spartanFont =
F.typeface "League Spartan"
imageSpacer : Attribute msg
imageSpacer =
spacing 20
2024-11-11 18:57:51 -06:00
navBarLinkFormat : List (Attr () msg)
navBarLinkFormat =
[ F.size 15
2024-11-16 00:44:39 -06:00
, centerX
2024-11-11 18:57:51 -06:00
-- , F.bold
]
2024-11-11 00:43:03 -06:00
titleFormat : List (Attr () msg)
titleFormat =
[ F.size 23
, F.bold
]
2024-11-11 18:57:51 -06:00
nonHighlightedTitleFormat : List (Attr () msg)
nonHighlightedTitleFormat =
[ F.color colourTheme.nonHighlightedText
]
++ titleFormat
highlightedTitleFormat : List (Attr () msg)
highlightedTitleFormat =
[ F.color colourTheme.highlightText
]
++ titleFormat
2024-11-11 00:43:03 -06:00
paragraphFontSize : Attr decorative msg
paragraphFontSize =
F.size 17
paragraphLinkFormat : { url : String, label : Element msg } -> Element msg
paragraphLinkFormat =
newTabLink
[ paragraphFontSize
, F.color colourTheme.highlightText
]
2024-11-11 21:57:27 -06:00
paragraphSpacing : Attribute msg
paragraphSpacing =
spacing 8
2024-11-11 18:57:51 -06:00
paragraphText : List (Attr () msg)
paragraphText =
[ F.color colourTheme.nonHighlightedText
2024-11-11 21:57:27 -06:00
, paragraphSpacing
, paragraphFontSize
]
paragraphHightlightedBoldText : List (Attr () msg)
paragraphHightlightedBoldText =
[ F.color colourTheme.highlightText
, F.bold
, paragraphSpacing
2024-11-11 00:43:03 -06:00
, paragraphFontSize
]
2024-11-11 18:57:51 -06:00
paragraphFormat : List (Attr () msg)
paragraphFormat =
[]
++ paragraphText
paragraphBoldFormat : List (Attr () msg)
paragraphBoldFormat =
[ F.bold ]
++ paragraphText
paragraphWidth : Attribute msg
paragraphWidth =
width <| px 700
paragraphAlignLeft : List (Attr () msg)
paragraphAlignLeft =
[ alignLeft, paragraphWidth ]
++ paragraphText
2024-11-12 19:23:16 -06:00
2024-11-11 21:57:27 -06:00
paragraphAlignCenter : List (Attr () msg)
paragraphAlignCenter =
[ centerX, paragraphWidth ]
++ paragraphText
2024-11-11 18:57:51 -06:00
2024-11-11 00:43:03 -06:00
paragraphColumnFormat : List (Attribute msg)
paragraphColumnFormat =
[ spacing 20
2024-11-11 18:57:51 -06:00
, paragraphWidth
2024-11-11 00:43:03 -06:00
]