mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-16 04:25:11 -05:00
feat: worked on some stuff
This commit is contained in:
parent
cfbab179e2
commit
dce013366f
5 changed files with 230 additions and 183 deletions
|
@ -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,10 +82,25 @@ 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
|
||||||
|
, propositionTitleMaker argument
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
propositionMakerMobile : Argument -> Element msg
|
||||||
|
propositionMakerMobile argument =
|
||||||
|
column []
|
||||||
|
[ propositionMaker
|
||||||
|
, propositionTitleMaker argument
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
propositionMaker : Element msg
|
||||||
|
propositionMaker =
|
||||||
|
column
|
||||||
[ E.alignTop, E.alignLeft ]
|
[ E.alignTop, E.alignLeft ]
|
||||||
[ paragraph
|
[ paragraph
|
||||||
(paragraphBoldFormat
|
(paragraphBoldFormat
|
||||||
|
@ -101,7 +116,11 @@ propositionMaker argument =
|
||||||
|> el [ F.color colourTheme.textLightOrange ]
|
|> el [ F.color colourTheme.textLightOrange ]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
, column
|
|
||||||
|
|
||||||
|
propositionTitleMaker : Argument -> Element msg
|
||||||
|
propositionTitleMaker argument =
|
||||||
|
column
|
||||||
[ E.width fill, E.alignLeft ]
|
[ E.width fill, E.alignLeft ]
|
||||||
[ paragraph (paragraphBoldFormat ++ [ F.size 18 ])
|
[ paragraph (paragraphBoldFormat ++ [ F.size 18 ])
|
||||||
[ text argument.propositionTitle
|
[ text argument.propositionTitle
|
||||||
|
@ -112,25 +131,39 @@ propositionMaker argument =
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
reductioMaker : Argument -> Element msg
|
reductioMakerDesktop : Argument -> Element msg
|
||||||
reductioMaker argument =
|
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
|
|
||||||
|
|
||||||
|
reductioMakerMobile : Argument -> Element msg
|
||||||
|
reductioMakerMobile argument =
|
||||||
|
case argument.propositionReductio of
|
||||||
|
"" ->
|
||||||
|
none
|
||||||
|
|
||||||
|
reductio ->
|
||||||
|
row
|
||||||
|
[]
|
||||||
|
[ reductioMaker
|
||||||
|
, reductioMakerTitle reductio
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
reductioMaker : Element msg
|
||||||
|
reductioMaker =
|
||||||
|
column
|
||||||
[ E.alignTop, E.alignLeft ]
|
[ E.alignTop, E.alignLeft ]
|
||||||
[ paragraph
|
[ paragraph
|
||||||
(paragraphBoldFormat
|
(paragraphBoldFormat
|
||||||
|
@ -146,7 +179,11 @@ reductioMaker argument =
|
||||||
|> el [ F.color colourTheme.textLightOrange ]
|
|> el [ F.color colourTheme.textLightOrange ]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
, column [ E.width fill, E.alignLeft ]
|
|
||||||
|
|
||||||
|
reductioMakerTitle : String -> Element msg
|
||||||
|
reductioMakerTitle reductio =
|
||||||
|
column [ E.width fill, E.alignLeft ]
|
||||||
[ paragraph
|
[ paragraph
|
||||||
(paragraphFormat
|
(paragraphFormat
|
||||||
++ [ F.size 16
|
++ [ F.size 16
|
||||||
|
@ -155,13 +192,27 @@ reductioMaker argument =
|
||||||
)
|
)
|
||||||
[ text reductio ]
|
[ text reductio ]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
summaryMakerDesktop : Argument -> Element msg
|
||||||
|
summaryMakerDesktop argument =
|
||||||
|
row []
|
||||||
|
[ summaryMaker
|
||||||
|
, summaryMakerTitle argument
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
summaryMaker : Argument -> Element msg
|
summaryMakerMobile : Argument -> Element msg
|
||||||
summaryMaker argument =
|
summaryMakerMobile argument =
|
||||||
row []
|
column []
|
||||||
[ column
|
[ summaryMaker
|
||||||
|
, summaryMakerTitle argument
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
summaryMaker : Element msg
|
||||||
|
summaryMaker =
|
||||||
|
column
|
||||||
[ E.alignTop
|
[ E.alignTop
|
||||||
, E.alignLeft
|
, E.alignLeft
|
||||||
]
|
]
|
||||||
|
@ -179,7 +230,11 @@ summaryMaker argument =
|
||||||
|> el [ F.color colourTheme.textLightOrange ]
|
|> el [ F.color colourTheme.textLightOrange ]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
, column
|
|
||||||
|
|
||||||
|
summaryMakerTitle : Argument -> Element msg
|
||||||
|
summaryMakerTitle argument =
|
||||||
|
column
|
||||||
[ E.width fill
|
[ E.width fill
|
||||||
, E.alignLeft
|
, E.alignLeft
|
||||||
]
|
]
|
||||||
|
@ -197,13 +252,27 @@ summaryMaker argument =
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
strengthMakerDesktop : Argument -> Element msg
|
||||||
|
strengthMakerDesktop argument =
|
||||||
|
row [ E.width fill ]
|
||||||
|
[ strengthMaker
|
||||||
|
, strengthMakerBar argument
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
strengthMaker : Argument -> Element msg
|
strengthMakerMobile : Argument -> Element msg
|
||||||
strengthMaker argument =
|
strengthMakerMobile argument =
|
||||||
row [ E.width fill ]
|
column [ E.width fill ]
|
||||||
[ column
|
[ strengthMaker
|
||||||
|
, strengthMakerBar argument
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
strengthMaker : Element msg
|
||||||
|
strengthMaker =
|
||||||
|
column
|
||||||
[ E.alignTop
|
[ E.alignTop
|
||||||
, E.alignLeft
|
, E.alignLeft
|
||||||
]
|
]
|
||||||
|
@ -221,9 +290,12 @@ strengthMaker argument =
|
||||||
|> el [ F.color colourTheme.textLightOrange ]
|
|> el [ F.color colourTheme.textLightOrange ]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
, barPadding
|
|
||||||
|
|
||||||
|
strengthMakerBar : Argument -> Element msg
|
||||||
|
strengthMakerBar argument =
|
||||||
|
barPadding
|
||||||
[ barMaker getConfidenceTooltip argument.argumentCertainty ]
|
[ barMaker getConfidenceTooltip argument.argumentCertainty ]
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
getConfidenceTooltip : Int -> String
|
getConfidenceTooltip : Int -> String
|
||||||
|
@ -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
|
|
||||||
|
|
|
@ -65,7 +65,7 @@ mobileLargeHomePageImage =
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
mobileLargedesktopHomePage =
|
mobileLargeHomePage =
|
||||||
homePage mobileLargeHomePageImage
|
homePage mobileLargeHomePageImage
|
||||||
|
|
||||||
|
|
||||||
|
@ -76,5 +76,5 @@ mobileSmallHomePageImage =
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
mobileSmallesktopHomePage =
|
mobileSmallHomePage =
|
||||||
homePage mobileSmallHomePageImage
|
homePage mobileSmallHomePageImage
|
||||||
|
|
|
@ -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")
|
||||||
|
|
|
@ -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 ]
|
|
||||||
)
|
|
||||||
|
|
|
@ -30,5 +30,5 @@ export const onReady = ({ app, env }) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
app.ports.gotArgHeight.send(heights);
|
app.ports.gotArgHeight.send(heights);
|
||||||
});
|
});z
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue