2024-11-11 03:57:54 -06:00
|
|
|
module Pages.Home_ exposing (Model, Msg, page)
|
2024-11-10 22:55:49 -06:00
|
|
|
|
2024-11-26 21:17:36 -06:00
|
|
|
import Blog.Helpers exposing (..)
|
2024-11-11 21:57:27 -06:00
|
|
|
import Config.Colour as T exposing (..)
|
|
|
|
import Config.Format as O exposing (..)
|
|
|
|
import Config.Identity as I exposing (..)
|
2024-12-03 04:59:27 -06:00
|
|
|
import Config.Viewport exposing (..)
|
2024-11-11 03:57:54 -06:00
|
|
|
import Effect exposing (Effect)
|
2024-12-06 00:43:00 -06:00
|
|
|
import Element as E exposing (..)
|
|
|
|
import Element.Background as B exposing (..)
|
|
|
|
import Element.Border as D exposing (..)
|
2024-11-26 21:17:36 -06:00
|
|
|
import Element.Font as F
|
2024-11-11 03:57:54 -06:00
|
|
|
import Html.Attributes as H exposing (style)
|
|
|
|
import Layouts
|
|
|
|
import Page exposing (Page)
|
|
|
|
import Route exposing (Route)
|
2024-11-26 21:17:36 -06:00
|
|
|
import Shared exposing (..)
|
2024-11-10 22:55:49 -06:00
|
|
|
import View exposing (View)
|
2024-12-06 00:43:00 -06:00
|
|
|
import Config.Response exposing (..)
|
2024-11-10 22:55:49 -06:00
|
|
|
|
2024-11-11 03:57:54 -06:00
|
|
|
page : Shared.Model -> Route () -> Page Model Msg
|
|
|
|
page shared route =
|
|
|
|
Page.new
|
|
|
|
{ init = init
|
|
|
|
, update = update
|
|
|
|
, subscriptions = subscriptions
|
|
|
|
, view = view
|
|
|
|
}
|
2024-11-27 15:11:21 -06:00
|
|
|
|> Page.withLayout toLayout
|
|
|
|
|
|
|
|
|
|
|
|
toLayout : Model -> Layouts.Layout Msg
|
|
|
|
toLayout model =
|
2024-12-06 00:43:00 -06:00
|
|
|
Layouts.Navbar { currentRoute = homeName }
|
2024-11-10 22:55:49 -06:00
|
|
|
|
2024-11-11 03:57:54 -06:00
|
|
|
|
|
|
|
|
|
|
|
-- INIT
|
|
|
|
|
|
|
|
|
|
|
|
type alias Model =
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
init : () -> ( Model, Effect Msg )
|
|
|
|
init () =
|
|
|
|
( {}
|
2024-12-03 04:59:27 -06:00
|
|
|
, Effect.map
|
|
|
|
(\_ -> NoOp)
|
|
|
|
(Effect.sendCmd resetViewport)
|
2024-11-11 03:57:54 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- UPDATE
|
|
|
|
|
|
|
|
|
|
|
|
type Msg
|
|
|
|
= NoOp
|
|
|
|
|
|
|
|
|
|
|
|
update : Msg -> Model -> ( Model, Effect Msg )
|
|
|
|
update msg model =
|
|
|
|
case msg of
|
|
|
|
NoOp ->
|
|
|
|
( model
|
|
|
|
, Effect.none
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- SUBSCRIPTIONS
|
|
|
|
|
|
|
|
|
|
|
|
subscriptions : Model -> Sub Msg
|
|
|
|
subscriptions model =
|
|
|
|
Sub.none
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- VIEW
|
|
|
|
|
|
|
|
|
|
|
|
view : Model -> View Msg
|
|
|
|
view model =
|
2024-12-05 15:44:50 -06:00
|
|
|
{ title = ""
|
2024-11-28 19:49:28 -06:00
|
|
|
, attributes = []
|
|
|
|
, element = homeContainer
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
homeContainer : Element msg
|
|
|
|
homeContainer =
|
|
|
|
topLevelContainer homeList
|
|
|
|
|
|
|
|
|
|
|
|
homeList : Element msg
|
|
|
|
homeList =
|
2024-12-06 00:43:00 -06:00
|
|
|
column pageListDesktop
|
|
|
|
[ column
|
|
|
|
[ centerX
|
|
|
|
, centerY
|
|
|
|
, spacing 20
|
|
|
|
]
|
|
|
|
[ row [ centerX ]
|
|
|
|
[ E.image [ E.width <| px 785 ]
|
|
|
|
{ src = "assets/logo_extended.png"
|
|
|
|
, description = ""
|
|
|
|
}
|
|
|
|
]
|
|
|
|
, column
|
|
|
|
[ paddingEach
|
|
|
|
{ top = 15
|
|
|
|
, bottom = 15
|
|
|
|
, left = 20
|
|
|
|
, right = 20
|
|
|
|
}
|
|
|
|
, B.color colourTheme.backgroundDarkGrey
|
|
|
|
, rounded 10
|
|
|
|
, E.width fill
|
|
|
|
, spacing 8
|
|
|
|
]
|
|
|
|
[ paragraph (paragraphFormat ++ [ centerX ]) [ text "upRootNutrition is an open source project, created by Nick Hiebert, designed to elevate the quality of nutrition science communication in online discourse. By applying more rigorous systems of reasoning, such as formal logic, upRootNutrition aims to cut through the misinformation and sophistry that are endemic on social media." ]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|