From 95cd8fa0a8b22b7d59bae14b5379f940a4946878 Mon Sep 17 00:00:00 2001 From: Ananth Venkatesh Date: Fri, 14 Feb 2025 01:57:46 -0500 Subject: [PATCH] feat: add page menu --- src/Main.elm | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/src/Main.elm b/src/Main.elm index cfd8520..dfe6d5f 100644 --- a/src/Main.elm +++ b/src/Main.elm @@ -1,7 +1,5 @@ module Main exposing (Flags, Model, Msg, Object3d, main, sitemap) --- TODO: entries, colophon, contact/access - import Angle import Array 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 = [ Element.layout @@ -432,7 +454,7 @@ pageHome model = , width (vw2px model 50) , height (vh2px model 100) , paddingEach - { top = vh2pt model 50 - 96 + { top = vh2pt model 20 - 96 , bottom = 0 , left = vw2pt model 10 , right = 0 @@ -443,7 +465,8 @@ pageHome model = (column [ spacing 35 ] - [ text "MacGregor House" + [ menu model + , text "MacGregor House" , column [ spacing 15 ] [ row [ spacing 15