feat: so very close

This commit is contained in:
Nick 2024-12-27 23:24:35 -06:00
parent 185d922ffb
commit 071c823c41
20 changed files with 293 additions and 570 deletions

View file

@ -184,13 +184,13 @@ contentList device interview =
imageMaker =
case ( device.class, device.orientation ) of
( Phone, Portrait ) ->
image "Smallish"
none
( Tablet, Portrait ) ->
image "Smallish"
none
_ ->
image "Test"
image "Fatty"
in
[ row
[ paddingEach
@ -214,10 +214,8 @@ contentList device interview =
appearanceMaker : Interview -> Element msg
appearanceMaker interview =
column [ spacing 10, width fill ] <|
List.map2 (\x y -> makeAppearance x y)
interview.interviewAppearances
(List.range 1 (List.length interview.interviewAppearances))
detailFormat column
[ listMaker2 makeAppearance interview.interviewAppearances ]
makeAppearance : Appearance -> Int -> Element msg
@ -229,7 +227,6 @@ makeAppearance appearanceEntry index =
, experienceMaker appearanceEntry
, dateMaker appearanceEntry
, subjectMaker appearanceEntry
, subjectList appearanceEntry
]
]
@ -245,37 +242,39 @@ episodeMaker appearanceEntry =
experienceMaker : Appearance -> Element msg
experienceMaker appearanceEntry =
row
[ width fill
, height fill
, spacing 5
]
[ column
[ E.alignTop
, E.alignLeft
]
[ paragraph
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, headerFontSizeSmall
, F.bold
]
[ el
[ tooltip
"This represents how pleasant it was to interact with the host(s)."
]
(el
[]
<|
text "Pleasantness:"
)
]
detailFormat row
[ el
[ tooltip
"This represents my confidence in the soundness of the argument."
]
<|
detailTitleMaker TextLightGrey "Pleasantness:"
, barPadding
[ barMaker getExperienceTooltip appearanceEntry.appearanceExperience ]
]
dateMaker : Appearance -> Element msg
dateMaker appearanceEntry =
detailFormat row
[ detailTitleMaker TextLightGrey "Published:"
, detailBodyMaker TextLightGrey (text appearanceEntry.appearanceYear)
]
subjectMaker : Appearance -> Element msg
subjectMaker appearanceEntry =
detailFormat column
[ detailFormatEl <| detailTitleMaker TextLightGrey "Subjects: "
, detailFormat column [ listMaker makeSubject appearanceEntry.appearanceSubjects ]
]
makeSubject : Subjects -> Element msg
makeSubject subjects =
listItem TextLightGrey subjects.subject
getExperienceTooltip : Int -> String
getExperienceTooltip num =
case num of
@ -314,80 +313,3 @@ getExperienceTooltip num =
_ ->
"Behavior level out of expected range."
dateMaker : Appearance -> Element msg
dateMaker appearanceEntry =
row
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, headerFontSizeSmall
, F.bold
]
[ el
[ alignTop
]
<|
text
"Published:"
, el
[ alignTop
, width fill
]
<|
paragraph
[ F.regular
, paragraphFontSize
]
[ text appearanceEntry.appearanceYear
]
]
subjectMaker : Appearance -> Element msg
subjectMaker appearanceEntry =
paragraph
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, headerFontSizeSmall
, F.bold
]
[ column
[ alignTop
]
[ text "Subjects: "
]
]
subjectList : Appearance -> Element msg
subjectList appearanceEntry =
column
[ spacing 5
, width fill
, paddingEach
{ top = 0
, right = 0
, bottom = 0
, left = 10
}
]
<|
List.map2 (\x y -> makeSubject x)
appearanceEntry.appearanceSubjects
(List.range 1 (List.length appearanceEntry.appearanceSubjects))
makeSubject : Subjects -> Element msg
makeSubject subjects =
el
[ E.width fill
, alignLeft
]
<|
paragraph
[ F.regular
, paragraphFontSize
]
[ text (" " ++ subjects.subject) ]