module HeaderAndFooterLayout exposing (..)
import Element exposing (..)
import Element.Background as Background
import Element.Border as Border
import Element.Font as Font
import Html exposing (Html)
main : Html msg
main =
layout [ width fill, height fill ] <|
column [ width fill ]
[ header
, content
, footer
]
header : Element msg
header =
row [ width fill, padding 20, spacing 20 ]
[ logo
, el [ alignRight ] <| text "Services"
, el [ alignRight ] <| text "About"
, el [ alignRight ] <| text "Contact"
]
content : Element msg
content =
List.range 2 16
|> List.map
(\i ->
el [ centerX, Font.size 64, Font.color <| rgb255 (i * 20) (i * 20) (i * 20) ] <|
text "Scrollable site content"
)
|> column [ width fill, padding 50 ]
footer : Element msg
footer =
row
[ width fill
, padding 10
, Background.color color.lightBlue
, Border.widthEach { top = 1, bottom = 0, left = 0, right = 0 }
, Border.color color.blue
]
[ logo
, column [ alignRight, spacing 10 ]
[ el [ alignRight ] <| text "Services"
, el [ alignRight ] <| text "About"
, el [ alignRight ] <| text "Contact"
]
]
logo : Element msg
logo =
el
[ width <| px 80
, height <| px 40
, Border.width 2
, Border.rounded 6
, Border.color color.blue
]
none
color =
{ blue = rgb255 0x72 0x9F 0xCF
, darkCharcoal = rgb255 0x2E 0x34 0x36
, lightBlue = rgb255 0xC5 0xE8 0xF7
, lightGrey = rgb255 0xE0 0xE0 0xE0
, white = rgb255 0xFF 0xFF 0xFF
}