diff --git a/frontend/src/Config/Colour.elm b/frontend/src/Config/Colour.elm index 661b3eb..bb4837c 100755 --- a/frontend/src/Config/Colour.elm +++ b/frontend/src/Config/Colour.elm @@ -13,6 +13,7 @@ type alias Theme = , highlightTextHover : Color , backgroundColour : Color , debugColour : Color + , darker : Color } @@ -24,4 +25,5 @@ colourTheme = , highlightTextHover = rgb255 120 60 0 , backgroundColour = rgb255 40 40 40 , debugColour = rgb255 227 28 121 + , darker = rgb255 49 50 68 } diff --git a/frontend/src/Config/Format.elm b/frontend/src/Config/Format.elm index 995045d..41abb44 100755 --- a/frontend/src/Config/Format.elm +++ b/frontend/src/Config/Format.elm @@ -20,8 +20,9 @@ topLevelContainer = pageList : List (Attribute msg) pageList = - [ spacing 40 - , centerX + [ spacing 10 + , -- Isaac yote me, fix me. + centerX , centerY , alignTop , paddingEach { top = 30, bottom = 30, left = 30, right = 30 } @@ -30,7 +31,7 @@ pageList = transitionStyle : Attribute msg transitionStyle = - htmlAttribute <| style "transition" "all .4s" + htmlAttribute <| style "transition" "all 4s" transitionHighlightedLinkHover : Element msg -> Element msg diff --git a/frontend/src/Debate/Helpers.elm b/frontend/src/Debate/Helpers.elm index 40c465a..d5334c2 100755 --- a/frontend/src/Debate/Helpers.elm +++ b/frontend/src/Debate/Helpers.elm @@ -33,14 +33,18 @@ argumentMaker onClickMsg areArgsExpanded argument indexExpand = isArgumentExpanded = withDefault False <| getAt indexExpand areArgsExpanded in - column [ explain Debug.todo ] - [ titleMaker onClickMsg indexExpand argument.argumentTitle + column + [ B.color colourTheme.darker + , rounded 10 + ] + -- [ explain Debug.todo ] + [ titleMaker onClickMsg indexExpand argument.argumentTitle isArgumentExpanded , paragraphMaker argument isArgumentExpanded ] -titleMaker : (Int -> msg) -> Int -> String -> Element msg -titleMaker onClickMsg indexExpand title = +titleMaker : (Int -> msg) -> Int -> String -> Bool -> Element msg +titleMaker onClickMsg indexExpand title isArgExpanded = paragraph (paragraphBoldFormat ++ [ F.size 20 @@ -48,17 +52,24 @@ titleMaker onClickMsg indexExpand title = , B.color colourTheme.highlightText , paddingEach { top = 6, bottom = 2, left = 12, right = 12 } , D.width 1 - , D.rounded 20 + , roundEach { topLeft = 10, topRight = 10, bottomRight = 0, bottomLeft = 0 } , alignBottom , F.center , transitionStyle - , mouseOver - [ B.color colourTheme.highlightTextHover - , F.color colourTheme.nonHighlightedText - , D.color colourTheme.highlightTextHover - ] + + -- , mouseOver + -- [ B.color colourTheme.highlightTextHover + -- , F.color colourTheme.nonHighlightedText + -- , D.color colourTheme.highlightTextHover + -- ] , V.onClick <| onClickMsg indexExpand ] + ++ (if isArgExpanded then + [ rounded 10 ] + + else + [ roundEach { topLeft = 10, topRight = 10, bottomRight = 0, bottomLeft = 0 } ] + ) ) [ text title ] @@ -66,22 +77,29 @@ titleMaker onClickMsg indexExpand title = paragraphMaker : Argument -> Bool -> Element msg paragraphMaker argument isArgumentExpanded = - row [] - [ -- column - -- [ E.alignTop, E.alignLeft ] - -- [ paragraph (paragraphBoldFormat ++ [ F.size 18, E.width <| px 100 ]) - -- [-- el [ tooltip below (myTooltip titleTooltip) ] (text title) |> el [ F.color colourTheme.highlightText ] - -- ] - -- ] - -- , - paragraph - (if isArgumentExpanded then - [ F.size 0, transitionStyle ] + paragraph + (if isArgumentExpanded then + [ height <| px 0 + , transitionStyle + , roundEach { topLeft = 0, topRight = 0, bottomRight = 10, bottomLeft = 10 } - else - [ paddingEach { top = 10, right = 0, bottom = 0, left = 0 } ] - ) - [ text argument.propositionSummary |> el [ F.color colourTheme.nonHighlightedText, F.regular, F.size 16 ] ] + -- , B.color colourTheme.debugColour + ] + -- [] + + else + [ height <| px 100 + , transitionStyle + + -- , B.color colourTheme.debugColour + ] + ) + [ text argument.propositionSummary + |> el + [ F.color colourTheme.nonHighlightedText + , F.regular + , F.size 16 + ] ]