2024-11-13 23:29:50 -06:00
|
|
|
module Cuckery.Helpers exposing (..)
|
|
|
|
|
2024-11-27 22:36:35 -06:00
|
|
|
import Config.CardFormat exposing (..)
|
2024-11-13 23:29:50 -06:00
|
|
|
import Config.Colour exposing (..)
|
|
|
|
import Config.Format exposing (..)
|
|
|
|
import Cuckery.Types exposing (..)
|
|
|
|
import Effect exposing (Effect)
|
2024-11-26 04:32:11 -06:00
|
|
|
import Element as E exposing (..)
|
|
|
|
import Element.Background as B exposing (..)
|
2024-11-13 23:29:50 -06:00
|
|
|
import Element.Border as D
|
|
|
|
import Element.Font as F
|
|
|
|
import Html.Attributes as H exposing (style)
|
|
|
|
import Layouts
|
|
|
|
import Page exposing (Page)
|
|
|
|
import Route exposing (Route)
|
|
|
|
import Shared
|
|
|
|
import View exposing (View)
|
|
|
|
|
|
|
|
|
2024-11-27 18:53:53 -06:00
|
|
|
cuckMaker : Cuck -> Element msg
|
|
|
|
cuckMaker cuck =
|
|
|
|
row
|
2024-11-27 22:36:35 -06:00
|
|
|
topLevelBox
|
|
|
|
[ cardImageMaker (cuckImage cuck)
|
|
|
|
, cardMaker
|
|
|
|
[ cardTitleMaker (cuckTitle cuck)
|
|
|
|
, cardFormatter
|
|
|
|
[ cardContentSpacing
|
|
|
|
[ column
|
|
|
|
[ fieldSpacer
|
|
|
|
]
|
|
|
|
[ socialMaker cuck
|
|
|
|
, dodgeTitle cuck
|
|
|
|
, dodgeMaker cuck
|
|
|
|
]
|
2024-11-27 18:53:53 -06:00
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
2024-11-20 15:12:38 -06:00
|
|
|
|
|
|
|
|
2024-11-28 00:33:22 -06:00
|
|
|
cuckImage :
|
|
|
|
Cuck
|
|
|
|
->
|
|
|
|
{ src : String
|
|
|
|
, description : String
|
|
|
|
}
|
2024-11-27 22:36:35 -06:00
|
|
|
cuckImage cuck =
|
|
|
|
{ src = "cucks/" ++ cuck.cuckImage ++ "/" ++ cuck.cuckImage ++ ".png"
|
|
|
|
, description = cuck.cuckName
|
|
|
|
}
|
2024-11-20 15:12:38 -06:00
|
|
|
|
|
|
|
|
2024-11-27 22:36:35 -06:00
|
|
|
cuckTitle : Cuck -> String
|
2024-11-27 18:53:53 -06:00
|
|
|
cuckTitle cuck =
|
2024-11-27 22:36:35 -06:00
|
|
|
cuck.cuckName
|
2024-11-20 15:12:38 -06:00
|
|
|
|
|
|
|
|
2024-11-27 18:53:53 -06:00
|
|
|
dodgeMaker : Cuck -> Element msg
|
|
|
|
dodgeMaker cuck =
|
2024-11-28 00:33:22 -06:00
|
|
|
column
|
|
|
|
[ spacing 15
|
|
|
|
, width fill
|
|
|
|
]
|
|
|
|
<|
|
2024-11-27 18:53:53 -06:00
|
|
|
List.map2 (\x y -> makeDodge x y)
|
|
|
|
cuck.cuckDodges
|
|
|
|
(List.range 1 (List.length cuck.cuckDodges))
|
2024-11-20 15:12:38 -06:00
|
|
|
|
|
|
|
|
2024-11-27 18:53:53 -06:00
|
|
|
socialMaker : Cuck -> Element msg
|
|
|
|
socialMaker cuck =
|
|
|
|
row
|
|
|
|
(paragraphBoldFormat
|
|
|
|
++ [ F.size 18
|
|
|
|
, spacing 8
|
|
|
|
]
|
|
|
|
)
|
|
|
|
[ text "Social:"
|
|
|
|
, paragraphLinkFormat
|
|
|
|
{ url = cuck.cuckSocial
|
|
|
|
, label = transitionHighlightedLinkHover <| text (formatCuckSocial cuck.cuckSocial)
|
|
|
|
}
|
|
|
|
]
|
2024-11-20 15:12:38 -06:00
|
|
|
|
|
|
|
|
2024-11-27 22:36:35 -06:00
|
|
|
dodgeTitle : Cuck -> Element msg
|
|
|
|
dodgeTitle cuck =
|
|
|
|
row
|
|
|
|
(paragraphBoldFormat
|
|
|
|
++ [ F.size 18
|
|
|
|
]
|
|
|
|
)
|
|
|
|
[ text "Dodges:" ]
|
|
|
|
|
|
|
|
|
2024-11-27 18:53:53 -06:00
|
|
|
makeDodge : Dodge -> Int -> Element msg
|
|
|
|
makeDodge dodgeEntry index =
|
2024-11-27 01:42:58 -06:00
|
|
|
column
|
|
|
|
(paragraphAlignLeft
|
2024-11-27 18:53:53 -06:00
|
|
|
++ [ spacing 8
|
2024-11-27 01:42:58 -06:00
|
|
|
, width fill
|
|
|
|
]
|
|
|
|
)
|
2024-11-26 04:32:11 -06:00
|
|
|
[ row
|
2024-11-27 18:53:53 -06:00
|
|
|
[ width fill
|
|
|
|
, paddingEach
|
|
|
|
{ top = 0
|
|
|
|
, right = 0
|
|
|
|
, bottom = 0
|
|
|
|
, left = 35
|
|
|
|
}
|
|
|
|
]
|
|
|
|
[ column
|
|
|
|
(paragraphFormat
|
|
|
|
++ [ F.size 18
|
|
|
|
, alignTop
|
|
|
|
, alignRight
|
|
|
|
, F.alignRight
|
|
|
|
]
|
|
|
|
)
|
|
|
|
[ text (String.fromInt index ++ ". ") ]
|
|
|
|
, column
|
|
|
|
[ spacing 8
|
|
|
|
, width fill
|
|
|
|
]
|
|
|
|
[ circumstanceMaker dodgeEntry
|
|
|
|
, column
|
|
|
|
[ spacing 8
|
|
|
|
, width fill
|
|
|
|
]
|
|
|
|
[ propositionMaker dodgeEntry
|
|
|
|
, reductioMaker dodgeEntry
|
|
|
|
, attitudeMaker dodgeEntry
|
|
|
|
, reasonMaker dodgeEntry
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
dodgeWidth =
|
|
|
|
width <| px 93
|
|
|
|
|
|
|
|
|
|
|
|
formatProposition : String -> String
|
|
|
|
formatProposition proposition =
|
|
|
|
if proposition == "N/A" then
|
|
|
|
proposition
|
|
|
|
|
|
|
|
else
|
|
|
|
"\"" ++ proposition ++ "\""
|
|
|
|
|
|
|
|
|
|
|
|
dodgeCounter : Int -> Element msg
|
|
|
|
dodgeCounter index =
|
|
|
|
column
|
|
|
|
(paragraphFormat
|
|
|
|
++ [ F.size 18
|
|
|
|
]
|
|
|
|
)
|
|
|
|
[ text (String.fromInt index ++ ". ") ]
|
|
|
|
|
|
|
|
|
|
|
|
circumstanceMaker : Dodge -> Element msg
|
|
|
|
circumstanceMaker dodgeEntry =
|
|
|
|
column
|
|
|
|
[ width fill
|
|
|
|
]
|
|
|
|
[ paragraphLinkFormat
|
|
|
|
{ url = dodgeEntry.dodgeLink
|
|
|
|
, label =
|
|
|
|
row [ F.size 18 ]
|
|
|
|
[ transitionHighlightedLinkHover <|
|
|
|
|
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"
|
|
|
|
)
|
|
|
|
, text "." |> el [ F.color colourTheme.nonHighlightedText ]
|
|
|
|
, row [ alignTop, alignLeft ]
|
|
|
|
(List.indexedMap
|
|
|
|
(\index2 link ->
|
|
|
|
newTabLink
|
|
|
|
[ paddingEach
|
|
|
|
{ top = 0
|
|
|
|
, right = 15
|
|
|
|
, bottom = 0
|
|
|
|
, left = 5
|
2024-11-23 18:01:27 -06:00
|
|
|
}
|
2024-11-27 18:53:53 -06:00
|
|
|
, F.size 13
|
|
|
|
]
|
|
|
|
{ url = link
|
|
|
|
, label =
|
|
|
|
row []
|
|
|
|
[ transitionHighlightedLinkHover <| (text (String.fromInt (index2 + 1)) |> el [ F.size 13 ])
|
|
|
|
, text ", " |> el [ F.color colourTheme.nonHighlightedText ]
|
|
|
|
]
|
|
|
|
}
|
2024-11-23 18:01:27 -06:00
|
|
|
)
|
2024-11-27 18:53:53 -06:00
|
|
|
dodgeEntry.dodgeReceipts
|
|
|
|
)
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
propositionMaker : Dodge -> Element msg
|
|
|
|
propositionMaker dodgeEntry =
|
|
|
|
row paragraphBoldFormat
|
2024-11-28 00:33:22 -06:00
|
|
|
[ column
|
|
|
|
[ alignTop
|
|
|
|
, dodgeWidth
|
|
|
|
]
|
2024-11-27 18:53:53 -06:00
|
|
|
[ text "Proposition:"
|
2024-11-20 15:12:38 -06:00
|
|
|
]
|
2024-11-27 18:53:53 -06:00
|
|
|
, column
|
|
|
|
[ E.width fill
|
|
|
|
, alignLeft
|
2024-11-20 15:12:38 -06:00
|
|
|
]
|
2024-11-27 18:53:53 -06:00
|
|
|
[ paragraph [ F.regular ] [ text (formatProposition dodgeEntry.dodgeProposition) ]
|
2024-11-20 15:12:38 -06:00
|
|
|
]
|
|
|
|
]
|
|
|
|
|
2024-11-13 23:29:50 -06:00
|
|
|
|
2024-11-27 18:53:53 -06:00
|
|
|
attitudeMaker : Dodge -> Element msg
|
|
|
|
attitudeMaker dodgeEntry =
|
|
|
|
row (paragraphBoldFormat ++ [ width fill ])
|
2024-11-28 00:33:22 -06:00
|
|
|
[ column
|
|
|
|
[ alignTop
|
|
|
|
, dodgeWidth
|
|
|
|
]
|
2024-11-27 18:53:53 -06:00
|
|
|
[ text "Attitude:"
|
|
|
|
]
|
2024-11-28 00:33:22 -06:00
|
|
|
, column
|
|
|
|
[ E.width fill
|
|
|
|
, alignLeft
|
|
|
|
]
|
2024-11-27 18:53:53 -06:00
|
|
|
[ case dodgeEntry.dodgeNicksDoxasticState of
|
|
|
|
Nothing ->
|
|
|
|
paragraph [ F.regular ] [ text "I don't form a doxastic state." ]
|
|
|
|
|
|
|
|
Just Belief ->
|
|
|
|
paragraph [ F.regular ]
|
|
|
|
[ text "I lean more toward "
|
|
|
|
, el [ F.bold ] (text "TRUE")
|
|
|
|
, text " than false."
|
|
|
|
]
|
|
|
|
|
|
|
|
Just Disbelief ->
|
|
|
|
paragraph [ F.regular ]
|
|
|
|
[ text "I lean more toward "
|
|
|
|
, text "FALSE" |> el [ F.bold ]
|
|
|
|
, text " than true."
|
|
|
|
]
|
|
|
|
|
|
|
|
Just Agnostic ->
|
|
|
|
el [ F.regular ] (text "I don't form beliefs about this proposition.")
|
|
|
|
]
|
2024-11-26 04:32:11 -06:00
|
|
|
]
|
2024-11-27 18:53:53 -06:00
|
|
|
|
|
|
|
|
|
|
|
reductioMaker : Dodge -> Element msg
|
|
|
|
reductioMaker dodgeEntry =
|
|
|
|
case dodgeEntry.dodgeFallacy of
|
|
|
|
Nothing ->
|
|
|
|
none
|
|
|
|
|
|
|
|
Just fallacy ->
|
|
|
|
case fallacy of
|
|
|
|
SpecificFallacy str ->
|
|
|
|
if String.isEmpty str then
|
|
|
|
none
|
|
|
|
|
|
|
|
else
|
|
|
|
displayFallacy str
|
|
|
|
|
|
|
|
AppealToNature ->
|
|
|
|
displayFallacy "Appeal to Nature"
|
|
|
|
|
|
|
|
AppealToTradition ->
|
|
|
|
displayFallacy "Appeal to Tradition"
|
|
|
|
|
|
|
|
AppealToIgnorance ->
|
|
|
|
displayFallacy "Appeal to Ignorance"
|
|
|
|
|
|
|
|
AppealFromIncredulity ->
|
|
|
|
displayFallacy "Appeal from Incredulity"
|
|
|
|
|
|
|
|
RedHerring ->
|
|
|
|
displayFallacy "Red Herring"
|
|
|
|
|
|
|
|
BeggingTheQuestion ->
|
|
|
|
displayFallacy "Begging the Question"
|
|
|
|
|
|
|
|
Strawman ->
|
|
|
|
displayFallacy "Strawman"
|
|
|
|
|
|
|
|
Equivocation ->
|
|
|
|
displayFallacy "Equivocation"
|
|
|
|
|
|
|
|
GeneticFallacy ->
|
|
|
|
displayFallacy "Genetic Fallacy"
|
|
|
|
|
|
|
|
MotteAndBailey ->
|
|
|
|
displayFallacy "Motte and Bailey"
|
|
|
|
|
|
|
|
|
|
|
|
reasonMaker : Dodge -> Element msg
|
|
|
|
reasonMaker dodgeEntry =
|
|
|
|
row (paragraphBoldFormat ++ [ width fill ])
|
2024-11-28 00:33:22 -06:00
|
|
|
[ column
|
|
|
|
[ alignTop
|
|
|
|
, dodgeWidth
|
|
|
|
]
|
2024-11-27 18:53:53 -06:00
|
|
|
[ text "Reason:"
|
2024-11-26 04:32:11 -06:00
|
|
|
]
|
2024-11-28 00:33:22 -06:00
|
|
|
, column
|
|
|
|
[ E.width fill
|
|
|
|
, alignLeft
|
|
|
|
]
|
2024-11-27 18:53:53 -06:00
|
|
|
[ paragraph [ F.regular ]
|
|
|
|
[ text <|
|
|
|
|
case dodgeEntry.dodgeNicksDoxasticReason of
|
|
|
|
NoProp ->
|
|
|
|
"There is no proposition to evaluate."
|
|
|
|
|
|
|
|
VagueProp ->
|
|
|
|
"The proposition is too vague to evaluate."
|
|
|
|
|
|
|
|
SpecificPropReason str ->
|
|
|
|
str
|
2024-11-26 04:32:11 -06:00
|
|
|
]
|
2024-11-20 15:12:38 -06:00
|
|
|
]
|
2024-11-27 18:53:53 -06:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
displayFallacy : String -> Element msg
|
|
|
|
displayFallacy fallacyText =
|
|
|
|
row paragraphBoldFormat
|
2024-11-28 00:33:22 -06:00
|
|
|
[ column
|
|
|
|
[ alignTop
|
|
|
|
, dodgeWidth
|
|
|
|
]
|
2024-11-27 18:53:53 -06:00
|
|
|
[ text "Fallacy:"
|
|
|
|
]
|
2024-11-28 00:33:22 -06:00
|
|
|
, column
|
|
|
|
[ E.width fill
|
|
|
|
, alignLeft
|
|
|
|
]
|
2024-11-27 18:53:53 -06:00
|
|
|
[ paragraph [ F.regular ]
|
|
|
|
[ text fallacyText ]
|
2024-11-20 15:12:38 -06:00
|
|
|
]
|
|
|
|
]
|