feat: worked on some stuff

This commit is contained in:
Nick 2024-12-07 04:58:26 -06:00
parent cfbab179e2
commit dce013366f
5 changed files with 230 additions and 183 deletions

View file

@ -33,10 +33,10 @@ argumentMaker argument =
[ cardContentSpacing [ cardContentSpacing
[ column [ column
fieldSpacer fieldSpacer
[ propositionMaker argument [ propositionMakerDesktop argument
, reductioMaker argument , reductioMakerDesktop argument
, summaryMaker argument , summaryMakerDesktop argument
, strengthMaker argument , strengthMakerDesktop argument
, tableMaker argument , tableMaker argument
, proofTreeMaker argument , proofTreeMaker argument
] ]
@ -58,10 +58,10 @@ argumentMakerMobile argument =
[ column [ column
fieldSpacer fieldSpacer
[ cardImageMakerMobile (argumentImage argument) [ cardImageMakerMobile (argumentImage argument)
, propositionMaker argument , propositionMakerMobile argument
, reductioMaker argument , reductioMakerMobile argument
, summaryMaker argument , summaryMakerMobile argument
, strengthMaker argument , strengthMakerMobile argument
, tableMaker argument , tableMaker argument
, proofTreeMaker argument , proofTreeMaker argument
] ]
@ -82,150 +82,222 @@ infoSpacing =
E.width <| px 100 E.width <| px 100
propositionMaker : Argument -> Element msg propositionMakerDesktop : Argument -> Element msg
propositionMaker argument = propositionMakerDesktop argument =
row [] row []
[ column [ propositionMaker
[ E.alignTop, E.alignLeft ] , propositionTitleMaker argument
[ paragraph ]
(paragraphBoldFormat
++ [ F.size 18
, infoSpacing propositionMakerMobile : Argument -> Element msg
] propositionMakerMobile argument =
) column []
[ el [ propositionMaker
[ tooltip , propositionTitleMaker argument
"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.textLightOrange ] propositionMaker : Element msg
] propositionMaker =
] column
, column [ E.alignTop, E.alignLeft ]
[ E.width fill, E.alignLeft ] [ paragraph
[ paragraph (paragraphBoldFormat ++ [ F.size 18 ]) (paragraphBoldFormat
[ text argument.propositionTitle ++ [ F.size 18
|> el , infoSpacing
[ F.color colourTheme.textLightGrey ]
, F.regular )
, F.size 16 [ el
] [ tooltip
"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.textLightOrange ]
] ]
] ]
reductioMaker : Argument -> Element msg propositionTitleMaker : Argument -> Element msg
reductioMaker argument = propositionTitleMaker argument =
column
[ E.width fill, E.alignLeft ]
[ paragraph (paragraphBoldFormat ++ [ F.size 18 ])
[ text argument.propositionTitle
|> el
[ F.color colourTheme.textLightGrey
, F.regular
, F.size 16
]
]
]
reductioMakerDesktop : Argument -> Element msg
reductioMakerDesktop argument =
case argument.propositionReductio of case argument.propositionReductio of
"" -> "" ->
none none
reductio -> reductio ->
row row
[ paddingEach []
{ top = 10 [ reductioMaker
, right = 0 , reductioMakerTitle reductio
, bottom = 0
, left = 0
}
]
[ column
[ E.alignTop, E.alignLeft ]
[ paragraph
(paragraphBoldFormat
++ [ F.size 18
, infoSpacing
]
)
[ el
[ tooltip
"This is the position from which the reductio ad absurdum is derived."
]
(text "Reductio:")
|> el [ F.color colourTheme.textLightOrange ]
]
]
, column [ E.width fill, E.alignLeft ]
[ paragraph
(paragraphFormat
++ [ F.size 16
, spacing 3
]
)
[ text reductio ]
]
] ]
summaryMaker : Argument -> Element msg reductioMakerMobile : Argument -> Element msg
summaryMaker argument = reductioMakerMobile argument =
case argument.propositionReductio of
"" ->
none
reductio ->
row
[]
[ reductioMaker
, reductioMakerTitle reductio
]
reductioMaker : Element msg
reductioMaker =
column
[ E.alignTop, E.alignLeft ]
[ paragraph
(paragraphBoldFormat
++ [ F.size 18
, infoSpacing
]
)
[ el
[ tooltip
"This is the position from which the reductio ad absurdum is derived."
]
(text "Reductio:")
|> el [ F.color colourTheme.textLightOrange ]
]
]
reductioMakerTitle : String -> Element msg
reductioMakerTitle reductio =
column [ E.width fill, E.alignLeft ]
[ paragraph
(paragraphFormat
++ [ F.size 16
, spacing 3
]
)
[ text reductio ]
]
summaryMakerDesktop : Argument -> Element msg
summaryMakerDesktop argument =
row [] row []
[ column [ summaryMaker
[ E.alignTop , summaryMakerTitle argument
, E.alignLeft ]
]
[ paragraph
(paragraphBoldFormat summaryMakerMobile : Argument -> Element msg
++ [ F.size 18 summaryMakerMobile argument =
, infoSpacing column []
] [ summaryMaker
) , summaryMakerTitle argument
[ el ]
[ tooltip
"The following information provides additional context and insight into the reasoning behind the argument."
] summaryMaker : Element msg
(text "Summary:") summaryMaker =
|> el [ F.color colourTheme.textLightOrange ] column
] [ E.alignTop
] , E.alignLeft
, column ]
[ E.width fill [ paragraph
, E.alignLeft (paragraphBoldFormat
] ++ [ F.size 18
[ paragraph , infoSpacing
(paragraphBoldFormat ]
++ [ F.size 18 )
, spacing 3 [ el
] [ tooltip
) "The following information provides additional context and insight into the reasoning behind the argument."
[ text argument.propositionSummary
|> el
[ F.color colourTheme.textLightGrey
, F.regular
, F.size 16
]
] ]
(text "Summary:")
|> el [ F.color colourTheme.textLightOrange ]
] ]
] ]
strengthMaker : Argument -> Element msg summaryMakerTitle : Argument -> Element msg
strengthMaker argument = summaryMakerTitle argument =
column
[ E.width fill
, E.alignLeft
]
[ paragraph
(paragraphBoldFormat
++ [ F.size 18
, spacing 3
]
)
[ text argument.propositionSummary
|> el
[ F.color colourTheme.textLightGrey
, F.regular
, F.size 16
]
]
]
strengthMakerDesktop : Argument -> Element msg
strengthMakerDesktop argument =
row [ E.width fill ] row [ E.width fill ]
[ column [ strengthMaker
[ E.alignTop , strengthMakerBar argument
, E.alignLeft
]
[ paragraph
(paragraphBoldFormat
++ [ F.size 18
, E.width fill
]
)
[ el
[ tooltip
"This represents my confidence in the soundness of the argument."
]
(text "Confidence:")
|> el [ F.color colourTheme.textLightOrange ]
]
]
, barPadding
[ barMaker getConfidenceTooltip argument.argumentCertainty ]
] ]
strengthMakerMobile : Argument -> Element msg
strengthMakerMobile argument =
column [ E.width fill ]
[ strengthMaker
, strengthMakerBar argument
]
strengthMaker : Element msg
strengthMaker =
column
[ E.alignTop
, E.alignLeft
]
[ paragraph
(paragraphBoldFormat
++ [ F.size 18
, E.width fill
]
)
[ el
[ tooltip
"This represents my confidence in the soundness of the argument."
]
(text "Confidence:")
|> el [ F.color colourTheme.textLightOrange ]
]
]
strengthMakerBar : Argument -> Element msg
strengthMakerBar argument =
barPadding
[ barMaker getConfidenceTooltip argument.argumentCertainty ]
getConfidenceTooltip : Int -> String getConfidenceTooltip : Int -> String
getConfidenceTooltip num = getConfidenceTooltip num =
case num of case num of
@ -337,7 +409,7 @@ tableMaker argument =
, padding 8 , padding 8
, E.width fill , E.width fill
] ]
(text "Definiens") (text "Definiens")!
|> el [ F.color colourTheme.textLightOrange ] |> el [ F.color colourTheme.textLightOrange ]
, width = fill , width = fill
, view = , view =
@ -376,6 +448,7 @@ formalizationMaker argument =
[ centerX [ centerX
, F.center , F.center
, spacing 3 , spacing 3
, E.width fill
] ]
in in
List.indexedMap List.indexedMap
@ -385,23 +458,20 @@ formalizationMaker argument =
++ [ spacing 3 ++ [ spacing 3
, centerX , centerX
, E.width fill , E.width fill
, paddingEach , paddingXY 35 10
{ top = 10
, right = 35
, bottom = 0
, left = 35
}
] ]
) )
(List.indexedMap (List.indexedMap
(\premiseIndex premiseWithNotation -> (\premiseIndex premiseWithNotation ->
column argumentFormatting column
(argumentFormatting ++ [ E.width fill ])
[ paragraph paragraphHightlightedBoldText [ paragraph paragraphHightlightedBoldText
[ text ("P" ++ String.fromInt (premiseIndex + 1) ++ ")") [ text ("P" ++ String.fromInt (premiseIndex + 1) ++ ")")
, text premiseWithNotation.premise , text premiseWithNotation.premise
|> el |> el
[ F.color colourTheme.textLightGrey [ F.color colourTheme.textLightGrey
, F.regular , F.regular
, E.width fill
, paddingEach , paddingEach
{ top = 0 { top = 0
, right = 0 , right = 0
@ -417,13 +487,15 @@ formalizationMaker argument =
] ]
) )
argumentEntry.premises argumentEntry.premises
++ [ column argumentFormatting ++ [ column
(argumentFormatting ++ [ E.width fill ])
[ paragraph paragraphHightlightedBoldText [ paragraph paragraphHightlightedBoldText
[ text "C)" [ text "C)"
, text argumentEntry.conclusion , text argumentEntry.conclusion
|> el |> el
[ F.color colourTheme.textLightGrey [ F.color colourTheme.textLightGrey
, F.regular , F.regular
, E.width fill
, paddingEach , paddingEach
{ top = 0 { top = 0
, right = 0 , right = 0
@ -486,25 +558,3 @@ proofTreeMaker argument =
} }
] ]
] ]
basicDivider : Element msg
basicDivider =
el
[ E.width fill
, centerX
, D.widthEach
{ bottom = 1
, top = 0
, left = 0
, right = 0
}
, D.color (rgb255 200 200 200)
, paddingEach
{ top = 40
, bottom = 0
, left = 0
, right = 0
}
]
none

View file

@ -65,7 +65,7 @@ mobileLargeHomePageImage =
} }
mobileLargedesktopHomePage = mobileLargeHomePage =
homePage mobileLargeHomePageImage homePage mobileLargeHomePageImage
@ -76,5 +76,5 @@ mobileSmallHomePageImage =
} }
mobileSmallesktopHomePage = mobileSmallHomePage =
homePage mobileSmallHomePageImage homePage mobileSmallHomePageImage

View file

@ -96,7 +96,6 @@ view { content, model, toContentMsg, props } =
, height fill , height fill
, B.color colourTheme.backgroundDarkGrey , B.color colourTheme.backgroundDarkGrey
, E.height E.fill , E.height E.fill
, scrollbarY
] ]
[ column [ column
[ htmlAttribute (H.style "position" "fixed") [ htmlAttribute (H.style "position" "fixed")

View file

@ -33,7 +33,7 @@ page shared route =
toLayout : Model -> Layouts.Layout Msg toLayout : Model -> Layouts.Layout Msg
toLayout model = toLayout model =
Layouts.Navbar { } Layouts.Navbar {}
@ -99,28 +99,26 @@ homeContainer device =
homeList : Device -> Element msg homeList : Device -> Element msg
homeList device = homeList device =
column pageListDesktop column pageListDesktop
(case ( device.class, device.orientation ) of [ case device.class of
( Phone, Portrait ) -> Desktop ->
[mobileSmallesktopHomePage] desktopHomePage
( Phone, Landscape ) -> BigDesktop ->
[mobileSmallesktopHomePage] desktopHomePage
( Tablet, Portrait ) -> Tablet ->
[mobileLargedesktopHomePage] case device.orientation of
Portrait ->
mobileLargeHomePage
( Tablet, Landscape ) -> Landscape ->
[mobileLargedesktopHomePage] desktopHomePage
( Desktop, Portrait ) -> Phone ->
[ desktopHomePage ] case device.orientation of
Portrait ->
mobileSmallHomePage
( Desktop, Landscape ) -> Landscape ->
[ desktopHomePage ] desktopHomePage
]
( BigDesktop, Portrait ) ->
[ desktopHomePage ]
( BigDesktop, Landscape ) ->
[ desktopHomePage ]
)

View file

@ -30,5 +30,5 @@ export const onReady = ({ app, env }) => {
} }
app.ports.gotArgHeight.send(heights); app.ports.gotArgHeight.send(heights);
}); });z
}; };