diff --git a/frontend/elm.json b/frontend/elm.json index c12da99..cfbfc8f 100755 --- a/frontend/elm.json +++ b/frontend/elm.json @@ -7,6 +7,7 @@ "elm-version": "0.19.1", "dependencies": { "direct": { + "dillonkearns/elm-markdown": "7.0.1", "elm/browser": "1.0.2", "elm/core": "1.0.5", "elm/html": "1.0.0", @@ -15,8 +16,11 @@ "mdgriffith/elm-ui": "1.1.8" }, "indirect": { + "elm/parser": "1.1.0", + "elm/regex": "1.0.0", "elm/time": "1.0.0", - "elm/virtual-dom": "1.0.3" + "elm/virtual-dom": "1.0.3", + "rtfeldman/elm-hex": "1.0.0" } }, "test-dependencies": { diff --git a/frontend/src/Cuckery/Helpers.elm b/frontend/src/Cuckery/Helpers.elm index c29f05c..72c2ff8 100755 --- a/frontend/src/Cuckery/Helpers.elm +++ b/frontend/src/Cuckery/Helpers.elm @@ -17,6 +17,15 @@ import View exposing (View) makeDodge : Dodge -> Int -> Element msg makeDodge dodgeEntry index = + let + formatProposition : String -> String + formatProposition proposition = + if proposition == "N/A" then + proposition + + else + "\"" ++ proposition ++ "\"" + in column paragraphAlignLeft [ row (paragraphFormat ++ [ F.size 18 ]) [ text " " @@ -54,7 +63,7 @@ makeDodge dodgeEntry index = [ column [ alignTop, width <| px 184 ] [ text " Proposition:" ] - , column [ width <| px 350, alignLeft ] [ paragraph [ F.regular ] [ text dodgeEntry.dodgeProposition ] ] + , column [ width <| px 350, alignLeft ] [ paragraph [ F.regular ] [ text (formatProposition dodgeEntry.dodgeProposition) ] ] ] , row (paragraphBoldFormat ++ [ width fill ]) [ column [ alignTop, width <| px 184 ] diff --git a/frontend/src/Debate/Helpers.elm b/frontend/src/Debate/Helpers.elm index 2f433e8..71e6119 100755 --- a/frontend/src/Debate/Helpers.elm +++ b/frontend/src/Debate/Helpers.elm @@ -17,7 +17,7 @@ import View exposing (View) argumentMaker : Argument -> Element msg -argumentMaker makeRowInput = +argumentMaker argument = let argRows : List (Element msg) argRows = @@ -57,20 +57,20 @@ argumentMaker makeRowInput = ] ) ) - makeRowInput.argumentFormalization + argument.argumentFormalization in column [ paragraphWidth, alignLeft, spacing 8, paddingEach { top = 0, right = 0, bottom = 60, left = 0 } ] [ paragraph (paragraphBoldFormat ++ [ F.size 20 ]) - [ text makeRowInput.argumentTitle |> el [ F.color colourTheme.nonHighlightedText, F.bold ] + [ text argument.argumentTitle |> el [ F.color colourTheme.nonHighlightedText, F.bold ] ] , paragraph (paragraphBoldFormat ++ [ F.size 18 ]) [ text "Proposition: " |> el [ F.color colourTheme.highlightText ] - , text makeRowInput.propositionTitle |> el [ F.color colourTheme.nonHighlightedText, F.regular ] + , text argument.propositionTitle |> el [ F.color colourTheme.nonHighlightedText, F.regular ] ] , paragraph (paragraphBoldFormat ++ [ F.size 18 ]) [ text "Summary: " |> el [ F.color colourTheme.highlightText ] - , text makeRowInput.propositionSummary |> el [ F.color colourTheme.nonHighlightedText, F.regular ] + , text argument.propositionSummary |> el [ F.color colourTheme.nonHighlightedText, F.regular ] ] , wrappedRow (paragraphBoldFormat ++ [ alignLeft ]) [ Element.table @@ -80,7 +80,7 @@ argumentMaker makeRowInput = , D.color colourTheme.nonHighlightedDarkText , clip ] - { data = makeRowInput.definitionTable + { data = argument.definitionTable , columns = [ { header = el @@ -101,8 +101,9 @@ argumentMaker makeRowInput = , padding 8 , Element.height fill ] - [ text definition.definiendum - , row [ alignRight ] [ text ":=" ] + [ row [ centerX ] + [ paragraph [] [ text definition.definiendum ] + ] ] } , { header = @@ -124,7 +125,10 @@ argumentMaker makeRowInput = , padding 8 , Element.height fill ] - [ text definition.definiens ] + [ row [] + [ paragraph [] [ text definition.definiens ] + ] + ] } ] }