feat: stuff is fucked but I'm too tired to continue tonight

This commit is contained in:
Nick 2024-12-21 04:07:50 -06:00
parent d2056e032e
commit 277ba17421
37 changed files with 683 additions and 1491 deletions

View file

@ -1,25 +1,12 @@
module Pages.Interviews exposing (Model, Msg, page)
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.CardFormat exposing (cardMaker)
import Config.Helpers.Converters exposing (formatSocial)
import Config.Helpers.Format
exposing
( paragraphFontSize
( headerFontSizeSmall
, paragraphFontSize
, paragraphSpacing
)
import Config.Helpers.Headers.Header exposing (..)
@ -151,17 +138,11 @@ interviewList device =
)
<|
List.concat
[ List.map headerMaker
[ List.map (headerMaker device)
[ interviewHeader ]
, (case ( device.class, device.orientation ) of
( Phone, Portrait ) ->
List.map interviewMakerMobile
( Tablet, Portrait ) ->
List.map interviewMakerMobile
_ ->
List.map interviewMaker
List.map (interviewMaker device)
)
[ sigmaNutritionRadio
, markBellsPowerProject
@ -187,48 +168,16 @@ interviewHeader =
}
interviewMaker : Interview -> Element msg
interviewMaker interview =
row
topLevelBox
[ desktopCardMaker desktopImageBoxSize desktopImageSize (interviewImage interview) interview.interviewSocial
, cardMaker
[ cardTitleMaker interview.interviewName
, cardFormatter
[ cardContentSpacing
[ column
fieldSpacer
[ appearanceTitle interview
, appearanceMaker interview
]
]
]
]
]
interviewMaker : Device -> Interview -> Element msg
interviewMaker device interview =
cardMaker device interview.interviewName (contentList interview) (interviewImage interview) interview.interviewSocial
interviewMakerMobile : Interview -> Element msg
interviewMakerMobile interview =
row
topLevelBox
[ column [] []
, cardMaker
[ cardTitleMaker interview.interviewName
, cardFormatter
[ cardContentSpacing
[ column
fieldSpacer
[ row [ spacing 10 ]
[ mobileCardMaker mobileImageBoxSize mobileImageSize (interviewImage interview) interview.interviewSocial
, socialMaker interview
]
, appearanceTitle interview
, appearanceMaker interview
]
]
]
]
]
contentList : Interview -> List (Element msg)
contentList interview =
[ appearanceTitle interview
, appearanceMaker interview
]
interviewImage : Interview -> { src : String, description : String }
@ -243,10 +192,8 @@ socialMaker interview =
paragraph
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.bold
, F.size 18
, spacing 5
, headerFontSizeSmall
]
[ text "Social: "
, newTabLink
@ -270,9 +217,8 @@ appearanceTitle interview =
paragraph
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, headerFontSizeSmall
, F.bold
, F.size 18
]
[ text "Appearances: " ]
@ -287,39 +233,25 @@ appearanceMaker interview =
makeAppearance : Appearance -> Int -> Element msg
makeAppearance appearanceEntry index =
column
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, alignLeft
, spacing 8
el
[ alignLeft
, width fill
]
[ row
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
]
++ [ F.size 18
, E.width fill
, paddingEach
{ top = 0
, bottom = 0
, left = 35
, right = 0
}
]
)
[ column
<|
row
[ E.width fill
, spacing 5
]
[ el
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, F.size 18
, headerFontSizeSmall
, F.bold
, alignTop
, alignRight
, F.alignRight
]
[ text (String.fromInt index ++ ". ") ]
<|
text (String.fromInt index ++ ". ")
, column
[ spacing 8
, width fill
@ -331,7 +263,6 @@ makeAppearance appearanceEntry index =
, subjectList appearanceEntry
]
]
]
episodeMaker : Appearance -> Element msg
@ -359,6 +290,7 @@ experienceMaker appearanceEntry =
row
[ width fill
, height fill
, spacing 5
]
[ column
[ E.alignTop
@ -367,23 +299,15 @@ experienceMaker appearanceEntry =
[ paragraph
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, headerFontSizeSmall
, F.bold
, F.size 18
, E.width fill
]
[ el
[ tooltip
"This represents how pleasant it was to interact with the host(s)."
]
(el
[ paddingEach
{ top = 0
, right = 10
, bottom = 0
, left = 0
}
]
[]
<|
text "Pleasantness:"
)
@ -439,29 +363,26 @@ dateMaker appearanceEntry =
row
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, headerFontSizeSmall
, F.bold
]
[ column
[ el
[ alignTop
]
[ text "Published:"
]
, column
<|
text
"Published:"
, el
[ alignTop
, width fill
]
[ paragraph
<|
paragraph
[ F.regular
, paddingEach
{ top = 0
, right = 0
, bottom = 0
, left = 3
}
, paragraphFontSize
]
[ text appearanceEntry.appearanceYear
]
[ text appearanceEntry.appearanceYear ]
]
]
@ -470,7 +391,7 @@ subjectMaker appearanceEntry =
paragraph
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
, headerFontSizeSmall
, F.bold
]
[ column
@ -490,7 +411,7 @@ subjectList appearanceEntry =
{ top = 0
, right = 0
, bottom = 0
, left = 25
, left = 10
}
]
<|
@ -504,17 +425,10 @@ makeSubject subjects =
el
[ E.width fill
, alignLeft
, paddingEach
{ top = 0
, right = 0
, bottom = 0
, left = 8
}
]
<|
el
paragraph
[ F.regular
, paragraphFontSize
]
<|
text (" " ++ subjects.subject)
[ text (" " ++ subjects.subject) ]