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-20 22:47:57 -06:00
|
|
|
import Element as E exposing (..)
|
2024-11-10 22:55:49 -06:00
|
|
|
import Element.Background as B
|
2024-11-20 22:47:57 -06:00
|
|
|
import Element.Border as D exposing (..)
|
2024-11-10 22:55:49 -06:00
|
|
|
import Element.Font as F
|
2024-11-20 22:47:57 -06:00
|
|
|
import Html exposing (col)
|
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
|
2024-11-20 22:47:57 -06:00
|
|
|
[ E.width fill
|
2024-11-11 00:43:03 -06:00
|
|
|
, height fill
|
2024-11-28 00:58:24 -06:00
|
|
|
, B.color colourTheme.backgroundLightGrey
|
2024-11-11 00:43:03 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
|
2024-11-11 18:57:51 -06:00
|
|
|
pageList : List (Attribute msg)
|
|
|
|
pageList =
|
2024-11-26 04:32:11 -06:00
|
|
|
[ spacing 30
|
2024-11-24 01:53:40 -06:00
|
|
|
, centerX
|
2024-12-03 04:59:27 -06:00
|
|
|
, 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-26 04:32:11 -06:00
|
|
|
htmlAttribute <| style "transition" "all 0.3s ease-in-out"
|
2024-11-11 18:57:51 -06:00
|
|
|
|
|
|
|
|
|
|
|
transitionHighlightedLinkHover : Element msg -> Element msg
|
|
|
|
transitionHighlightedLinkHover =
|
|
|
|
el
|
2024-11-28 00:58:24 -06:00
|
|
|
[ mouseOver [ F.color colourTheme.textDarkOrange ]
|
2024-11-11 18:57:51 -06:00
|
|
|
, transitionStyle
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
transitionNonHighlightedLinkHover : Element msg -> Element msg
|
|
|
|
transitionNonHighlightedLinkHover =
|
|
|
|
el
|
2024-11-28 00:58:24 -06:00
|
|
|
[ mouseOver [ F.color colourTheme.textLightOrange ]
|
2024-11-11 18:57:51 -06:00
|
|
|
, 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-20 22:47:57 -06:00
|
|
|
[ E.width fill
|
2024-11-16 00:44:39 -06:00
|
|
|
, height (px 30)
|
2024-11-12 19:23:16 -06:00
|
|
|
]
|
2024-11-16 00:44:39 -06:00
|
|
|
(el
|
|
|
|
[ centerX
|
|
|
|
, centerY
|
2024-11-28 00:58:24 -06:00
|
|
|
, mouseOver [ F.color colourTheme.textLightOrange, F.size 25 ]
|
2024-11-16 00:44:39 -06:00
|
|
|
, 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"
|
|
|
|
|
|
|
|
|
2024-11-11 18:57:51 -06:00
|
|
|
navBarLinkFormat : List (Attr () msg)
|
|
|
|
navBarLinkFormat =
|
2024-11-26 21:17:31 -06:00
|
|
|
[ F.size 17
|
2024-11-11 18:57:51 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
|
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 =
|
2024-11-28 00:58:24 -06:00
|
|
|
[ F.color colourTheme.textLightGrey
|
2024-11-11 18:57:51 -06:00
|
|
|
]
|
|
|
|
++ titleFormat
|
|
|
|
|
|
|
|
|
|
|
|
highlightedTitleFormat : List (Attr () msg)
|
|
|
|
highlightedTitleFormat =
|
2024-11-28 00:58:24 -06:00
|
|
|
[ F.color colourTheme.textLightOrange
|
2024-11-11 18:57:51 -06:00
|
|
|
]
|
|
|
|
++ 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
|
2024-11-28 00:58:24 -06:00
|
|
|
, F.color colourTheme.textLightOrange
|
2024-11-11 00:43:03 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
|
2024-11-11 21:57:27 -06:00
|
|
|
paragraphSpacing : Attribute msg
|
|
|
|
paragraphSpacing =
|
2024-11-26 04:32:11 -06:00
|
|
|
spacing 3
|
2024-11-11 21:57:27 -06:00
|
|
|
|
|
|
|
|
2024-11-11 18:57:51 -06:00
|
|
|
paragraphText : List (Attr () msg)
|
|
|
|
paragraphText =
|
2024-11-28 00:58:24 -06:00
|
|
|
[ F.color colourTheme.textLightGrey
|
2024-11-11 21:57:27 -06:00
|
|
|
, paragraphSpacing
|
|
|
|
, paragraphFontSize
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
paragraphHightlightedBoldText : List (Attr () msg)
|
|
|
|
paragraphHightlightedBoldText =
|
2024-11-28 00:58:24 -06:00
|
|
|
[ F.color colourTheme.textLightOrange
|
2024-11-11 21:57:27 -06:00
|
|
|
, 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 =
|
2024-11-20 22:47:57 -06:00
|
|
|
E.width <| px 700
|
2024-11-11 18:57:51 -06:00
|
|
|
|
|
|
|
|
|
|
|
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-26 21:17:31 -06:00
|
|
|
basicDivider : Element msg
|
|
|
|
basicDivider =
|
|
|
|
el
|
|
|
|
[ E.width fill
|
|
|
|
, centerX
|
|
|
|
, D.widthEach { bottom = 1, top = 0, left = 0, right = 0 }
|
|
|
|
, D.color (rgb255 200 200 200)
|
|
|
|
, paddingEach { top = 40, bottom = 0, left = 0, right = 0 }
|
|
|
|
]
|
|
|
|
none
|
2024-11-30 04:32:00 -06:00
|
|
|
|
|
|
|
|
|
|
|
formatName : String -> String
|
|
|
|
formatName name =
|
|
|
|
name
|
|
|
|
|> String.toLower
|
|
|
|
|> String.replace " " ""
|
|
|
|
|> String.replace "'" ""
|
|
|
|
|> String.replace "." ""
|
|
|
|
|> String.replace "-" ""
|