feat: refactoring and tidying up

This commit is contained in:
Nick 2024-12-18 20:11:04 -06:00
parent 62be86f2f9
commit 2295c85fca
112 changed files with 862 additions and 1698 deletions

View file

@ -1,6 +1,7 @@
module Pages.Blog.Bigfatsurprise exposing (Model, Msg, page)
import Config.Data.Identity exposing (pageNames)
import Config.Helpers.Articles.Article exposing (articleMaker)
import Config.Helpers.CardFormat
exposing
( cardContentSpacing
@ -17,45 +18,16 @@ import Config.Helpers.CardFormat
, 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.Headers.Types exposing (Header)
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)
@ -90,7 +62,9 @@ type alias Model =
init : () -> ( Model, Effect Msg )
init () =
( {}
, Effect.none
, Effect.map
(\_ -> NoOp)
(Effect.sendCmd resetViewport)
)
@ -152,44 +126,3 @@ articleList device =
)
[ 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))
]

View file

@ -1,6 +1,7 @@
module Pages.Blog.Everettvegans exposing (Model, Msg, page)
import Config.Data.Identity exposing (pageNames)
import Config.Helpers.Articles.Article exposing (articleMaker)
import Config.Helpers.CardFormat
exposing
( cardContentSpacing
@ -17,45 +18,16 @@ import Config.Helpers.CardFormat
, 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.Headers.Types exposing (Header)
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.EverettVegans exposing (articleEverettVegans)
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)
@ -90,7 +62,9 @@ type alias Model =
init : () -> ( Model, Effect Msg )
init () =
( {}
, Effect.none
, Effect.map
(\_ -> NoOp)
(Effect.sendCmd resetViewport)
)
@ -152,44 +126,3 @@ articleList device =
)
[ articleEverettVegans ]
]
articleMaker : BlogArticle -> Element msg
articleMaker article =
column
topLevelBox
[ cardMaker
[ cardTitleMaker (String.toUpper articleEverettVegans.articleName)
, cardFormatter
[ cardContentSpacing
[ column
fieldSpacer
[ cardSubTitleMaker
[ articleImage articleEverettVegans.articleImage
, renderDeviceMarkdown articleEverettVegans.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))
]

View file

@ -1,6 +1,7 @@
module Pages.Blog.Huntergatherers exposing (Model, Msg, page)
import Config.Data.Identity exposing (pageNames)
import Config.Helpers.Articles.Article exposing (articleMaker)
import Config.Helpers.CardFormat
exposing
( cardContentSpacing
@ -17,45 +18,16 @@ import Config.Helpers.CardFormat
, 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.Headers.Types exposing (Header)
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.HunterGatherers exposing (articleHunterGatherers)
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)
@ -90,7 +62,9 @@ type alias Model =
init : () -> ( Model, Effect Msg )
init () =
( {}
, Effect.none
, Effect.map
(\_ -> NoOp)
(Effect.sendCmd resetViewport)
)
@ -152,44 +126,3 @@ articleList device =
)
[ articleHunterGatherers ]
]
articleMaker : BlogArticle -> Element msg
articleMaker article =
column
topLevelBox
[ cardMaker
[ cardTitleMaker (String.toUpper articleHunterGatherers.articleName)
, cardFormatter
[ cardContentSpacing
[ column
fieldSpacer
[ cardSubTitleMaker
[ articleImage articleHunterGatherers.articleImage
, renderDeviceMarkdown articleHunterGatherers.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))
]

View file

@ -1,6 +1,7 @@
module Pages.Blog.Meatapologetics exposing (Model, Msg, page)
import Config.Data.Identity exposing (pageNames)
import Config.Helpers.Articles.Article exposing (articleMaker)
import Config.Helpers.CardFormat
exposing
( cardContentSpacing
@ -17,45 +18,17 @@ import Config.Helpers.CardFormat
, 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.Headers.Header exposing (headerMaker)
import Config.Helpers.Headers.Types exposing (Header)
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.MeatApologetics exposing (articleMeatApologetics)
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)
@ -90,7 +63,9 @@ type alias Model =
init : () -> ( Model, Effect Msg )
init () =
( {}
, Effect.none
, Effect.map
(\_ -> NoOp)
(Effect.sendCmd resetViewport)
)
@ -152,44 +127,3 @@ articleList device =
)
[ articleMeatApologetics ]
]
articleMaker : BlogArticle -> Element msg
articleMaker article =
column
topLevelBox
[ cardMaker
[ cardTitleMaker (String.toUpper articleMeatApologetics.articleName)
, cardFormatter
[ cardContentSpacing
[ column
fieldSpacer
[ cardSubTitleMaker
[ articleImage articleMeatApologetics.articleImage
, renderDeviceMarkdown articleMeatApologetics.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))
]

View file

@ -1,6 +1,7 @@
module Pages.Blog.Nagragoodrich exposing (Model, Msg, page)
import Config.Data.Identity exposing (pageNames)
import Config.Helpers.Articles.Article exposing (articleMaker)
import Config.Helpers.CardFormat
exposing
( cardContentSpacing
@ -17,45 +18,17 @@ import Config.Helpers.CardFormat
, 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.Headers.Header exposing (headerMaker)
import Config.Helpers.Headers.Types exposing (Header)
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.NagraGoodrich exposing (articleNagraGoodrich)
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)
@ -90,7 +63,9 @@ type alias Model =
init : () -> ( Model, Effect Msg )
init () =
( {}
, Effect.none
, Effect.map
(\_ -> NoOp)
(Effect.sendCmd resetViewport)
)
@ -152,43 +127,3 @@ articleList device =
)
[ articleNagraGoodrich ]
]
articleMaker : BlogArticle -> Element msg
articleMaker article =
column
topLevelBox
[ cardMaker
[ cardTitleMaker (String.toUpper articleNagraGoodrich.articleName)
, cardFormatter
[ cardContentSpacing
[ column
fieldSpacer
[ cardSubTitleMaker
[ articleImage articleNagraGoodrich.articleImage
, renderDeviceMarkdown articleNagraGoodrich.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))
]

View file

@ -1,6 +1,7 @@
module Pages.Blog.Plantbasedmeta exposing (Model, Msg, page)
import Config.Data.Identity exposing (pageNames)
import Config.Helpers.Articles.Article exposing (articleMaker)
import Config.Helpers.CardFormat
exposing
( cardContentSpacing
@ -17,45 +18,17 @@ import Config.Helpers.CardFormat
, 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.Headers.Header exposing (headerMaker)
import Config.Helpers.Headers.Types exposing (Header)
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)
@ -90,7 +63,9 @@ type alias Model =
init : () -> ( Model, Effect Msg )
init () =
( {}
, Effect.none
, Effect.map
(\_ -> NoOp)
(Effect.sendCmd resetViewport)
)
@ -152,43 +127,3 @@ articleList device =
)
[ 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))
]

View file

@ -1,6 +1,7 @@
module Pages.Blog.Quacksmashing exposing (Model, Msg, page)
import Config.Data.Identity exposing (pageNames)
import Config.Helpers.Articles.Article exposing (articleMaker)
import Config.Helpers.CardFormat
exposing
( cardContentSpacing
@ -17,45 +18,17 @@ import Config.Helpers.CardFormat
, 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.Headers.Header exposing (headerMaker)
import Config.Helpers.Headers.Types exposing (Header)
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.QuackSmashing exposing (articleQuackSmashing)
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)
@ -90,7 +63,9 @@ type alias Model =
init : () -> ( Model, Effect Msg )
init () =
( {}
, Effect.none
, Effect.map
(\_ -> NoOp)
(Effect.sendCmd resetViewport)
)
@ -152,44 +127,3 @@ articleList device =
)
[ articleQuackSmashing ]
]
articleMaker : BlogArticle -> Element msg
articleMaker article =
column
topLevelBox
[ cardMaker
[ cardTitleMaker (String.toUpper articleQuackSmashing.articleName)
, cardFormatter
[ cardContentSpacing
[ column
fieldSpacer
[ cardSubTitleMaker
[ articleImage articleQuackSmashing.articleImage
, renderDeviceMarkdown articleQuackSmashing.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))
]

View file

@ -1,6 +1,7 @@
module Pages.Blog.Sapiendiet exposing (Model, Msg, page)
import Config.Data.Identity exposing (pageNames)
import Config.Helpers.Articles.Article exposing (articleMaker)
import Config.Helpers.CardFormat
exposing
( cardContentSpacing
@ -17,45 +18,17 @@ import Config.Helpers.CardFormat
, 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.Headers.Header exposing (headerMaker)
import Config.Helpers.Headers.Types exposing (Header)
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.SapienDiet exposing (articleSapienDiet)
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)
@ -90,7 +63,9 @@ type alias Model =
init : () -> ( Model, Effect Msg )
init () =
( {}
, Effect.none
, Effect.map
(\_ -> NoOp)
(Effect.sendCmd resetViewport)
)
@ -152,44 +127,3 @@ articleList device =
)
[ articleSapienDiet ]
]
articleMaker : BlogArticle -> Element msg
articleMaker article =
column
topLevelBox
[ cardMaker
[ cardTitleMaker (String.toUpper articleSapienDiet.articleName)
, cardFormatter
[ cardContentSpacing
[ column
fieldSpacer
[ cardSubTitleMaker
[ articleImage articleSapienDiet.articleImage
, renderDeviceMarkdown articleSapienDiet.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))
]

View file

@ -1,6 +1,7 @@
module Pages.Blog.Seedoils exposing (Model, Msg, page)
import Config.Data.Identity exposing (pageNames)
import Config.Helpers.Articles.Article exposing (articleMaker)
import Config.Helpers.CardFormat
exposing
( cardContentSpacing
@ -17,45 +18,17 @@ import Config.Helpers.CardFormat
, 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.Headers.Header exposing (headerMaker)
import Config.Helpers.Headers.Types exposing (Header)
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.SeedOils exposing (articleSeedOils)
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)
@ -90,7 +63,9 @@ type alias Model =
init : () -> ( Model, Effect Msg )
init () =
( {}
, Effect.none
, Effect.map
(\_ -> NoOp)
(Effect.sendCmd resetViewport)
)
@ -152,44 +127,3 @@ articleList device =
)
[ articleSeedOils ]
]
articleMaker : BlogArticle -> Element msg
articleMaker article =
column
topLevelBox
[ cardMaker
[ cardTitleMaker (String.toUpper articleSeedOils.articleName)
, cardFormatter
[ cardContentSpacing
[ column
fieldSpacer
[ cardSubTitleMaker
[ articleImage articleSeedOils.articleImage
, renderDeviceMarkdown articleSeedOils.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))
]

View file

@ -1,6 +1,7 @@
module Pages.Blog.Shenanigans exposing (Model, Msg, page)
import Config.Data.Identity exposing (pageNames)
import Config.Helpers.Articles.Article exposing (articleMaker)
import Config.Helpers.CardFormat
exposing
( cardContentSpacing
@ -17,45 +18,17 @@ import Config.Helpers.CardFormat
, 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.Headers.Header exposing (headerMaker)
import Config.Helpers.Headers.Types exposing (Header)
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)
@ -90,7 +63,9 @@ type alias Model =
init : () -> ( Model, Effect Msg )
init () =
( {}
, Effect.none
, Effect.map
(\_ -> NoOp)
(Effect.sendCmd resetViewport)
)
@ -152,43 +127,3 @@ articleList device =
)
[ 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))
]

View file

@ -1,6 +1,7 @@
module Pages.Blog.Sweetdeception exposing (Model, Msg, page)
import Config.Data.Identity exposing (pageNames)
import Config.Helpers.Articles.Article exposing (articleMaker)
import Config.Helpers.CardFormat
exposing
( cardContentSpacing
@ -17,45 +18,17 @@ import Config.Helpers.CardFormat
, 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.Headers.Header exposing (headerMaker)
import Config.Helpers.Headers.Types exposing (Header)
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)
@ -90,7 +63,9 @@ type alias Model =
init : () -> ( Model, Effect Msg )
init () =
( {}
, Effect.none
, Effect.map
(\_ -> NoOp)
(Effect.sendCmd resetViewport)
)
@ -152,44 +127,3 @@ articleList device =
)
[ 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))
]