mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-16 04:25:11 -05:00
feat: slow refactor
This commit is contained in:
parent
903c16efed
commit
e6f3a09919
54 changed files with 1103 additions and 1128 deletions
|
@ -1,8 +1,9 @@
|
|||
module Pages.Interviews exposing (Model, Msg, page)
|
||||
|
||||
import Config.Data.Identity exposing (pageNames)
|
||||
import Config.Helpers.Cards.Helpers exposing (cardMaker)
|
||||
import Config.Helpers.Cards.Types as C
|
||||
import Config.Helpers.Cards.Inner.Helpers exposing (..)
|
||||
import Config.Helpers.Cards.Outer.Helpers exposing (cardMaker)
|
||||
import Config.Helpers.Cards.Outer.Types as C
|
||||
import Config.Helpers.Converters exposing (formatSocial)
|
||||
import Config.Helpers.Format
|
||||
exposing
|
||||
|
@ -26,6 +27,7 @@ import Config.Helpers.StrengthBar
|
|||
)
|
||||
import Config.Helpers.ToolTip exposing (tooltip)
|
||||
import Config.Helpers.Viewport exposing (resetViewport)
|
||||
import Config.Pages.Debate.Cuckery.List exposing (cuckListNumber)
|
||||
import Config.Pages.Interviews.Records.DrShawnBakerPodcast exposing (drShawnBakerPodcast)
|
||||
import Config.Pages.Interviews.Records.FitAndFurious exposing (fitAndFurious)
|
||||
import Config.Pages.Interviews.Records.FoolproofMastery exposing (foolproofMastery)
|
||||
|
@ -36,7 +38,7 @@ import Config.Pages.Interviews.Records.MuscleMemoirsPodcast exposing (muscleMemo
|
|||
import Config.Pages.Interviews.Records.SigmaNutritionRadio exposing (sigmaNutritionRadio)
|
||||
import Config.Pages.Interviews.Records.StrenuousLifePodcast exposing (strenuousLifePodcast)
|
||||
import Config.Pages.Interviews.Types exposing (..)
|
||||
import Config.Style.Colour exposing (colourTheme)
|
||||
import Config.Style.Colour.Helpers exposing (ThemeColor(..), colourTheme)
|
||||
import Config.Style.Images exposing (imageSquareMaker)
|
||||
import Config.Style.Transitions
|
||||
exposing
|
||||
|
@ -177,6 +179,18 @@ contentList device interview =
|
|||
]
|
||||
<|
|
||||
imageSquareMaker device (imagePathMaker M.Interviews interview.interviewImage) True size
|
||||
|
||||
imageMaker : Element msg
|
||||
imageMaker =
|
||||
case ( device.class, device.orientation ) of
|
||||
( Phone, Portrait ) ->
|
||||
image "Smallish"
|
||||
|
||||
( Tablet, Portrait ) ->
|
||||
image "Smallish"
|
||||
|
||||
_ ->
|
||||
image "Test"
|
||||
in
|
||||
[ row
|
||||
[ paddingEach
|
||||
|
@ -185,80 +199,19 @@ contentList device interview =
|
|||
, bottom = 0
|
||||
, left = 0
|
||||
}
|
||||
, detailSpacing
|
||||
, width fill
|
||||
]
|
||||
[ case ( device.class, device.orientation ) of
|
||||
( Phone, Portrait ) ->
|
||||
image "Smallish"
|
||||
|
||||
( Tablet, Portrait ) ->
|
||||
image "Smallish"
|
||||
|
||||
_ ->
|
||||
image "Medium"
|
||||
, column
|
||||
[ width fill
|
||||
]
|
||||
[ socialMaker interview
|
||||
, appearanceTitle interview
|
||||
[ imageMaker
|
||||
, detailFormat column
|
||||
[ socialMaker interview.interviewSocial interview.interviewSocial
|
||||
, detailTitleMaker TextLightGrey "Appearances:"
|
||||
, appearanceMaker interview
|
||||
]
|
||||
]
|
||||
, el
|
||||
[ paddingEach
|
||||
{ top = 0
|
||||
, right = 0
|
||||
, bottom = 0
|
||||
, left =
|
||||
case ( device.class, device.orientation ) of
|
||||
( Phone, Portrait ) ->
|
||||
5
|
||||
|
||||
( Tablet, Portrait ) ->
|
||||
5
|
||||
|
||||
_ ->
|
||||
55
|
||||
}
|
||||
]
|
||||
<|
|
||||
appearanceMaker interview
|
||||
]
|
||||
|
||||
|
||||
socialMaker : Interview -> Element msg
|
||||
socialMaker interview =
|
||||
paragraph
|
||||
[ F.color colourTheme.textLightGrey
|
||||
, paragraphSpacing
|
||||
, F.bold
|
||||
, headerFontSizeSmall
|
||||
]
|
||||
[ newTabLink
|
||||
[ paragraphFontSize
|
||||
, F.color colourTheme.textLightOrange
|
||||
]
|
||||
{ url = interview.interviewSocial
|
||||
, label =
|
||||
el
|
||||
[ transitionStyleSlow
|
||||
, hoverFontDarkOrange
|
||||
]
|
||||
<|
|
||||
text (formatSocial interview.interviewSocial)
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
appearanceTitle : Interview -> Element msg
|
||||
appearanceTitle interview =
|
||||
paragraph
|
||||
[ F.color colourTheme.textLightGrey
|
||||
, paragraphSpacing
|
||||
, headerFontSizeSmall
|
||||
, F.bold
|
||||
]
|
||||
[ text "Appearances: " ]
|
||||
|
||||
|
||||
appearanceMaker : Interview -> Element msg
|
||||
appearanceMaker interview =
|
||||
column [ spacing 10, width fill ] <|
|
||||
|
@ -269,55 +222,24 @@ appearanceMaker interview =
|
|||
|
||||
makeAppearance : Appearance -> Int -> Element msg
|
||||
makeAppearance appearanceEntry index =
|
||||
el
|
||||
[ alignLeft
|
||||
, width fill
|
||||
detailFormat row
|
||||
[ listCounter index
|
||||
, detailFormat column
|
||||
[ episodeMaker appearanceEntry
|
||||
, experienceMaker appearanceEntry
|
||||
, dateMaker appearanceEntry
|
||||
, subjectMaker appearanceEntry
|
||||
, subjectList appearanceEntry
|
||||
]
|
||||
]
|
||||
<|
|
||||
row
|
||||
[ E.width fill
|
||||
, spacing 3
|
||||
]
|
||||
[ el
|
||||
[ F.color colourTheme.textLightGrey
|
||||
, paragraphSpacing
|
||||
, paragraphFontSize
|
||||
, F.bold
|
||||
, alignTop
|
||||
, F.alignRight
|
||||
]
|
||||
<|
|
||||
text (String.fromInt index ++ ". ")
|
||||
, column
|
||||
[ width fill
|
||||
, spacing 3
|
||||
]
|
||||
[ episodeMaker appearanceEntry
|
||||
, experienceMaker appearanceEntry
|
||||
, dateMaker appearanceEntry
|
||||
, subjectMaker appearanceEntry
|
||||
, subjectList appearanceEntry
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
episodeMaker : Appearance -> Element msg
|
||||
episodeMaker appearanceEntry =
|
||||
newTabLink
|
||||
[ paragraphFontSize
|
||||
, F.color colourTheme.textLightOrange
|
||||
]
|
||||
[]
|
||||
{ url = appearanceEntry.appearanceLink
|
||||
, label =
|
||||
paragraph
|
||||
[ headerFontSizeSmall
|
||||
]
|
||||
[ text ("#" ++ appearanceEntry.appearanceEpisode ++ ": " ++ appearanceEntry.appearanceTitle)
|
||||
|> el
|
||||
[ F.color colourTheme.textLightOrange
|
||||
, hoverFontDarkOrange
|
||||
]
|
||||
]
|
||||
, label = detailTitleMaker TextLightOrange ("#" ++ appearanceEntry.appearanceEpisode ++ ": " ++ appearanceEntry.appearanceTitle)
|
||||
}
|
||||
|
||||
|
||||
|
@ -468,3 +390,4 @@ makeSubject subjects =
|
|||
, paragraphFontSize
|
||||
]
|
||||
[ text ("• " ++ subjects.subject) ]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue