feat: add page menu
This commit is contained in:
parent
9e81339648
commit
95cd8fa0a8
1 changed files with 27 additions and 4 deletions
31
src/Main.elm
31
src/Main.elm
|
@ -1,7 +1,5 @@
|
||||||
module Main exposing (Flags, Model, Msg, Object3d, main, sitemap)
|
module Main exposing (Flags, Model, Msg, Object3d, main, sitemap)
|
||||||
|
|
||||||
-- TODO: entries, colophon, contact/access
|
|
||||||
|
|
||||||
import Angle
|
import Angle
|
||||||
import Array
|
import Array
|
||||||
import Browser
|
import Browser
|
||||||
|
@ -396,6 +394,30 @@ view model =
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
menu : Model -> Element Msg
|
||||||
|
menu model =
|
||||||
|
el
|
||||||
|
[ alignLeft
|
||||||
|
, alignTop
|
||||||
|
, width (vw2px model 25)
|
||||||
|
, paddingEach
|
||||||
|
{ top = 0
|
||||||
|
, bottom = vh2pt model 22.5
|
||||||
|
, left = 0
|
||||||
|
, right = 0
|
||||||
|
}
|
||||||
|
, Font.color white
|
||||||
|
, Font.family [ Font.typeface "Inter" ]
|
||||||
|
, Font.size 18
|
||||||
|
]
|
||||||
|
(row [ spacing 20 ]
|
||||||
|
[ inlineLinkInt "Entries" "/entries"
|
||||||
|
, inlineLinkInt "Access" "/about"
|
||||||
|
, inlineLinkInt "Colophon" "/colophon"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
pageHome : Model -> List (Html Msg)
|
pageHome : Model -> List (Html Msg)
|
||||||
pageHome model =
|
pageHome model =
|
||||||
[ Element.layout
|
[ Element.layout
|
||||||
|
@ -432,7 +454,7 @@ pageHome model =
|
||||||
, width (vw2px model 50)
|
, width (vw2px model 50)
|
||||||
, height (vh2px model 100)
|
, height (vh2px model 100)
|
||||||
, paddingEach
|
, paddingEach
|
||||||
{ top = vh2pt model 50 - 96
|
{ top = vh2pt model 20 - 96
|
||||||
, bottom = 0
|
, bottom = 0
|
||||||
, left = vw2pt model 10
|
, left = vw2pt model 10
|
||||||
, right = 0
|
, right = 0
|
||||||
|
@ -443,7 +465,8 @@ pageHome model =
|
||||||
(column
|
(column
|
||||||
[ spacing 35
|
[ spacing 35
|
||||||
]
|
]
|
||||||
[ text "MacGregor House"
|
[ menu model
|
||||||
|
, text "MacGregor House"
|
||||||
, column [ spacing 15 ]
|
, column [ spacing 15 ]
|
||||||
[ row
|
[ row
|
||||||
[ spacing 15
|
[ spacing 15
|
||||||
|
|
Loading…
Reference in a new issue