mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-16 04:25:11 -05:00
feat: improved formatting
This commit is contained in:
parent
833c6b5d94
commit
68b6a45d6c
3 changed files with 28 additions and 11 deletions
|
@ -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": {
|
||||
|
|
|
@ -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 ]
|
||||
|
|
|
@ -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 ]
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue