feat: added fallacy types and functions

This commit is contained in:
Nick 2024-11-19 23:05:39 -06:00
parent 1e2db95875
commit e163ea8cf1
68 changed files with 183 additions and 129 deletions

View file

@ -29,19 +29,59 @@ makeDodge dodgeEntry index =
maybeFallacyField : Element msg
maybeFallacyField =
case dodgeEntry.dodgeFallacy of
"" ->
Nothing ->
none
fallacy ->
row paragraphBoldFormat
[ column [ alignTop, width <| px 184 ]
[ text " Fallacy:"
]
, column [ width <| px 350, alignLeft ]
[ paragraph [ F.regular ]
[ text (formatProposition fallacy) ]
]
]
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"
displayFallacy : String -> Element msg
displayFallacy fallacyText =
row paragraphBoldFormat
[ column [ alignTop, width (px 184) ]
[ text "Fallacy:" |> el [ paddingEach { top = 0, right = 0, bottom = 0, left = 70 } ]
]
, column [ width (px 350), alignLeft ]
[ paragraph [ F.regular ]
[ text fallacyText ]
]
]
in
column paragraphAlignLeft
[ row (paragraphFormat ++ [ F.size 18 ])
@ -81,14 +121,14 @@ makeDodge dodgeEntry index =
]
, row paragraphBoldFormat
[ column [ alignTop, width <| px 184 ]
[ text " Proposition:"
[ text "Proposition:" |> el [ paddingEach { top = 0, right = 0, bottom = 0, left = 70 } ]
]
, column [ width <| px 350, alignLeft ] [ paragraph [ F.regular ] [ text (formatProposition dodgeEntry.dodgeProposition) ] ]
]
, maybeFallacyField
, row (paragraphBoldFormat ++ [ width fill ])
[ column [ alignTop, width <| px 184 ]
[ text " Doxastic State:"
[ text "Doxastic State:" |> el [ paddingEach { top = 0, right = 0, bottom = 0, left = 70 } ]
]
, column [ width <| px 350, alignLeft ]
[ case dodgeEntry.dodgeNicksDoxasticState of
@ -115,7 +155,7 @@ makeDodge dodgeEntry index =
]
, row (paragraphBoldFormat ++ [ width fill ])
[ column [ alignTop, width <| px 184 ]
[ text " Reason:"
[ text "Reason:" |> el [ paddingEach { top = 0, right = 0, bottom = 0, left = 70 } ]
]
, column [ width <| px 350, alignLeft ]
[ paragraph [ F.regular ]