feat: I think I may be done v1

This commit is contained in:
Nick 2024-12-28 22:30:45 -06:00
parent c63ab0bfe7
commit 28293e56e2
11 changed files with 167 additions and 125 deletions

View file

@ -137,35 +137,35 @@ view : Shared.Model -> Model -> View Msg
view shared model =
{ title = "debate (" ++ pageNames.pageArguments ++ ")"
, attributes = []
, element = debateContainer shared.device
, element = debateContainer shared
}
debateContainer : Device -> Element msg
debateContainer device =
topLevelContainer (debateList device)
debateContainer : Shared.Model -> Element msg
debateContainer shared =
topLevelContainer (debateList shared)
debateList : Device -> Element msg
debateList device =
debateList : Shared.Model -> Element msg
debateList shared =
column
(case ( device.class, device.orientation ) of
(case ( shared.device.class, shared.device.orientation ) of
_ ->
pageList device
pageList shared.device
)
<|
List.concat
[ [ headerMaker (R.Arguments argumentHeader) ]
, List.map
(\argument ->
cardMaker device (C.Argument argument) (contentList device argument)
cardMaker shared.device (C.Argument argument) (contentList shared argument)
)
argumentList
]
contentList : Device -> Argument -> List (Element msg)
contentList device argument =
contentList : Shared.Model -> Argument -> List (Element msg)
contentList shared argument =
let
image : String -> Element msg
image size =
@ -180,13 +180,13 @@ contentList device argument =
}
]
<|
imageSquareMaker device (imagePathMaker M.Argument argument.argumentImage) True size
imageSquareMaker shared.device (imagePathMaker M.Argument argument.argumentImage) True size
in
[ row
[ width fill
, paddingEach
{ top =
case ( device.class, device.orientation ) of
case ( shared.device.class, shared.device.orientation ) of
( Phone, Portrait ) ->
8
@ -202,7 +202,7 @@ contentList device argument =
]
[ detailFormat column
[ detailFormat paragraph
[ case ( device.class, device.orientation ) of
[ case ( shared.device.class, shared.device.orientation ) of
( Phone, Portrait ) ->
none
@ -214,14 +214,14 @@ contentList device argument =
, el ([ height fill ] ++ bodyFormat TextLightGrey) <| text argument.propositionSummary
]
, detailFormat row
[ strengthMaker
[ strengthMaker shared
, barMaker getConfidenceTooltip argument.argumentCertainty
]
]
]
, tableMaker device argument
, formalizationMaker device argument
, el [alignRight] <|
, tableMaker shared.device argument
, formalizationMaker shared.device argument
, el [ alignRight ] <|
row [ width fill, spacing 20 ]
[ argumentButton (Path.toString Path.Contact_Criticism) "Reject Premise"
, argumentButton argument.proofLink "Proof Tree"
@ -229,12 +229,17 @@ contentList device argument =
]
strengthMaker : Element msg
strengthMaker =
strengthMaker : Shared.Model -> Element msg
strengthMaker shared =
el
[ tooltip
"This represents my confidence in the soundness of the argument."
]
(if not shared.isNavbarExpanded then
[ tooltip
"This represents my confidence in the soundness of the argument."
]
else
[]
)
<|
detailTitleMaker TextLightOrange "Confidence:"