2024-12-16 00:12:23 -06:00
|
|
|
module Pages.Blog.Seedoils exposing (Model, Msg, page)
|
2024-11-26 21:17:31 -06:00
|
|
|
|
2024-12-09 19:53:09 -06:00
|
|
|
import Config.Data.Identity exposing (pageNames)
|
2024-12-15 02:31:26 -06:00
|
|
|
import Config.Helpers.CardFormat
|
|
|
|
exposing
|
|
|
|
( cardContentSpacing
|
|
|
|
, cardFormatter
|
|
|
|
, cardMaker
|
2024-12-16 00:12:23 -06:00
|
|
|
, cardSubTitleMaker
|
2024-12-15 02:31:26 -06:00
|
|
|
, cardTitleMaker
|
|
|
|
, desktopCardMaker
|
|
|
|
, desktopImageBoxSize
|
|
|
|
, desktopImageSize
|
|
|
|
, fieldSpacer
|
|
|
|
, mobileCardMaker
|
|
|
|
, mobileImageBoxSize
|
|
|
|
, mobileImageSize
|
|
|
|
, topLevelBox
|
|
|
|
)
|
2024-12-16 00:12:23 -06:00
|
|
|
import Config.Helpers.Format exposing (..)
|
|
|
|
import Config.Helpers.Header
|
|
|
|
exposing
|
|
|
|
( Header
|
|
|
|
, headerMaker
|
|
|
|
)
|
|
|
|
import Config.Helpers.Markdown exposing (..)
|
2024-12-11 03:48:49 -06:00
|
|
|
import Config.Helpers.Response
|
2024-12-09 19:53:09 -06:00
|
|
|
exposing
|
2024-12-09 20:30:04 -06:00
|
|
|
( pageList
|
2024-12-09 19:53:09 -06:00
|
|
|
, topLevelContainer
|
|
|
|
)
|
2024-12-16 00:12:23 -06:00
|
|
|
import Config.Helpers.StrengthBar
|
|
|
|
exposing
|
|
|
|
( barMaker
|
|
|
|
, barPadding
|
|
|
|
)
|
|
|
|
import Config.Helpers.ToolTip exposing (..)
|
2024-12-09 19:53:09 -06:00
|
|
|
import Config.Helpers.Viewport exposing (resetViewport)
|
2024-12-16 00:12:23 -06:00
|
|
|
import Config.Pages.Blog.Records.SeedOils exposing (articleSeedOils)
|
|
|
|
import Config.Pages.Contact.Types exposing (..)
|
|
|
|
import Config.Pages.Interviews.Types exposing (..)
|
|
|
|
import Config.Pages.Products.Types exposing (..)
|
|
|
|
import Config.Style.Colour exposing (colourTheme)
|
|
|
|
import Config.Style.Transitions
|
2024-12-15 03:01:13 -06:00
|
|
|
exposing
|
2024-12-16 00:12:23 -06:00
|
|
|
( hoverFontDarkOrange
|
|
|
|
, transitionStyleFast
|
|
|
|
, transitionStyleSlow
|
2024-12-15 03:01:13 -06:00
|
|
|
)
|
2024-11-26 21:17:31 -06:00
|
|
|
import Effect exposing (Effect)
|
2024-12-09 19:53:09 -06:00
|
|
|
import Element as E exposing (..)
|
2024-12-16 00:12:23 -06:00
|
|
|
import Element.Background as B
|
|
|
|
import Element.Border as D
|
|
|
|
import Element.Font as F
|
|
|
|
import Html
|
|
|
|
import Html.Attributes as H exposing (style)
|
2024-11-26 21:17:31 -06:00
|
|
|
import Layouts
|
|
|
|
import Page exposing (Page)
|
|
|
|
import Route exposing (Route)
|
|
|
|
import Shared exposing (..)
|
|
|
|
import View exposing (View)
|
2024-12-08 21:35:48 -06:00
|
|
|
|
|
|
|
|
2024-11-26 21:17:31 -06:00
|
|
|
page : Shared.Model -> Route () -> Page Model Msg
|
|
|
|
page shared route =
|
|
|
|
Page.new
|
|
|
|
{ init = init
|
|
|
|
, update = update
|
|
|
|
, subscriptions = subscriptions
|
2024-12-08 21:35:48 -06:00
|
|
|
, view = view shared
|
2024-11-26 21:17:31 -06:00
|
|
|
}
|
2024-12-01 02:56:13 -06:00
|
|
|
|> Page.withLayout toLayout
|
|
|
|
|
|
|
|
|
|
|
|
toLayout : Model -> Layouts.Layout Msg
|
|
|
|
toLayout model =
|
2024-12-06 22:03:24 -06:00
|
|
|
Layouts.Navbar {}
|
2024-11-26 21:17:31 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- INIT
|
|
|
|
|
|
|
|
|
|
|
|
type alias Model =
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
|
|
init : () -> ( Model, Effect Msg )
|
|
|
|
init () =
|
|
|
|
( {}
|
2024-12-16 00:12:23 -06:00
|
|
|
, Effect.none
|
2024-11-26 21:17:31 -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
|
|
|
|
|
|
|
|
|
2024-12-08 21:35:48 -06:00
|
|
|
view : Shared.Model -> Model -> View Msg
|
|
|
|
view shared model =
|
2024-12-16 04:19:13 -06:00
|
|
|
{ title = pageNames.pageHyperBlog ++ "(seedOils)"
|
2024-12-01 02:56:13 -06:00
|
|
|
, attributes = []
|
2024-12-16 00:12:23 -06:00
|
|
|
, element = articleContainer shared.device
|
2024-12-01 02:56:13 -06:00
|
|
|
}
|
2024-12-08 21:35:48 -06:00
|
|
|
|
|
|
|
|
2024-12-16 00:12:23 -06:00
|
|
|
articleContainer : Device -> Element msg
|
|
|
|
articleContainer device =
|
|
|
|
topLevelContainer (articleList device)
|
2024-12-08 21:35:48 -06:00
|
|
|
|
|
|
|
|
2024-12-16 00:12:23 -06:00
|
|
|
articleList : Device -> Element msg
|
|
|
|
articleList device =
|
2024-12-09 20:30:04 -06:00
|
|
|
column pageList <|
|
2024-12-08 21:35:48 -06:00
|
|
|
List.concat
|
|
|
|
(case ( device.class, device.orientation ) of
|
|
|
|
_ ->
|
2024-12-16 00:12:23 -06:00
|
|
|
[ [ articleMaker ] ]
|
2024-12-08 21:35:48 -06:00
|
|
|
)
|
2024-12-15 03:01:13 -06:00
|
|
|
|
|
|
|
|
2024-12-16 00:12:23 -06:00
|
|
|
articleMaker : Element msg
|
|
|
|
articleMaker =
|
|
|
|
column
|
|
|
|
topLevelBox
|
|
|
|
[ cardMaker
|
|
|
|
[ cardTitleMaker (String.toUpper articleSeedOils.articleName)
|
|
|
|
, cardFormatter
|
|
|
|
[ cardContentSpacing
|
|
|
|
[ column
|
|
|
|
fieldSpacer
|
|
|
|
[ cardSubTitleMaker
|
|
|
|
[ articleImage articleSeedOils.articleImage
|
|
|
|
, renderDeviceMarkdown articleSeedOils.articleBody
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|