2024-11-27 01:42:58 -06:00
|
|
|
module Pages.Interviews exposing (Model, Msg, page)
|
|
|
|
|
2024-12-09 19:53:09 -06:00
|
|
|
import Config.Data.Identity exposing (pageNames)
|
|
|
|
import Config.Format.Response
|
|
|
|
exposing
|
2024-12-09 20:30:04 -06:00
|
|
|
( pageList
|
2024-12-09 19:53:09 -06:00
|
|
|
, topLevelContainer
|
|
|
|
)
|
|
|
|
import Config.Helpers.Viewport exposing (resetViewport)
|
|
|
|
import Config.Pages.Interviews.Episodes.DrShawnBakerPodcast exposing (drShawnBakerPodcast)
|
|
|
|
import Config.Pages.Interviews.Episodes.FitAndFurious exposing (fitAndFurious)
|
|
|
|
import Config.Pages.Interviews.Episodes.FoolproofMastery exposing (foolproofMastery)
|
|
|
|
import Config.Pages.Interviews.Episodes.KetogeeksPodcast exposing (ketoGeeksPodcast)
|
|
|
|
import Config.Pages.Interviews.Episodes.LegendaryLifePodcast exposing (legendaryLifePodcast)
|
|
|
|
import Config.Pages.Interviews.Episodes.MarkBellsPowerProject exposing (markBellsPowerProject)
|
|
|
|
import Config.Pages.Interviews.Episodes.MuscleMemoirsPodcast exposing (muscleMemoirsPodcast)
|
|
|
|
import Config.Pages.Interviews.Episodes.SigmaNutritionRadio exposing (sigmaNutritionRadio)
|
|
|
|
import Config.Pages.Interviews.Episodes.StrenuousLifePodcast exposing (strenuousLifePodcast)
|
|
|
|
import Config.Pages.Interviews.Helpers exposing (..)
|
2024-11-27 01:42:58 -06:00
|
|
|
import Effect exposing (Effect)
|
2024-12-09 19:53:09 -06:00
|
|
|
import Element as E exposing (..)
|
|
|
|
import Config.Pages.Headers.Helpers exposing (headerMaker)
|
|
|
|
import Config.Pages.Headers.Pages.Interviews exposing (interviewHeader)
|
2024-11-27 01:42:58 -06:00
|
|
|
import Layouts
|
|
|
|
import Page exposing (Page)
|
|
|
|
import Route exposing (Route)
|
|
|
|
import Shared
|
|
|
|
import View exposing (View)
|
|
|
|
|
|
|
|
|
|
|
|
page : Shared.Model -> Route () -> Page Model Msg
|
|
|
|
page shared route =
|
|
|
|
Page.new
|
|
|
|
{ init = init
|
|
|
|
, update = update
|
|
|
|
, subscriptions = subscriptions
|
2024-12-06 00:43:00 -06:00
|
|
|
, view = view shared
|
2024-11-27 01:42:58 -06:00
|
|
|
}
|
|
|
|
|> Page.withLayout toLayout
|
|
|
|
|
|
|
|
|
|
|
|
toLayout : Model -> Layouts.Layout Msg
|
|
|
|
toLayout model =
|
2024-12-07 15:43:26 -06:00
|
|
|
Layouts.Navbar {}
|
2024-11-27 01:42:58 -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-27 01:42:58 -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-06 00:43:00 -06:00
|
|
|
view : Shared.Model -> Model -> View Msg
|
|
|
|
view shared model =
|
2024-12-08 02:18:36 -06:00
|
|
|
{ title = pageNames.pageInterviews ++ " ( )"
|
2024-11-27 01:42:58 -06:00
|
|
|
, attributes = []
|
2024-12-06 00:43:00 -06:00
|
|
|
, element = interviewContainer shared.device
|
2024-11-27 01:42:58 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-12-06 00:43:00 -06:00
|
|
|
interviewContainer : Device -> Element msg
|
|
|
|
interviewContainer device =
|
|
|
|
topLevelContainer (interviewList device)
|
2024-11-27 01:42:58 -06:00
|
|
|
|
|
|
|
|
2024-12-06 00:43:00 -06:00
|
|
|
interviewList : Device -> Element msg
|
|
|
|
interviewList device =
|
2024-11-27 01:42:58 -06:00
|
|
|
column
|
2024-12-06 00:43:00 -06:00
|
|
|
(case ( device.class, device.orientation ) of
|
2024-12-07 15:43:26 -06:00
|
|
|
_ ->
|
2024-12-09 20:30:04 -06:00
|
|
|
pageList
|
2024-12-06 00:43:00 -06:00
|
|
|
)
|
2024-11-27 01:42:58 -06:00
|
|
|
<|
|
2024-12-01 02:56:13 -06:00
|
|
|
List.concat
|
|
|
|
[ List.map headerMaker
|
|
|
|
[ interviewHeader ]
|
2024-12-06 00:43:00 -06:00
|
|
|
, (case ( device.class, device.orientation ) of
|
|
|
|
( Phone, Portrait ) ->
|
|
|
|
List.map interviewMakerMobile
|
|
|
|
|
|
|
|
( Tablet, Portrait ) ->
|
|
|
|
List.map interviewMakerMobile
|
|
|
|
|
2024-12-07 15:43:26 -06:00
|
|
|
_ ->
|
2024-12-06 00:43:00 -06:00
|
|
|
List.map interviewMaker
|
|
|
|
)
|
2024-12-01 02:56:13 -06:00
|
|
|
[ sigmaNutritionRadio
|
|
|
|
, markBellsPowerProject
|
|
|
|
, foolproofMastery
|
|
|
|
, ketoGeeksPodcast
|
|
|
|
, legendaryLifePodcast
|
|
|
|
, muscleMemoirsPodcast
|
|
|
|
, fitAndFurious
|
|
|
|
, strenuousLifePodcast
|
|
|
|
, drShawnBakerPodcast
|
|
|
|
]
|
2024-11-27 01:42:58 -06:00
|
|
|
]
|