mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-16 12:25:12 -05:00
feat: added two articles
This commit is contained in:
parent
3a22edfad4
commit
4bddff2911
233 changed files with 7050 additions and 4 deletions
195
frontend/src/Pages/Blog/Bigfatsurprise.elm
Normal file
195
frontend/src/Pages/Blog/Bigfatsurprise.elm
Normal file
|
@ -0,0 +1,195 @@
|
|||
module Pages.Blog.Bigfatsurprise exposing (Model, Msg, page)
|
||||
|
||||
import Config.Data.Identity exposing (pageNames)
|
||||
import Config.Helpers.CardFormat
|
||||
exposing
|
||||
( cardContentSpacing
|
||||
, cardFormatter
|
||||
, cardMaker
|
||||
, cardSubTitleMaker
|
||||
, cardTitleMaker
|
||||
, desktopCardMaker
|
||||
, desktopImageBoxSize
|
||||
, desktopImageSize
|
||||
, fieldSpacer
|
||||
, mobileCardMaker
|
||||
, mobileImageBoxSize
|
||||
, mobileImageSize
|
||||
, topLevelBox
|
||||
)
|
||||
import Config.Helpers.Format exposing (..)
|
||||
import Config.Helpers.Header
|
||||
exposing
|
||||
( Header
|
||||
, headerMaker
|
||||
)
|
||||
import Config.Helpers.Markdown exposing (..)
|
||||
import Config.Helpers.References exposing (makeReference)
|
||||
import Config.Helpers.Response
|
||||
exposing
|
||||
( pageList
|
||||
, topLevelContainer
|
||||
)
|
||||
import Config.Helpers.StrengthBar
|
||||
exposing
|
||||
( barMaker
|
||||
, barPadding
|
||||
)
|
||||
import Config.Helpers.ToolTip exposing (..)
|
||||
import Config.Helpers.Viewport exposing (resetViewport)
|
||||
import Config.Pages.Blog.Records.BigFatSurprise exposing (articleBigFatSurprise)
|
||||
import Config.Pages.Blog.Types exposing (BlogArticle)
|
||||
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
|
||||
exposing
|
||||
( hoverFontDarkOrange
|
||||
, transitionStyleFast
|
||||
, transitionStyleSlow
|
||||
)
|
||||
import Effect exposing (Effect)
|
||||
import Element as E exposing (..)
|
||||
import Element.Background as B
|
||||
import Element.Border as D
|
||||
import Element.Font as F
|
||||
import Html
|
||||
import Html.Attributes as H exposing (style)
|
||||
import Layouts
|
||||
import Page exposing (Page)
|
||||
import Route exposing (Route)
|
||||
import Shared exposing (..)
|
||||
import View exposing (View)
|
||||
|
||||
|
||||
page : Shared.Model -> Route () -> Page Model Msg
|
||||
page shared route =
|
||||
Page.new
|
||||
{ init = init
|
||||
, update = update
|
||||
, subscriptions = subscriptions
|
||||
, view = view shared
|
||||
}
|
||||
|> Page.withLayout toLayout
|
||||
|
||||
|
||||
toLayout : Model -> Layouts.Layout Msg
|
||||
toLayout model =
|
||||
Layouts.Navbar {}
|
||||
|
||||
|
||||
|
||||
-- INIT
|
||||
|
||||
|
||||
type alias Model =
|
||||
{}
|
||||
|
||||
|
||||
init : () -> ( Model, Effect Msg )
|
||||
init () =
|
||||
( {}
|
||||
, Effect.none
|
||||
)
|
||||
|
||||
|
||||
|
||||
-- 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 : Shared.Model -> Model -> View Msg
|
||||
view shared model =
|
||||
{ title = pageNames.pageHyperBlog ++ " (bigFatSurprise)"
|
||||
, attributes = []
|
||||
, element = articleContainer shared.device
|
||||
}
|
||||
|
||||
|
||||
articleContainer : Device -> Element msg
|
||||
articleContainer device =
|
||||
topLevelContainer (articleList device)
|
||||
|
||||
|
||||
articleList : Device -> Element msg
|
||||
articleList device =
|
||||
column
|
||||
(case ( device.class, device.orientation ) of
|
||||
_ ->
|
||||
pageList
|
||||
)
|
||||
<|
|
||||
List.concat
|
||||
[ (case ( device.class, device.orientation ) of
|
||||
_ ->
|
||||
List.map articleMaker
|
||||
)
|
||||
[ articleBigFatSurprise ]
|
||||
]
|
||||
|
||||
|
||||
articleMaker : BlogArticle -> Element msg
|
||||
articleMaker article =
|
||||
column
|
||||
topLevelBox
|
||||
[ cardMaker
|
||||
[ cardTitleMaker (String.toUpper articleBigFatSurprise.articleName)
|
||||
, cardFormatter
|
||||
[ cardContentSpacing
|
||||
[ column
|
||||
fieldSpacer
|
||||
[ cardSubTitleMaker
|
||||
[ articleImage articleBigFatSurprise.articleImage
|
||||
, renderDeviceMarkdown articleBigFatSurprise.articleBody
|
||||
, articleReferences article
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
articleReferences : BlogArticle -> Element msg
|
||||
articleReferences article =
|
||||
column
|
||||
[ width fill
|
||||
, height fill
|
||||
, paddingEach
|
||||
{ top = 10
|
||||
, right = 0
|
||||
, bottom = 0
|
||||
, left = 0
|
||||
}
|
||||
]
|
||||
[ column [ width fill, F.size 15, spacing 10 ] <|
|
||||
List.map2 (\x y -> makeReference x y)
|
||||
article.articleReferences
|
||||
(List.range 1 (List.length article.articleReferences))
|
||||
]
|
|
@ -126,7 +126,7 @@ subscriptions model =
|
|||
|
||||
view : Shared.Model -> Model -> View Msg
|
||||
view shared model =
|
||||
{ title = pageNames.pageHyperBlog ++ " (sapienDiet)"
|
||||
{ title = pageNames.pageHyperBlog ++ " (everettVegans)"
|
||||
, attributes = []
|
||||
, element = articleContainer shared.device
|
||||
}
|
||||
|
|
|
@ -126,7 +126,7 @@ subscriptions model =
|
|||
|
||||
view : Shared.Model -> Model -> View Msg
|
||||
view shared model =
|
||||
{ title = pageNames.pageHyperBlog ++ " (NagraGoodrich)"
|
||||
{ title = pageNames.pageHyperBlog ++ " (meatApologetics)"
|
||||
, attributes = []
|
||||
, element = articleContainer shared.device
|
||||
}
|
||||
|
@ -167,6 +167,7 @@ articleMaker article =
|
|||
[ cardSubTitleMaker
|
||||
[ articleImage articleMeatApologetics.articleImage
|
||||
, renderDeviceMarkdown articleMeatApologetics.articleBody
|
||||
, articleReferences article
|
||||
]
|
||||
]
|
||||
]
|
||||
|
|
|
@ -126,7 +126,7 @@ subscriptions model =
|
|||
|
||||
view : Shared.Model -> Model -> View Msg
|
||||
view shared model =
|
||||
{ title = pageNames.pageHyperBlog ++ " (NagraGoodrich)"
|
||||
{ title = pageNames.pageHyperBlog ++ " (nagraGoodrich)"
|
||||
, attributes = []
|
||||
, element = articleContainer shared.device
|
||||
}
|
||||
|
|
194
frontend/src/Pages/Blog/Plantbasedmeta.elm
Normal file
194
frontend/src/Pages/Blog/Plantbasedmeta.elm
Normal file
|
@ -0,0 +1,194 @@
|
|||
module Pages.Blog.Plantbasedmeta exposing (Model, Msg, page)
|
||||
|
||||
import Config.Data.Identity exposing (pageNames)
|
||||
import Config.Helpers.CardFormat
|
||||
exposing
|
||||
( cardContentSpacing
|
||||
, cardFormatter
|
||||
, cardMaker
|
||||
, cardSubTitleMaker
|
||||
, cardTitleMaker
|
||||
, desktopCardMaker
|
||||
, desktopImageBoxSize
|
||||
, desktopImageSize
|
||||
, fieldSpacer
|
||||
, mobileCardMaker
|
||||
, mobileImageBoxSize
|
||||
, mobileImageSize
|
||||
, topLevelBox
|
||||
)
|
||||
import Config.Helpers.Format exposing (..)
|
||||
import Config.Helpers.Header
|
||||
exposing
|
||||
( Header
|
||||
, headerMaker
|
||||
)
|
||||
import Config.Helpers.Markdown exposing (..)
|
||||
import Config.Helpers.References exposing (makeReference)
|
||||
import Config.Helpers.Response
|
||||
exposing
|
||||
( pageList
|
||||
, topLevelContainer
|
||||
)
|
||||
import Config.Helpers.StrengthBar
|
||||
exposing
|
||||
( barMaker
|
||||
, barPadding
|
||||
)
|
||||
import Config.Helpers.ToolTip exposing (..)
|
||||
import Config.Helpers.Viewport exposing (resetViewport)
|
||||
import Config.Pages.Blog.Records.PlantBasedMeta exposing (articlePlantBasedMeta)
|
||||
import Config.Pages.Blog.Types exposing (BlogArticle)
|
||||
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
|
||||
exposing
|
||||
( hoverFontDarkOrange
|
||||
, transitionStyleFast
|
||||
, transitionStyleSlow
|
||||
)
|
||||
import Effect exposing (Effect)
|
||||
import Element as E exposing (..)
|
||||
import Element.Background as B
|
||||
import Element.Border as D
|
||||
import Element.Font as F
|
||||
import Html
|
||||
import Html.Attributes as H exposing (style)
|
||||
import Layouts
|
||||
import Page exposing (Page)
|
||||
import Route exposing (Route)
|
||||
import Shared exposing (..)
|
||||
import View exposing (View)
|
||||
|
||||
|
||||
page : Shared.Model -> Route () -> Page Model Msg
|
||||
page shared route =
|
||||
Page.new
|
||||
{ init = init
|
||||
, update = update
|
||||
, subscriptions = subscriptions
|
||||
, view = view shared
|
||||
}
|
||||
|> Page.withLayout toLayout
|
||||
|
||||
|
||||
toLayout : Model -> Layouts.Layout Msg
|
||||
toLayout model =
|
||||
Layouts.Navbar {}
|
||||
|
||||
|
||||
|
||||
-- INIT
|
||||
|
||||
|
||||
type alias Model =
|
||||
{}
|
||||
|
||||
|
||||
init : () -> ( Model, Effect Msg )
|
||||
init () =
|
||||
( {}
|
||||
, Effect.none
|
||||
)
|
||||
|
||||
|
||||
|
||||
-- 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 : Shared.Model -> Model -> View Msg
|
||||
view shared model =
|
||||
{ title = pageNames.pageHyperBlog ++ " (plantBasedMeta)"
|
||||
, attributes = []
|
||||
, element = articleContainer shared.device
|
||||
}
|
||||
|
||||
|
||||
articleContainer : Device -> Element msg
|
||||
articleContainer device =
|
||||
topLevelContainer (articleList device)
|
||||
|
||||
|
||||
articleList : Device -> Element msg
|
||||
articleList device =
|
||||
column
|
||||
(case ( device.class, device.orientation ) of
|
||||
_ ->
|
||||
pageList
|
||||
)
|
||||
<|
|
||||
List.concat
|
||||
[ (case ( device.class, device.orientation ) of
|
||||
_ ->
|
||||
List.map articleMaker
|
||||
)
|
||||
[ articlePlantBasedMeta ]
|
||||
]
|
||||
|
||||
|
||||
articleMaker : BlogArticle -> Element msg
|
||||
articleMaker article =
|
||||
column
|
||||
topLevelBox
|
||||
[ cardMaker
|
||||
[ cardTitleMaker (String.toUpper articlePlantBasedMeta.articleName)
|
||||
, cardFormatter
|
||||
[ cardContentSpacing
|
||||
[ column
|
||||
fieldSpacer
|
||||
[ cardSubTitleMaker
|
||||
[ articleImage articlePlantBasedMeta.articleImage
|
||||
, renderDeviceMarkdown articlePlantBasedMeta.articleBody
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
articleReferences : BlogArticle -> Element msg
|
||||
articleReferences article =
|
||||
column
|
||||
[ width fill
|
||||
, height fill
|
||||
, paddingEach
|
||||
{ top = 10
|
||||
, right = 0
|
||||
, bottom = 0
|
||||
, left = 0
|
||||
}
|
||||
]
|
||||
[ column [ width fill, F.size 15, spacing 10 ] <|
|
||||
List.map2 (\x y -> makeReference x y)
|
||||
article.articleReferences
|
||||
(List.range 1 (List.length article.articleReferences))
|
||||
]
|
194
frontend/src/Pages/Blog/Shenanigans.elm
Normal file
194
frontend/src/Pages/Blog/Shenanigans.elm
Normal file
|
@ -0,0 +1,194 @@
|
|||
module Pages.Blog.Shenanigans exposing (Model, Msg, page)
|
||||
|
||||
import Config.Data.Identity exposing (pageNames)
|
||||
import Config.Helpers.CardFormat
|
||||
exposing
|
||||
( cardContentSpacing
|
||||
, cardFormatter
|
||||
, cardMaker
|
||||
, cardSubTitleMaker
|
||||
, cardTitleMaker
|
||||
, desktopCardMaker
|
||||
, desktopImageBoxSize
|
||||
, desktopImageSize
|
||||
, fieldSpacer
|
||||
, mobileCardMaker
|
||||
, mobileImageBoxSize
|
||||
, mobileImageSize
|
||||
, topLevelBox
|
||||
)
|
||||
import Config.Helpers.Format exposing (..)
|
||||
import Config.Helpers.Header
|
||||
exposing
|
||||
( Header
|
||||
, headerMaker
|
||||
)
|
||||
import Config.Helpers.Markdown exposing (..)
|
||||
import Config.Helpers.References exposing (makeReference)
|
||||
import Config.Helpers.Response
|
||||
exposing
|
||||
( pageList
|
||||
, topLevelContainer
|
||||
)
|
||||
import Config.Helpers.StrengthBar
|
||||
exposing
|
||||
( barMaker
|
||||
, barPadding
|
||||
)
|
||||
import Config.Helpers.ToolTip exposing (..)
|
||||
import Config.Helpers.Viewport exposing (resetViewport)
|
||||
import Config.Pages.Blog.Records.Shenangians exposing (articleShenanigans)
|
||||
import Config.Pages.Blog.Types exposing (BlogArticle)
|
||||
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
|
||||
exposing
|
||||
( hoverFontDarkOrange
|
||||
, transitionStyleFast
|
||||
, transitionStyleSlow
|
||||
)
|
||||
import Effect exposing (Effect)
|
||||
import Element as E exposing (..)
|
||||
import Element.Background as B
|
||||
import Element.Border as D
|
||||
import Element.Font as F
|
||||
import Html
|
||||
import Html.Attributes as H exposing (style)
|
||||
import Layouts
|
||||
import Page exposing (Page)
|
||||
import Route exposing (Route)
|
||||
import Shared exposing (..)
|
||||
import View exposing (View)
|
||||
|
||||
|
||||
page : Shared.Model -> Route () -> Page Model Msg
|
||||
page shared route =
|
||||
Page.new
|
||||
{ init = init
|
||||
, update = update
|
||||
, subscriptions = subscriptions
|
||||
, view = view shared
|
||||
}
|
||||
|> Page.withLayout toLayout
|
||||
|
||||
|
||||
toLayout : Model -> Layouts.Layout Msg
|
||||
toLayout model =
|
||||
Layouts.Navbar {}
|
||||
|
||||
|
||||
|
||||
-- INIT
|
||||
|
||||
|
||||
type alias Model =
|
||||
{}
|
||||
|
||||
|
||||
init : () -> ( Model, Effect Msg )
|
||||
init () =
|
||||
( {}
|
||||
, Effect.none
|
||||
)
|
||||
|
||||
|
||||
|
||||
-- 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 : Shared.Model -> Model -> View Msg
|
||||
view shared model =
|
||||
{ title = pageNames.pageHyperBlog ++ " (shenanigans)"
|
||||
, attributes = []
|
||||
, element = articleContainer shared.device
|
||||
}
|
||||
|
||||
|
||||
articleContainer : Device -> Element msg
|
||||
articleContainer device =
|
||||
topLevelContainer (articleList device)
|
||||
|
||||
|
||||
articleList : Device -> Element msg
|
||||
articleList device =
|
||||
column
|
||||
(case ( device.class, device.orientation ) of
|
||||
_ ->
|
||||
pageList
|
||||
)
|
||||
<|
|
||||
List.concat
|
||||
[ (case ( device.class, device.orientation ) of
|
||||
_ ->
|
||||
List.map articleMaker
|
||||
)
|
||||
[ articleShenanigans ]
|
||||
]
|
||||
|
||||
|
||||
articleMaker : BlogArticle -> Element msg
|
||||
articleMaker article =
|
||||
column
|
||||
topLevelBox
|
||||
[ cardMaker
|
||||
[ cardTitleMaker (String.toUpper articleShenanigans.articleName)
|
||||
, cardFormatter
|
||||
[ cardContentSpacing
|
||||
[ column
|
||||
fieldSpacer
|
||||
[ cardSubTitleMaker
|
||||
[ articleImage articleShenanigans.articleImage
|
||||
, renderDeviceMarkdown articleShenanigans.articleBody
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
articleReferences : BlogArticle -> Element msg
|
||||
articleReferences article =
|
||||
column
|
||||
[ width fill
|
||||
, height fill
|
||||
, paddingEach
|
||||
{ top = 10
|
||||
, right = 0
|
||||
, bottom = 0
|
||||
, left = 0
|
||||
}
|
||||
]
|
||||
[ column [ width fill, F.size 15, spacing 10 ] <|
|
||||
List.map2 (\x y -> makeReference x y)
|
||||
article.articleReferences
|
||||
(List.range 1 (List.length article.articleReferences))
|
||||
]
|
195
frontend/src/Pages/Blog/Sweetdeception.elm
Normal file
195
frontend/src/Pages/Blog/Sweetdeception.elm
Normal file
|
@ -0,0 +1,195 @@
|
|||
module Pages.Blog.Sweetdeception exposing (Model, Msg, page)
|
||||
|
||||
import Config.Data.Identity exposing (pageNames)
|
||||
import Config.Helpers.CardFormat
|
||||
exposing
|
||||
( cardContentSpacing
|
||||
, cardFormatter
|
||||
, cardMaker
|
||||
, cardSubTitleMaker
|
||||
, cardTitleMaker
|
||||
, desktopCardMaker
|
||||
, desktopImageBoxSize
|
||||
, desktopImageSize
|
||||
, fieldSpacer
|
||||
, mobileCardMaker
|
||||
, mobileImageBoxSize
|
||||
, mobileImageSize
|
||||
, topLevelBox
|
||||
)
|
||||
import Config.Helpers.Format exposing (..)
|
||||
import Config.Helpers.Header
|
||||
exposing
|
||||
( Header
|
||||
, headerMaker
|
||||
)
|
||||
import Config.Helpers.Markdown exposing (..)
|
||||
import Config.Helpers.References exposing (makeReference)
|
||||
import Config.Helpers.Response
|
||||
exposing
|
||||
( pageList
|
||||
, topLevelContainer
|
||||
)
|
||||
import Config.Helpers.StrengthBar
|
||||
exposing
|
||||
( barMaker
|
||||
, barPadding
|
||||
)
|
||||
import Config.Helpers.ToolTip exposing (..)
|
||||
import Config.Helpers.Viewport exposing (resetViewport)
|
||||
import Config.Pages.Blog.Records.SweetDeception exposing (articleSweetDeception)
|
||||
import Config.Pages.Blog.Types exposing (BlogArticle)
|
||||
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
|
||||
exposing
|
||||
( hoverFontDarkOrange
|
||||
, transitionStyleFast
|
||||
, transitionStyleSlow
|
||||
)
|
||||
import Effect exposing (Effect)
|
||||
import Element as E exposing (..)
|
||||
import Element.Background as B
|
||||
import Element.Border as D
|
||||
import Element.Font as F
|
||||
import Html
|
||||
import Html.Attributes as H exposing (style)
|
||||
import Layouts
|
||||
import Page exposing (Page)
|
||||
import Route exposing (Route)
|
||||
import Shared exposing (..)
|
||||
import View exposing (View)
|
||||
|
||||
|
||||
page : Shared.Model -> Route () -> Page Model Msg
|
||||
page shared route =
|
||||
Page.new
|
||||
{ init = init
|
||||
, update = update
|
||||
, subscriptions = subscriptions
|
||||
, view = view shared
|
||||
}
|
||||
|> Page.withLayout toLayout
|
||||
|
||||
|
||||
toLayout : Model -> Layouts.Layout Msg
|
||||
toLayout model =
|
||||
Layouts.Navbar {}
|
||||
|
||||
|
||||
|
||||
-- INIT
|
||||
|
||||
|
||||
type alias Model =
|
||||
{}
|
||||
|
||||
|
||||
init : () -> ( Model, Effect Msg )
|
||||
init () =
|
||||
( {}
|
||||
, Effect.none
|
||||
)
|
||||
|
||||
|
||||
|
||||
-- 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 : Shared.Model -> Model -> View Msg
|
||||
view shared model =
|
||||
{ title = pageNames.pageHyperBlog ++ " (sweetDeception)"
|
||||
, attributes = []
|
||||
, element = articleContainer shared.device
|
||||
}
|
||||
|
||||
|
||||
articleContainer : Device -> Element msg
|
||||
articleContainer device =
|
||||
topLevelContainer (articleList device)
|
||||
|
||||
|
||||
articleList : Device -> Element msg
|
||||
articleList device =
|
||||
column
|
||||
(case ( device.class, device.orientation ) of
|
||||
_ ->
|
||||
pageList
|
||||
)
|
||||
<|
|
||||
List.concat
|
||||
[ (case ( device.class, device.orientation ) of
|
||||
_ ->
|
||||
List.map articleMaker
|
||||
)
|
||||
[ articleSweetDeception ]
|
||||
]
|
||||
|
||||
|
||||
articleMaker : BlogArticle -> Element msg
|
||||
articleMaker article =
|
||||
column
|
||||
topLevelBox
|
||||
[ cardMaker
|
||||
[ cardTitleMaker (String.toUpper articleSweetDeception.articleName)
|
||||
, cardFormatter
|
||||
[ cardContentSpacing
|
||||
[ column
|
||||
fieldSpacer
|
||||
[ cardSubTitleMaker
|
||||
[ articleImage articleSweetDeception.articleImage
|
||||
, renderDeviceMarkdown articleSweetDeception.articleBody
|
||||
, articleReferences article
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
articleReferences : BlogArticle -> Element msg
|
||||
articleReferences article =
|
||||
column
|
||||
[ width fill
|
||||
, height fill
|
||||
, paddingEach
|
||||
{ top = 10
|
||||
, right = 0
|
||||
, bottom = 0
|
||||
, left = 0
|
||||
}
|
||||
]
|
||||
[ column [ width fill, F.size 15, spacing 10 ] <|
|
||||
List.map2 (\x y -> makeReference x y)
|
||||
article.articleReferences
|
||||
(List.range 1 (List.length article.articleReferences))
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue