chore: push for isaac

This commit is contained in:
Nick 2024-11-23 15:37:36 -06:00
parent b0bfebf044
commit a5e3c57215
4 changed files with 271 additions and 305 deletions

View file

@ -25,5 +25,5 @@ colourTheme =
, highlightTextHover = rgb255 120 60 0 , highlightTextHover = rgb255 120 60 0
, backgroundColour = rgb255 40 40 40 , backgroundColour = rgb255 40 40 40
, debugColour = rgb255 227 28 121 , debugColour = rgb255 227 28 121
, darker = rgb255 49 50 68 , darker = rgb255 30 30 30
} }

View file

@ -31,7 +31,7 @@ pageList =
transitionStyle : Attribute msg transitionStyle : Attribute msg
transitionStyle = transitionStyle =
htmlAttribute <| style "transition" "all 4s" htmlAttribute <| style "transition" "all 0.4s ease-in-out"
transitionHighlightedLinkHover : Element msg -> Element msg transitionHighlightedLinkHover : Element msg -> Element msg

View file

@ -13,6 +13,7 @@ import Element.Background as B exposing (..)
import Element.Border as D exposing (..) import Element.Border as D exposing (..)
import Element.Events as V exposing (..) import Element.Events as V exposing (..)
import Element.Font as F exposing (..) import Element.Font as F exposing (..)
import Html.Attributes exposing (form)
import Layouts import Layouts
import List.Extra exposing (..) import List.Extra exposing (..)
import Maybe exposing (withDefault) import Maybe exposing (withDefault)
@ -23,7 +24,15 @@ import View exposing (View)
-- argumentMaker : List Bool -> Argument -> Int -> Element msg -- (if isArgumentExpanded then
-- [ height <| px 0
-- , transitionStyle
-- , roundEach { topLeft = 0, topRight = 0, bottomRight = 10, bottomLeft = 10 }
-- ]
-- else
-- [
-- ]
-- )
argumentMaker : (Int -> msg) -> List Bool -> Argument -> Int -> Element msg argumentMaker : (Int -> msg) -> List Bool -> Argument -> Int -> Element msg
@ -36,15 +45,34 @@ argumentMaker onClickMsg areArgsExpanded argument indexExpand =
column column
[ B.color colourTheme.darker [ B.color colourTheme.darker
, rounded 10 , rounded 10
, E.width <| px 700
] ]
-- [ explain Debug.todo ]
[ titleMaker onClickMsg indexExpand argument.argumentTitle isArgumentExpanded [ titleMaker onClickMsg indexExpand argument.argumentTitle isArgumentExpanded
, paragraphMaker argument isArgumentExpanded , column
([ E.width <| px 650, centerX, transitionStyle ]
++ (if not isArgumentExpanded then
[ height shrink
, transitionStyle
, clip
, roundEach { topLeft = 0, topRight = 0, bottomRight = 10, bottomLeft = 10 }
]
else
[ transitionStyle
]
)
)
[ propositionMaker argument isArgumentExpanded
, reductioMaker argument isArgumentExpanded
, summaryMaker argument isArgumentExpanded
, tableMaker argument isArgumentExpanded
, proofTreeMaker argument isArgumentExpanded
]
] ]
titleMaker : (Int -> msg) -> Int -> String -> Bool -> Element msg titleMaker : (Int -> msg) -> Int -> String -> Bool -> Element msg
titleMaker onClickMsg indexExpand title isArgExpanded = titleMaker onClickMsg indexExpand title isArgumentExpanded =
paragraph paragraph
(paragraphBoldFormat (paragraphBoldFormat
++ [ F.size 20 ++ [ F.size 20
@ -56,15 +84,15 @@ titleMaker onClickMsg indexExpand title isArgExpanded =
, alignBottom , alignBottom
, F.center , F.center
, transitionStyle , transitionStyle
, pointer
-- , mouseOver , mouseOver
-- [ B.color colourTheme.highlightTextHover [ B.color colourTheme.highlightTextHover
-- , F.color colourTheme.nonHighlightedText , F.color colourTheme.nonHighlightedText
-- , D.color colourTheme.highlightTextHover , D.color colourTheme.highlightTextHover
-- ] ]
, V.onClick <| onClickMsg indexExpand , V.onClick <| onClickMsg indexExpand
] ]
++ (if isArgExpanded then ++ (if not isArgumentExpanded then
[ rounded 10 ] [ rounded 10 ]
else else
@ -75,250 +103,191 @@ titleMaker onClickMsg indexExpand title isArgExpanded =
] ]
paragraphMaker : Argument -> Bool -> Element msg propositionMaker : Argument -> Bool -> Element msg
paragraphMaker argument isArgumentExpanded = propositionMaker argument isArgumentExpanded =
paragraph row [ paddingEach { top = 10, right = 0, bottom = 0, left = 0 } ]
(if isArgumentExpanded then [ column
[ height <| px 0 [ E.alignTop, E.alignLeft ]
, transitionStyle [ paragraph (paragraphBoldFormat ++ [ F.size 18, E.width <| px 100 ])
, roundEach { topLeft = 0, topRight = 0, bottomRight = 10, bottomLeft = 10 } [ el [ tooltip below (myTooltip "A proposition is a declarative statement that can be evaluated as either true or false, and which serves as the basis for debate.") ] (text "Proposition:") |> el [ F.color colourTheme.highlightText ] ]
-- , B.color colourTheme.debugColour
] ]
-- [] , column
[ E.width fill, E.alignLeft ]
else [ paragraph (paragraphBoldFormat ++ [ F.size 18 ]) [ text argument.propositionTitle |> el [ F.color colourTheme.nonHighlightedText, F.regular, F.size 16 ] ] ]
[ height <| px 100
, transitionStyle
-- , B.color colourTheme.debugColour
]
)
[ text argument.propositionSummary
|> el
[ F.color colourTheme.nonHighlightedText
, F.regular
, F.size 16
]
] ]
reductioMaker : Argument -> Bool -> Element msg
reductioMaker argument isArgumentExpanded =
case argument.propositionReductio of
"" ->
none
-- argumentMaker : (Int -> msg) -> List Bool -> Argument -> Int -> Element msg reductio ->
-- argumentMaker onClickMsg areArgsExpanded argument indexExpand = row []
-- let [ column
-- maybeIsExpanded : Maybe Bool [ E.alignTop, E.alignLeft ]
-- maybeIsExpanded = [ paragraph (paragraphBoldFormat ++ [ F.size 18, E.width <| px 100 ])
-- getAt indexExpand areArgsExpanded [ el [ tooltip below (myTooltip "This is the position from which the reductio ad absurdum is derived.") ] (text "Reductio:") |> el [ F.color colourTheme.highlightText ]
-- argRows : List (Element msg) ]
-- argRows = ]
-- let , column [ E.width fill, E.alignLeft ]
-- argumentFormatting : List (Attribute msg) [ paragraph (paragraphBoldFormat ++ [ F.size 18, spacing 3 ])
-- argumentFormatting = [ text reductio ]
-- [ centerX, F.center, spacing 3 ] ]
-- in ]
-- List.indexedMap
-- (\index argumentEntry ->
-- column (paragraphFormat ++ [ spacing 3, paddingEach { top = 0, right = 0, bottom = 0, left = 0 }, E.width <| px 550, centerX ]) summaryMaker : Argument -> Bool -> Element msg
-- (List.indexedMap summaryMaker argument isArgumentExpanded =
-- (\premiseIndex premiseWithNotation -> row []
-- column argumentFormatting [ column
-- [ paragraph paragraphHightlightedBoldText [ E.alignTop, E.alignLeft ]
-- [ text ("P" ++ String.fromInt (premiseIndex + 1) ++ ")") [ paragraph (paragraphBoldFormat ++ [ F.size 18, E.width <| px 100 ])
-- , text premiseWithNotation.premise [ el [ tooltip below (myTooltip "The following information provides additional context and insight into the reasoning behind the argument") ] (text "Summary:") |> el [ F.color colourTheme.highlightText ]
-- |> el [ F.color colourTheme.nonHighlightedText, F.regular, paddingEach { top = 0, right = 0, bottom = 0, left = 5 } ] ]
-- ] ]
-- , paragraph argumentFormatting , column
-- [ text ("(" ++ premiseWithNotation.notation ++ ")") [ E.width fill, E.alignLeft ]
-- |> el [ F.color colourTheme.highlightText, F.bold ] [ paragraph (paragraphBoldFormat ++ [ F.size 18, spacing 3 ]) [ text argument.propositionSummary |> el [ F.color colourTheme.nonHighlightedText, F.regular, F.size 16 ] ] ]
-- ] ]
-- ]
-- )
-- argumentEntry.premises tableMaker : Argument -> Bool -> Element msg
-- ++ [ column argumentFormatting tableMaker argument isArgumentExpanded =
-- [ paragraph paragraphHightlightedBoldText let
-- [ text "C)" formalizationMaker : List (Element msg)
-- , text argumentEntry.conclusion formalizationMaker =
-- |> el [ F.color colourTheme.nonHighlightedText, F.regular, paddingEach { top = 0, right = 0, bottom = 0, left = 5 } ] let
-- ] argumentFormatting : List (Attribute msg)
-- , paragraph argumentFormatting argumentFormatting =
-- [ text ("(∴" ++ argumentEntry.conclusionNotation ++ ")") [ centerX, F.center, spacing 3 ]
-- |> el [ F.color colourTheme.highlightText, F.bold ] in
-- ] List.indexedMap
-- ] (\index argumentEntry ->
-- ] column (paragraphFormat ++ [ spacing 3, E.width <| px 500, centerX ])
-- ) (List.indexedMap
-- ) (\premiseIndex premiseWithNotation ->
-- argument.argumentFormalization column argumentFormatting
-- maybeReductioField : Element msg [ paragraph paragraphHightlightedBoldText
-- maybeReductioField = [ text ("P" ++ String.fromInt (premiseIndex + 1) ++ ")")
-- case argument.propositionReductio of , text premiseWithNotation.premise
-- "" -> |> el [ F.color colourTheme.nonHighlightedText, F.regular, paddingEach { top = 0, right = 0, bottom = 0, left = 5 } ]
-- none ]
-- reductio -> , paragraph argumentFormatting
-- row [] [ text ("(" ++ premiseWithNotation.notation ++ ")")
-- [ column |> el [ F.color colourTheme.highlightText, F.bold ]
-- [ E.alignTop, E.alignLeft ] ]
-- [ paragraph (paragraphBoldFormat ++ [ F.size 18, E.width <| px 100 ]) ]
-- [ el [ tooltip below (myTooltip "This is the position from which the reductio ad absurdum is derived.") ] (text "Reductio:") |> el [ F.color colourTheme.highlightText ] )
-- ] argumentEntry.premises
-- ] ++ [ column argumentFormatting
-- , column [ E.width fill, E.alignLeft ] [ paragraph paragraphHightlightedBoldText
-- [ paragraph [] [ text "C)"
-- [ text reductio |> el [ F.color colourTheme.nonHighlightedText, F.regular, F.size 16 ] , text argumentEntry.conclusion
-- ] |> el [ F.color colourTheme.nonHighlightedText, F.regular, paddingEach { top = 0, right = 0, bottom = 0, left = 5 } ]
-- ] ]
-- ] , paragraph argumentFormatting
-- in [ text ("(" ++ argumentEntry.conclusionNotation ++ ")")
-- column |> el [ F.color colourTheme.highlightText, F.bold ]
-- [ paragraphWidth ]
-- , E.alignLeft ]
-- , spacing 8 ]
-- , explain Debug.todo )
-- ] )
-- [ paragraph argument.argumentFormalization
-- (paragraphBoldFormat in
-- ++ [ F.size 20 column [ centerX ]
-- , F.color colourTheme.backgroundColour [ wrappedRow (paragraphBoldFormat ++ [ E.alignLeft, E.width fill, paddingEach { top = 10, right = 0, bottom = 10, left = 0 } ])
-- , B.color colourTheme.highlightText [ E.table
-- , paddingEach { top = 6, bottom = 2, left = 12, right = 12 } [ spacing 0
-- , D.width 1 , D.rounded 10
-- , D.rounded 20 , D.width 2
-- , alignBottom , D.color colourTheme.nonHighlightedDarkText
-- , F.center , clip
-- , transitionStyle ]
-- , mouseOver { data = argument.definitionTable
-- [ B.color colourTheme.highlightTextHover , columns =
-- , F.color colourTheme.nonHighlightedText [ { header =
-- , D.color colourTheme.highlightTextHover el
-- ] [ F.bold
-- , V.onClick <| onClickMsg indexExpand , D.widthEach { bottom = 1, top = 1, left = 1, right = 1 }
-- ] , D.color colourTheme.nonHighlightedDarkText
-- ) , padding 8
-- [ text argument.argumentTitle ]
-- ] (text "Definiendum" |> el [ F.color colourTheme.highlightText ])
-- , paragraph , width = fill |> maximum 50
-- (case maybeIsExpanded of , view =
-- Just True -> \definition ->
-- [ F.size 0, transitionStyle ] row
-- _ -> [ F.color colourTheme.highlightText
-- [ transitionStyle, F.size 50 ] , F.bold
-- ) , D.widthEach { bottom = 1, top = 0, left = 1, right = 1 }
-- [ row [ paddingEach { top = 10, right = 0, bottom = 0, left = 0 } ] , D.color colourTheme.nonHighlightedDarkText
-- [ column , padding 8
-- [ E.alignTop, E.alignLeft ] , E.height fill
-- [ paragraph (paragraphBoldFormat ++ [ F.size 18, E.width <| px 100 ]) ]
-- [ el [ tooltip below (myTooltip "A proposition is a declarative statement that can be evaluated as either true or false, and which serves as the basis for debate.") ] (text "Proposition:") |> el [ F.color colourTheme.highlightText ] ] [ row [ centerX ]
-- ] [ paragraph [] [ text definition.definiendum ]
-- , column ]
-- [ E.width fill, E.alignLeft ] ]
-- [ paragraph (paragraphBoldFormat ++ [ F.size 18 ]) [ text argument.propositionTitle |> el [ F.color colourTheme.nonHighlightedText, F.regular, F.size 16 ] ] ] }
-- ] , { header =
-- , maybeReductioField el
-- , row [ E.alignTop ] [ F.bold
-- [ column , D.widthEach { bottom = 1, top = 1, left = 0, right = 1 }
-- [ E.alignTop, E.alignLeft ] , D.color colourTheme.nonHighlightedDarkText
-- [ paragraph (paragraphBoldFormat ++ [ F.size 18, E.width <| px 100 ]) , padding 8
-- [ el [ tooltip below (myTooltip "The following information provides additional context and insight into the reasoning behind the argument") ] (text "Summary:") |> el [ F.color colourTheme.highlightText ] ]
-- ] (text "Definiens" |> el [ F.color colourTheme.highlightText ])
-- ] , width = fill
-- , column , view =
-- [ E.width fill, E.alignLeft ] \definition ->
-- [ paragraph (paragraphBoldFormat ++ [ F.size 18 ]) [ text argument.propositionSummary |> el [ F.color colourTheme.nonHighlightedText, F.regular, F.size 16 ] ] ] paragraph
-- ] [ F.color colourTheme.nonHighlightedText
-- , wrappedRow (paragraphBoldFormat ++ [ E.alignLeft, E.width fill, paddingEach { top = 10, right = 0, bottom = 10, left = 0 } ]) , F.regular
-- [ E.table , D.widthEach { bottom = 1, top = 0, left = 0, right = 1 }
-- [ spacing 0 , D.color colourTheme.nonHighlightedDarkText
-- , D.rounded 10 , padding 8
-- , D.width 2 , E.height fill
-- , D.color colourTheme.nonHighlightedDarkText ]
-- , clip [ row []
-- ] [ paragraph [] [ text definition.definiens ]
-- { data = argument.definitionTable ]
-- , columns = ]
-- [ { header = }
-- el ]
-- [ F.bold }
-- , D.widthEach { bottom = 1, top = 1, left = 1, right = 1 } ]
-- , D.color colourTheme.nonHighlightedDarkText , column [ centerX ] formalizationMaker
-- , padding 8 ]
-- ]
-- (text "Definiendum" |> el [ F.color colourTheme.highlightText ])
-- , width = fill |> maximum 50 proofTreeMaker : Argument -> Bool -> Element msg
-- , view = proofTreeMaker argument isArgumentExpanded =
-- \definition -> row [ paddingEach { top = 10, right = 0, bottom = 10, left = 0 }, centerX, E.width fill ]
-- row [ column [ E.alignRight ]
-- [ F.color colourTheme.highlightText [ newTabLink
-- , F.bold (paragraphBoldFormat
-- , D.widthEach { bottom = 1, top = 0, left = 1, right = 1 } ++ [ F.size 18
-- , D.color colourTheme.nonHighlightedDarkText , F.color colourTheme.backgroundColour
-- , padding 8 , B.color colourTheme.highlightText
-- , E.height fill , paddingEach { top = 6, bottom = 2, left = 12, right = 12 }
-- ] , D.width 1
-- [ row [ centerX ] , D.rounded 10
-- [ paragraph [] [ text definition.definiendum ] , E.width <| px 105
-- ] , F.center
-- ] , E.alignRight
-- } , transitionStyle
-- , { header = , mouseOver
-- el [ B.color colourTheme.highlightTextHover
-- [ F.bold , F.color colourTheme.nonHighlightedText
-- , D.widthEach { bottom = 1, top = 1, left = 0, right = 1 } , D.color colourTheme.highlightTextHover
-- , D.color colourTheme.nonHighlightedDarkText ]
-- , padding 8 ]
-- ] )
-- (text "Definiens" |> el [ F.color colourTheme.highlightText ]) { url = argument.proofLink
-- , width = fill , label = text "Proof Tree"
-- , view = }
-- \definition -> ]
-- paragraph ]
-- [ F.color colourTheme.nonHighlightedText
-- , F.regular
-- , D.widthEach { bottom = 1, top = 0, left = 0, right = 1 }
-- , D.color colourTheme.nonHighlightedDarkText
-- , padding 8
-- , E.height fill
-- ]
-- [ row []
-- [ paragraph [] [ text definition.definiens ]
-- ]
-- ]
-- }
-- ]
-- }
-- ]
-- , column [ centerX ]
-- (argRows
-- ++ [ column [ paragraphWidth, paddingEach { top = 10, right = 0, bottom = 0, left = 0 } ]
-- [ row [ centerX, E.width fill ]
-- [ column [ E.alignRight ]
-- [ newTabLink
-- (paragraphBoldFormat
-- ++ [ F.size 18
-- , F.color colourTheme.backgroundColour
-- , B.color colourTheme.highlightText
-- , paddingEach { top = 6, bottom = 2, left = 12, right = 12 }
-- , D.width 1
-- , D.rounded 20
-- , E.width <| px 105
-- , F.center
-- , E.alignRight
-- , transitionStyle
-- , mouseOver
-- [ B.color colourTheme.highlightTextHover
-- , F.color colourTheme.nonHighlightedText
-- , D.color colourTheme.highlightTextHover
-- ]
-- ]
-- )
-- { url = argument.proofLink
-- , label = text "Proof Tree"
-- }
-- ]
-- ]
-- ]
-- -- , basicDivider
-- ]
-- )
-- ]
-- ]

View file

@ -158,57 +158,54 @@ debateList model =
List.map2 (argumentMaker ToggleExpandArg model.areArgsExpanded) List.map2 (argumentMaker ToggleExpandArg model.areArgsExpanded)
[ argumentApoBCVD [ argumentApoBCVD
, argumentAnabolicKeto , argumentAnabolicKeto
, argumentAntagonisticPleiotropy
, argumentCarbsObesity
, argumentDietaryCholesterol
, argumentFructoseNAFLD
, argumentHealthPromotingFoods
, argumentHealthSeeker
, argumentHealthyChocolate
, argumentHealthyDairy
, argumentHealthyFattyFish
, argumentHealthyFibre
, argumentHealthyFood
, argumentHealthyPlantFoods
, argumentHealthySeedOils
, argumentHealthySoy
, argumentMalondialdehyde
, argumentOmega3Omega6Ratio
, argumentPlantBasedCVDReversal
, argumentPolyphenolReductio
, argumentSodiumCVD
, argumentTMAOCausality
, argumentUnhealthyCoconutOil
, argumentUnhealthyProcessedMeat
, argumentUnhealthyRedMeat
, argumentUnhealthySaturatedFat
, argumentAbortion
, argumentAgnosticism
, argumentAgriculturalPredation
, argumentAnimalRights
, argumentAntiRewilding
, argumentAntiVandalism
, argumentColonizingNature
, argumentCropDeaths
, argumentDairyCowRape
, argumentEfilismPatrolSquad
, argumentEthicalSlurs
, argumentFineTuning
, argumentImmortalityReductio
, argumentOddOrderPredators
, argumentOstroveganism
, argumentPollinationReductio
, argumentScratcherPioneers
, argumentTransPeople
, argumentVeganSocietyReductio
, argumentBoobyTrapPagers
, argumentEpidemiologyCausality
, argumentFlatEarthDebunk
, argumentTruncatedMeta
] ]
<| <|
List.range 0 <| List.range 0 <|
List.length model.areArgsExpanded List.length model.areArgsExpanded
-- , argumentAntagonisticPleiotropy
-- , argumentCarbsObesity
-- , argumentDietaryCholesterol
-- , argumentFructoseNAFLD
-- , argumentHealthPromotingFoods
-- , argumentHealthSeeker
-- , argumentHealthyChocolate
-- , argumentHealthyDairy
-- , argumentHealthyFattyFish
-- , argumentHealthyFibre
-- , argumentHealthyFood
-- , argumentHealthyPlantFoods
-- , argumentHealthySeedOils
-- , argumentHealthySoy
-- , argumentMalondialdehyde
-- , argumentOmega3Omega6Ratio
-- , argumentPlantBasedCVDReversal
-- , argumentPolyphenolReductio
-- , argumentSodiumCVD
-- , argumentTMAOCausality
-- , argumentUnhealthyCoconutOil
-- , argumentUnhealthyProcessedMeat
-- , argumentUnhealthyRedMeat
-- , argumentUnhealthySaturatedFat
-- , argumentAbortion
-- , argumentAgnosticism
-- , argumentAgriculturalPredation
-- , argumentAnimalRights
-- , argumentAntiRewilding
-- , argumentAntiVandalism
-- , argumentColonizingNature
-- , argumentCropDeaths
-- , argumentDairyCowRape
-- , argumentEfilismPatrolSquad
-- , argumentEthicalSlurs
-- , argumentFineTuning
-- , argumentImmortalityReductio
-- , argumentOddOrderPredators
-- , argumentOstroveganism
-- , argumentPollinationReductio
-- , argumentScratcherPioneers
-- , argumentTransPeople
-- , argumentVeganSocietyReductio
-- , argumentBoobyTrapPagers
-- , argumentEpidemiologyCausality
-- , argumentFlatEarthDebunk
-- , argumentTruncatedMeta