feat: very close to v1

This commit is contained in:
Nick 2024-12-22 19:42:23 -06:00
parent a9fb4fb14b
commit cf580a71d0
38 changed files with 428 additions and 246 deletions

View file

@ -138,7 +138,7 @@ blogList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat
@ -184,8 +184,11 @@ articleMaker article =
column
[ E.width fill
, centerX
, spacing 8
]
[ column [ width fill ]
[ column
[ width fill
]
(articleRows article
++ [ row []
[ paragraph

View file

@ -102,16 +102,11 @@ articleList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat
[ -- List.map (headerMaker device)
-- [
-- servicesHeader
-- ]
-- ,
List.map
[ List.map
(\article ->
cardMaker device (C.BlogArticle article) (contentList article)
)

View file

@ -102,7 +102,7 @@ articleList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat

View file

@ -102,7 +102,7 @@ articleList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat

View file

@ -102,7 +102,7 @@ articleList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat

View file

@ -102,7 +102,7 @@ articleList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat

View file

@ -102,7 +102,7 @@ articleList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat

View file

@ -102,7 +102,7 @@ articleList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat

View file

@ -102,7 +102,7 @@ articleList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat

View file

@ -102,7 +102,7 @@ articleList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat

View file

@ -102,7 +102,7 @@ articleList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat
@ -117,3 +117,7 @@ articleList device =
)
[ articleShenanigans ]
]

View file

@ -102,7 +102,7 @@ articleList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat

View file

@ -5,7 +5,8 @@ import Config.Helpers.Cards.Helpers exposing (cardMaker)
import Config.Helpers.Cards.Types as C
import Config.Helpers.Format exposing (..)
import Config.Helpers.Headers.Helpers exposing (..)
import Config.Helpers.Headers.Types exposing (Header)
import Config.Helpers.Headers.Records exposing (contactHeader, nutriDexHeader)
import Config.Helpers.Headers.Types as R exposing (..)
import Config.Helpers.Response
exposing
( pageList
@ -120,15 +121,24 @@ contactList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat
[ List.map
[ case ( device.class, device.orientation ) of
( Phone, Portrait ) ->
[ headerMaker (R.Contact contactHeader) ]
( Tablet, Portrait ) ->
[ headerMaker (R.Contact contactHeader) ]
_ ->
[ none ]
, List.map
(\contact ->
cardMaker device (C.Contact contact) (contentList contact)
)
[contactTitle]
[ contactTitle ]
]

View file

@ -87,7 +87,9 @@ type alias Model =
init : () -> ( Model, Effect Msg )
init () =
( {}
, Effect.none
, Effect.map
(\_ -> NoOp)
(Effect.sendCmd resetViewport)
)
@ -139,7 +141,7 @@ debateList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat

View file

@ -134,7 +134,7 @@ debateList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat
@ -458,6 +458,7 @@ tableMaker argument =
, D.width 2
, D.color colourTheme.textDarkGrey
, clip
, B.color colourTheme.backgroundSpreadsheet
]
{ data = argument.definitionTable
, columns =

View file

@ -127,7 +127,7 @@ cucksList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat

View file

@ -132,7 +132,7 @@ gibberishList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat

View file

@ -129,7 +129,7 @@ donateList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat
@ -259,7 +259,7 @@ makePro pro =
, width fill
]
[ paragraph [ F.regular ]
[ text (" " ++ pro.pro) ]
[ text (" " ++ pro.pro) ]
]
@ -293,7 +293,7 @@ makeCon con =
, width fill
]
[ paragraph [ F.regular ] <|
[ text (" " ++ con.con)
[ text (" " ++ con.con)
]
]
@ -395,6 +395,7 @@ tableMaker donate device =
, D.rounded 10
, D.width 2
, D.color colourTheme.textDarkGrey
, B.color colourTheme.backgroundSpreadsheet
, clip
]
{ data = donate.donateFeatures

View file

@ -116,7 +116,7 @@ homeContainer device =
homeList : Device -> Element msg
homeList device =
column pageListCenter
column (pageListCenter device)
[ case device.class of
Desktop ->
homePage device upRootLarge

View file

@ -136,7 +136,7 @@ interviewList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat

View file

@ -97,7 +97,7 @@ notFoundContainer device =
notFoundList : Device -> Element msg
notFoundList device =
column pageListCenter
column (pageListCenter device)
[ case device.class of
Desktop ->
none
@ -121,119 +121,3 @@ notFoundList device =
Landscape ->
none
]
-- import Config.Data.Identity exposing (pageNames)
-- import Config.Helpers.CardFormat
-- exposing
-- ( cardContentSpacing
-- , cardFormatter
-- , cardMaker
-- , cardTitleMaker
-- , desktopCardMaker
-- , desktopImageBoxSize
-- , desktopImageSize
-- , fieldSpacer
-- , mobileCardMaker
-- , mobileImageBoxSize
-- , mobileImageSize
-- , topLevelBox
-- )
-- import Config.Helpers.Header
-- exposing
-- ( Header
-- , headerMaker
-- )
-- import Config.Helpers.Markdown exposing (..)
-- import Config.Helpers.Response
-- exposing
-- ( pageList
-- , pageListCenter
-- , topLevelContainer
-- )
-- 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 exposing (br)
-- import Html.Attributes as H exposing (style)
-- import Layouts
-- import Markdown.Block as Block
-- import Markdown.Html
-- import Markdown.Parser
-- import Markdown.Renderer
-- import Page exposing (Page)
-- import Route exposing (Route)
-- import Route.Path
-- import Shared
-- 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 =
-- { markdown : String }
-- init : () -> ( Model, Effect Msg )
-- init () =
-- ( { markdown = """
-- markdown goes here!
-- """ }
-- , Effect.none
-- )
-- -- UPDATE
-- type Msg
-- = NoOp
-- | UpdateMarkdown String
-- update : Msg -> Model -> ( Model, Effect Msg )
-- update msg model =
-- case msg of
-- NoOp ->
-- ( model, Effect.none )
-- UpdateMarkdown newMarkdown ->
-- ( { model | markdown = newMarkdown }, Effect.none )
-- -- SUBSCRIPTIONS
-- subscriptions : Model -> Sub Msg
-- subscriptions model =
-- Sub.none
-- -- VIEW
-- view : Shared.Model -> Model -> View Msg
-- view shared model =
-- { title = pageNames.pageNotFound
-- , attributes = []
-- , element = notFoundContainer shared.device model
-- }
-- notFoundContainer : Device -> Model -> Element Msg
-- notFoundContainer device model =
-- topLevelContainer (notFoundList device model)
-- notFoundList : Device -> Model -> Element Msg
-- notFoundList device model =
-- column pageListCenter
-- [ case renderMarkdown model.markdown of
-- Ok renderedMarkdown ->
-- column
-- [ E.spacing 30
-- , E.padding 20
-- , E.width E.fill
-- , E.centerX
-- ]
-- renderedMarkdown
-- Err error ->
-- E.text error
-- ]
-- renderMarkdown : String -> Result String (List (Element Msg))
-- renderMarkdown markdown =
-- markdown
-- |> Markdown.Parser.parse
-- |> Result.mapError (\error -> error |> List.map Markdown.Parser.deadEndToString |> String.join "\n")
-- |> Result.andThen (Markdown.Renderer.render elmUiRenderer)

View file

@ -12,7 +12,8 @@ import Config.Helpers.Format
, paragraphSpacing
)
import Config.Helpers.Headers.Helpers exposing (..)
import Config.Helpers.Headers.Types exposing (Header)
import Config.Helpers.Headers.Records exposing (nutriDexHeader)
import Config.Helpers.Headers.Types as R exposing (..)
import Config.Helpers.Response
exposing
( pageList
@ -132,16 +133,20 @@ nutriDexList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat
[ -- List.map (headerMaker device)
-- [
-- servicesHeader
-- ]
-- ,
List.map
[ case ( device.class, device.orientation ) of
( Phone, Portrait ) ->
[ headerMaker (R.NutriDex nutriDexHeader) ]
( Tablet, Portrait ) ->
[ headerMaker (R.NutriDex nutriDexHeader) ]
_ ->
[ none ]
, List.map
(\nutriDex ->
cardMaker device (C.NutriDex nutriDex) (contentList device nutriDex)
)
@ -179,7 +184,7 @@ makeFeature features =
[ row [ E.width fill ]
[ column [ E.width fill ]
[ paragraph [ F.regular, F.alignLeft ]
[ text " ", el [ F.bold, F.color colourTheme.textLightOrange ] (text features.featureTitle), text features.feature ]
[ text " ", el [ F.bold, F.color colourTheme.textLightOrange ] (text features.featureTitle), text features.feature ]
]
]
]

View file

@ -122,7 +122,7 @@ servicesList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat
@ -235,5 +235,5 @@ makeDescription description =
]
)
[ paragraph [ F.regular ]
[ E.text (" " ++ description.point) ]
[ E.text (" " ++ description.point) ]
]

View file

@ -28,6 +28,7 @@ import Route exposing (Route)
import Route.Path as Path
import Shared
import View exposing (View)
import Config.Helpers.Viewport exposing (resetViewport)
page : Shared.Model -> Route () -> Page Model Msg
@ -57,11 +58,14 @@ type alias Model =
init : () -> ( Model, Effect Msg )
init () =
( {}
, Effect.none
, Effect.map
(\_ -> NoOp)
(Effect.sendCmd resetViewport)
)
-- UPDATE
@ -109,7 +113,7 @@ analysisList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat

View file

@ -33,6 +33,7 @@ import Route exposing (Route)
import Route.Path as Path
import Shared
import View exposing (View)
import Config.Helpers.Viewport exposing (resetViewport)
page : Shared.Model -> Route () -> Page Model Msg
@ -62,11 +63,14 @@ type alias Model =
init : () -> ( Model, Effect Msg )
init () =
( {}
, Effect.none
, Effect.map
(\_ -> NoOp)
(Effect.sendCmd resetViewport)
)
-- UPDATE
@ -114,7 +118,7 @@ coachingList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat

View file

@ -33,6 +33,7 @@ import Route exposing (Route)
import Route.Path as Path
import Shared
import View exposing (View)
import Config.Helpers.Viewport exposing (resetViewport)
page : Shared.Model -> Route () -> Page Model Msg
@ -62,11 +63,14 @@ type alias Model =
init : () -> ( Model, Effect Msg )
init () =
( {}
, Effect.none
, Effect.map
(\_ -> NoOp)
(Effect.sendCmd resetViewport)
)
-- UPDATE
@ -114,7 +118,7 @@ elmBuildsList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat

View file

@ -33,6 +33,7 @@ import Route exposing (Route)
import Route.Path as Path
import Shared
import View exposing (View)
import Config.Helpers.Viewport exposing (resetViewport)
page : Shared.Model -> Route () -> Page Model Msg
@ -62,11 +63,14 @@ type alias Model =
init : () -> ( Model, Effect Msg )
init () =
( {}
, Effect.none
, Effect.map
(\_ -> NoOp)
(Effect.sendCmd resetViewport)
)
-- UPDATE
@ -114,7 +118,7 @@ elmBuildsList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat

View file

@ -12,6 +12,7 @@ import Config.Helpers.Response
)
import Config.Helpers.ServiceFormat exposing (..)
import Config.Helpers.ToolTip exposing (..)
import Config.Helpers.Viewport exposing (resetViewport)
import Config.Pages.Services.Records.NutritionScience exposing (servicesNutritionScience)
import Config.Style.Colour exposing (colourTheme)
import Config.Style.Transitions
@ -62,7 +63,9 @@ type alias Model =
init : () -> ( Model, Effect Msg )
init () =
( {}
, Effect.none
, Effect.map
(\_ -> NoOp)
(Effect.sendCmd resetViewport)
)
@ -114,7 +117,7 @@ nutritionList device =
column
(case ( device.class, device.orientation ) of
_ ->
pageList
pageList device
)
<|
List.concat