feat: added dodger page

This commit is contained in:
Nick 2024-11-11 18:57:51 -06:00
parent f05a528580
commit 5ff83e3585
18 changed files with 338 additions and 51 deletions

126
frontend/src/Pages/Dodgers.elm Normal file → Executable file
View file

@ -90,12 +90,128 @@ dodgersContainer =
dodgersList : Element msg
dodgersList =
column
[ spacing 40
, centerX
, centerY
]
pageList
dodgers
type alias MakeRowInput =
{ cuckImage : String
, cuckName : String
, cuckSocial : String
, cuckDodges : List DodgeEntry
}
type alias DodgeEntry =
{ dodgeLink : String
, dodgeDescription : String
, dodgeProposition : String
}
makeRow : MakeRowInput -> Element msg
makeRow makeRowInput =
let
cuckImageFormat : List (Attribute msg)
cuckImageFormat =
[ width <| px 80 ]
dodgeRows : List (Element msg)
dodgeRows =
List.indexedMap
(\index dodgeEntry ->
column paragraphAlignLeft
[ row paragraphFormat
[ text " "
, text (String.fromInt (index + 1) ++ ". ")
, paragraphLinkFormat
{ url = dodgeEntry.dodgeLink
, label =
row []
[ transitionHighlightedLinkHover <| text dodgeEntry.dodgeDescription
, text "." |> el [ F.color colourTheme.nonHighlightedText ]
]
}
]
, row paragraphBoldFormat
[ text " Proposition:"
, row [ F.regular ]
[ text dodgeEntry.dodgeProposition ]
]
]
)
makeRowInput.cuckDodges
in
row [ imageSpacer, alignLeft ]
[ image cuckImageFormat
{ src = makeRowInput.cuckImage
, description = makeRowInput.cuckName
}
, column
paragraphAlignLeft
[ row nonHighlightedTitleFormat [ text makeRowInput.cuckName ]
, row paragraphBoldFormat
[ text "Social:"
, paragraphLinkFormat
{ url = makeRowInput.cuckSocial
, label = transitionHighlightedLinkHover <| text makeRowInput.cuckName
}
]
, row paragraphBoldFormat [ text "Dodges:" ]
, column [spacing 8] dodgeRows
]
]
type alias DodgeType =
{ noReply : String
, ranAway : String
, ghostedMe : String
, outrightNo : String
, inTooDeep : String
}
type alias PropType =
{ noClearProp : String
}
dodgers =
[]
let
dodgeType : DodgeType
dodgeType =
{ noReply = "Invitation extended with no response"
, ranAway = "Engaged in written debate and dodged when cornered"
, ghostedMe = "Debate invitation accepted with no follow-up"
, outrightNo = "Debate invitation declined"
, inTooDeep = "Debate invitation accepted and subsequently retracted"
}
propType : PropType
propType =
{ noClearProp = "failed to state position clearly."
}
in
List.map makeRow
[ { cuckImage = "cucks/adamsinger"
, cuckName = "Adam Singer"
, cuckSocial = "https://twitter.com/AdamSinger"
, cuckDodges =
[ { dodgeLink = "https://twitter.com/TheNutrivore/status/1566491269194719232?s=20"
, dodgeDescription = dodgeType.noReply
, dodgeProposition = propType.noClearProp
}
]
}
, { cuckImage = "cucks/"
, cuckName = ""
, cuckSocial = ""
, cuckDodges =
[ { dodgeLink = ""
, dodgeDescription = dodgeType.noReply
, dodgeProposition = propType.noClearProp
}
]
}
]