feat: fixed receipts

This commit is contained in:
Nick 2024-12-19 01:43:02 -06:00
parent 2295c85fca
commit 97b9223223
18 changed files with 185 additions and 102 deletions

View file

@ -19,7 +19,8 @@ import Config.Helpers.CardFormat
import Config.Helpers.Converters exposing (formatSocial)
import Config.Helpers.Format
exposing
( paragraphFontSize
( headerFontSizeSmall
, paragraphFontSize
, paragraphSpacing
)
import Config.Helpers.Headers.Header exposing (headerMaker)
@ -29,6 +30,7 @@ import Config.Helpers.Response
( pageList
, topLevelContainer
)
import Config.Helpers.ToolTip exposing (tooltipImage)
import Config.Helpers.Viewport exposing (resetViewport)
import Config.Pages.Debate.Cuckery.List
exposing
@ -249,7 +251,7 @@ dodgeMaker cuck =
, width fill
]
<|
List.map2 (\x y -> makeDodge x y)
List.map2 (\x y -> makeDodge cuck x y)
cuck.cuckDodges
(List.range 1 (List.length cuck.cuckDodges))
@ -293,8 +295,8 @@ dodgeTitle cuck =
[ text "Dodges: " ]
makeDodge : Dodge -> Int -> Element msg
makeDodge dodgeEntry index =
makeDodge : Cuck -> Dodge -> Int -> Element msg
makeDodge cuck dodge index =
column
[ F.color colourTheme.textLightGrey
, paragraphSpacing
@ -326,15 +328,15 @@ makeDodge dodgeEntry index =
[ spacing 3
, width fill
]
[ circumstanceMaker dodgeEntry
[ circumstanceMaker cuck dodge
, column
[ spacing 3
, width fill
]
[ propositionMaker dodgeEntry
, reductioMaker dodgeEntry
, attitudeMaker dodgeEntry
, reasonMaker dodgeEntry
[ propositionMaker dodge
, reductioMaker dodge
, attitudeMaker dodge
, reasonMaker dodge
]
]
]
@ -357,97 +359,104 @@ formatProposition proposition =
dodgeCounter : Int -> Element msg
dodgeCounter index =
column
([ F.color colourTheme.textLightGrey
, paragraphSpacing
, paragraphFontSize
]
++ [ F.size 18
]
)
[ F.color colourTheme.textLightGrey
, paragraphSpacing
, headerFontSizeSmall
]
[ text (String.fromInt index ++ ". ") ]
circumstanceMaker : Dodge -> Element msg
circumstanceMaker dodgeEntry =
column
[ width fill
circumstanceMaker : Cuck -> Dodge -> Element msg
circumstanceMaker cuck dodge =
el
[ spacing 5
]
[ newTabLink
<|
newTabLink
[ paragraphFontSize
, F.color colourTheme.textLightOrange
]
{ url = dodgeEntry.dodgeLink
{ url = dodge.dodgeLink
, label =
row [ F.size 18 ]
[ column [ width fill ]
[ paragraph []
[ el
[ transitionStyleSlow
, hoverFontDarkOrange
]
<|
text
(case dodgeEntry.dodgeDescription of
NoReply ->
"Debate invitation extended with no response"
RanAway ->
"Engaged in written debate and ran away when cornered"
GhostedMe ->
"Debate invitation accepted with no follow-up"
OutrightNo ->
"Debate invitation declined"
InTooDeep ->
"Debate invitation accepted and subsequently retracted"
KillScreen ->
"All further debate invitations preemptively declined"
VagueGesture ->
"Chose to gesture vaguely instead of engaging"
)
, paragraph [ F.color colourTheme.textLightGrey ] [ text "." ]
, column
[ spacing 5
, F.size 12
]
(List.indexedMap
(\index2 link ->
newTabLink
[ paddingEach
{ top = 0
, right = 0
, bottom = 0
, left = 5
}
]
{ url = link
, label =
row [ moveUp 5 ]
[ el
[ transitionStyleSlow
, hoverFontDarkOrange
]
<|
text (String.fromInt (index2 + 1))
, text ", " |> el [ F.color colourTheme.textLightGrey ]
]
}
)
dodgeEntry.dodgeReceipts
)
]
]
el
[ headerFontSizeSmall
]
<|
circumstance cuck dodge
}
circumstance : Cuck -> Dodge -> Element msg
circumstance cuck dodge =
paragraph
[]
[ el
[ transitionStyleSlow
, hoverFontDarkOrange
]
<|
case dodge.dodgeDescription of
NoReply ->
text "Debate invitation extended with no response"
RanAway ->
text "Engaged in written debate and ran away when cornered"
GhostedMe ->
text "Debate invitation accepted with no follow-up"
OutrightNo ->
text "Debate invitation declined"
InTooDeep ->
text "Debate invitation accepted and subsequently retracted"
KillScreen ->
text "All further debate invitations preemptively declined"
VagueGesture ->
text "Chose to gesture vaguely instead of engaging"
, el [ F.color colourTheme.textLightGrey ] <|
text "."
, receipts cuck dodge
]
receipts : Cuck -> Dodge -> Element msg
receipts cuck dodge =
row
[ spacing 3
, F.size 12
, paddingEach
{ top = 0
, right = 0
, bottom = 0
, left = 3
}
, htmlAttribute (H.style "position" "relative")
, htmlAttribute (H.style "top" "-5px")
]
<|
List.indexedMap
(\index2 link ->
paragraph
[ alignTop
, F.color colourTheme.textLightOrange
]
[ el
[ tooltipImage ("/cucks/" ++ cuck.cuckImage ++ "/" ++ "receipt" ++ String.fromInt (index2 + 1) ++ ".png")
, transitionStyleSlow
, hoverFontDarkOrange
]
(text (String.fromInt (index2 + 1)))
, text ", " |> el [ F.color colourTheme.textLightGrey ]
]
)
dodge.dodgeReceipts
propositionMaker : Dodge -> Element msg
propositionMaker dodgeEntry =
propositionMaker dodge =
row
[ F.color colourTheme.textLightGrey
, paragraphSpacing
@ -464,13 +473,13 @@ propositionMaker dodgeEntry =
[ E.width fill
, alignLeft
]
[ paragraph [ F.regular ] [ text (formatProposition dodgeEntry.dodgeProposition) ]
[ paragraph [ F.regular ] [ text (formatProposition dodge.dodgeProposition) ]
]
]
attitudeMaker : Dodge -> Element msg
attitudeMaker dodgeEntry =
attitudeMaker dodge =
row
([ F.color colourTheme.textLightGrey
, paragraphSpacing
@ -489,7 +498,7 @@ attitudeMaker dodgeEntry =
[ E.width fill
, alignLeft
]
[ case dodgeEntry.dodgeNicksDoxasticState of
[ case dodge.dodgeNicksDoxasticState of
Nothing ->
paragraph [ F.regular ] [ text "I don't form a doxastic state." ]
@ -514,8 +523,8 @@ attitudeMaker dodgeEntry =
reductioMaker : Dodge -> Element msg
reductioMaker dodgeEntry =
case dodgeEntry.dodgeFallacy of
reductioMaker dodge =
case dodge.dodgeFallacy of
Nothing ->
none
@ -560,7 +569,7 @@ reductioMaker dodgeEntry =
reasonMaker : Dodge -> Element msg
reasonMaker dodgeEntry =
reasonMaker dodge =
row
([ F.color colourTheme.textLightGrey
, paragraphSpacing
@ -577,7 +586,7 @@ reasonMaker dodgeEntry =
]
, paragraph [ F.regular ]
[ text <|
case dodgeEntry.dodgeNicksDoxasticReason of
case dodge.dodgeNicksDoxasticReason of
NoProp ->
"There is no proposition to evaluate."