mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-16 04:25:11 -05:00
feat: still need to fix the viewport in child pages issue
This commit is contained in:
parent
76fa1ff381
commit
83a836438b
6 changed files with 156 additions and 107 deletions
|
@ -53,8 +53,6 @@ init () =
|
||||||
(Effect.sendCmd resetViewport)
|
(Effect.sendCmd resetViewport)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- UPDATE
|
-- UPDATE
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,6 @@ init () =
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- UPDATE
|
-- UPDATE
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,6 @@ init () =
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- UPDATE
|
-- UPDATE
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -170,8 +170,8 @@ contentList device argument =
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
[ column [ width fill, spacing 8 ]
|
[ column [ width fill, spacing 8 ]
|
||||||
[ summaryMakerDesktop argument
|
[ summaryMakerDesktop device argument
|
||||||
, strengthBar argument
|
, strengthBar device argument
|
||||||
]
|
]
|
||||||
, case ( device.class, device.orientation ) of
|
, case ( device.class, device.orientation ) of
|
||||||
( Phone, Portrait ) ->
|
( Phone, Portrait ) ->
|
||||||
|
@ -315,20 +315,6 @@ reductioMakerDesktop argument =
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
reductioMakerMobile : Argument -> Element msg
|
|
||||||
reductioMakerMobile argument =
|
|
||||||
case argument.propositionReductio of
|
|
||||||
"" ->
|
|
||||||
none
|
|
||||||
|
|
||||||
reductio ->
|
|
||||||
row
|
|
||||||
[]
|
|
||||||
[ reductioMaker
|
|
||||||
, reductioMakerTitle reductio
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
reductioMaker : Element msg
|
reductioMaker : Element msg
|
||||||
reductioMaker =
|
reductioMaker =
|
||||||
column
|
column
|
||||||
|
@ -363,17 +349,19 @@ reductioMakerTitle reductio =
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
summaryMakerDesktop : Argument -> Element msg
|
summaryMakerDesktop : Device -> Argument -> Element msg
|
||||||
summaryMakerDesktop argument =
|
summaryMakerDesktop device argument =
|
||||||
row []
|
(case ( device.class, device.orientation ) of
|
||||||
[ summaryMaker
|
( Phone, Portrait ) ->
|
||||||
, summaryMakerTitle argument
|
column
|
||||||
]
|
|
||||||
|
|
||||||
|
( Tablet, Portrait ) ->
|
||||||
|
column
|
||||||
|
|
||||||
summaryMakerMobile : Argument -> Element msg
|
_ ->
|
||||||
summaryMakerMobile argument =
|
row
|
||||||
column []
|
)
|
||||||
|
[]
|
||||||
[ summaryMaker
|
[ summaryMaker
|
||||||
, summaryMakerTitle argument
|
, summaryMakerTitle argument
|
||||||
]
|
]
|
||||||
|
@ -426,9 +414,19 @@ summaryMakerTitle argument =
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
strengthBar : Argument -> Element msg
|
strengthBar : Device -> Argument -> Element msg
|
||||||
strengthBar argument =
|
strengthBar device argument =
|
||||||
row [ E.width fill ]
|
(case ( device.class, device.orientation ) of
|
||||||
|
( Phone, Portrait ) ->
|
||||||
|
column
|
||||||
|
|
||||||
|
( Tablet, Portrait ) ->
|
||||||
|
column
|
||||||
|
|
||||||
|
_ ->
|
||||||
|
row
|
||||||
|
)
|
||||||
|
[ E.width fill ]
|
||||||
[ strengthMaker
|
[ strengthMaker
|
||||||
, strengthMakerBar argument
|
, strengthMakerBar argument
|
||||||
]
|
]
|
||||||
|
|
|
@ -135,28 +135,48 @@ cucksList device =
|
||||||
[ [ headerMaker (R.CuckList cuckListHeader) ]
|
[ [ headerMaker (R.CuckList cuckListHeader) ]
|
||||||
, List.map
|
, List.map
|
||||||
(\cuck ->
|
(\cuck ->
|
||||||
cardMaker device (C.Cuck cuck) (contentList cuck)
|
cardMaker device (C.Cuck cuck) (contentList device cuck)
|
||||||
)
|
)
|
||||||
cuckList
|
cuckList
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
contentList : Cuck -> List (Element msg)
|
contentList : Device -> Cuck -> List (Element msg)
|
||||||
contentList cuck =
|
contentList device cuck =
|
||||||
[ socialMaker cuck
|
[ column
|
||||||
, dodgeTitle cuck
|
[ width fill
|
||||||
, dodgeMaker cuck
|
, spacing 3
|
||||||
|
, paddingEach
|
||||||
|
{ top =
|
||||||
|
case ( device.class, device.orientation ) of
|
||||||
|
( Phone, Portrait ) ->
|
||||||
|
3
|
||||||
|
|
||||||
|
( Tablet, Portrait ) ->
|
||||||
|
3
|
||||||
|
|
||||||
|
_ ->
|
||||||
|
0
|
||||||
|
, right = 0
|
||||||
|
, bottom = 0
|
||||||
|
, left = 0
|
||||||
|
}
|
||||||
|
]
|
||||||
|
[ socialMaker cuck
|
||||||
|
, dodgeTitle cuck
|
||||||
|
, dodgeMaker device cuck
|
||||||
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
dodgeMaker : Cuck -> Element msg
|
dodgeMaker : Device -> Cuck -> Element msg
|
||||||
dodgeMaker cuck =
|
dodgeMaker device cuck =
|
||||||
column
|
column
|
||||||
[ spacing 10
|
[ spacing 10
|
||||||
, width fill
|
, width fill
|
||||||
]
|
]
|
||||||
<|
|
<|
|
||||||
List.map2 (\x y -> makeDodge cuck x y)
|
List.map2 (\x y -> makeDodge device cuck x y)
|
||||||
cuck.cuckDodges
|
cuck.cuckDodges
|
||||||
(List.range 1 (List.length cuck.cuckDodges))
|
(List.range 1 (List.length cuck.cuckDodges))
|
||||||
|
|
||||||
|
@ -198,8 +218,8 @@ dodgeTitle cuck =
|
||||||
[ text "Dodges: " ]
|
[ text "Dodges: " ]
|
||||||
|
|
||||||
|
|
||||||
makeDodge : Cuck -> Dodge -> Int -> Element msg
|
makeDodge : Device -> Cuck -> Dodge -> Int -> Element msg
|
||||||
makeDodge cuck dodge index =
|
makeDodge device cuck dodge index =
|
||||||
column
|
column
|
||||||
[ F.color colourTheme.textLightGrey
|
[ F.color colourTheme.textLightGrey
|
||||||
, paragraphSpacing
|
, paragraphSpacing
|
||||||
|
@ -214,7 +234,7 @@ makeDodge cuck dodge index =
|
||||||
{ top = 0
|
{ top = 0
|
||||||
, right = 0
|
, right = 0
|
||||||
, bottom = 0
|
, bottom = 0
|
||||||
, left = 35
|
, left = 10
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
[ column
|
[ column
|
||||||
|
@ -235,10 +255,10 @@ makeDodge cuck dodge index =
|
||||||
[ spacing 3
|
[ spacing 3
|
||||||
, width fill
|
, width fill
|
||||||
]
|
]
|
||||||
[ propositionMaker dodge
|
[ propositionMaker device dodge
|
||||||
, reductioMaker dodge
|
, reductioMaker device dodge
|
||||||
, attitudeMaker dodge
|
, attitudeMaker device dodge
|
||||||
, reasonMaker dodge
|
, reasonMaker device dodge
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
@ -246,7 +266,7 @@ makeDodge cuck dodge index =
|
||||||
|
|
||||||
|
|
||||||
dodgeWidth =
|
dodgeWidth =
|
||||||
width <| px 93
|
width <| px 85
|
||||||
|
|
||||||
|
|
||||||
formatProposition : String -> String
|
formatProposition : String -> String
|
||||||
|
@ -357,9 +377,18 @@ receipts cuck dodge =
|
||||||
dodge.dodgeReceipts
|
dodge.dodgeReceipts
|
||||||
|
|
||||||
|
|
||||||
propositionMaker : Dodge -> Element msg
|
propositionMaker : Device -> Dodge -> Element msg
|
||||||
propositionMaker dodge =
|
propositionMaker device dodge =
|
||||||
row
|
(case ( device.class, device.orientation ) of
|
||||||
|
( Phone, Portrait ) ->
|
||||||
|
column
|
||||||
|
|
||||||
|
( Tablet, Portrait ) ->
|
||||||
|
column
|
||||||
|
|
||||||
|
_ ->
|
||||||
|
row
|
||||||
|
)
|
||||||
[ F.color colourTheme.textLightGrey
|
[ F.color colourTheme.textLightGrey
|
||||||
, paragraphSpacing
|
, paragraphSpacing
|
||||||
, paragraphFontSize
|
, paragraphFontSize
|
||||||
|
@ -380,16 +409,24 @@ propositionMaker dodge =
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
attitudeMaker : Dodge -> Element msg
|
attitudeMaker : Device -> Dodge -> Element msg
|
||||||
attitudeMaker dodge =
|
attitudeMaker device dodge =
|
||||||
row
|
(case ( device.class, device.orientation ) of
|
||||||
([ F.color colourTheme.textLightGrey
|
( Phone, Portrait ) ->
|
||||||
, paragraphSpacing
|
column
|
||||||
, paragraphFontSize
|
|
||||||
, F.bold
|
( Tablet, Portrait ) ->
|
||||||
]
|
column
|
||||||
++ [ width fill ]
|
|
||||||
)
|
_ ->
|
||||||
|
row
|
||||||
|
)
|
||||||
|
[ F.color colourTheme.textLightGrey
|
||||||
|
, paragraphSpacing
|
||||||
|
, paragraphFontSize
|
||||||
|
, F.bold
|
||||||
|
, width fill
|
||||||
|
]
|
||||||
[ paragraph
|
[ paragraph
|
||||||
[ alignTop
|
[ alignTop
|
||||||
, dodgeWidth
|
, dodgeWidth
|
||||||
|
@ -424,8 +461,8 @@ attitudeMaker dodge =
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
reductioMaker : Dodge -> Element msg
|
reductioMaker : Device -> Dodge -> Element msg
|
||||||
reductioMaker dodge =
|
reductioMaker device dodge =
|
||||||
case dodge.dodgeFallacy of
|
case dodge.dodgeFallacy of
|
||||||
Nothing ->
|
Nothing ->
|
||||||
none
|
none
|
||||||
|
@ -437,49 +474,57 @@ reductioMaker dodge =
|
||||||
none
|
none
|
||||||
|
|
||||||
else
|
else
|
||||||
displayFallacy str
|
displayFallacy device str
|
||||||
|
|
||||||
AppealToNature ->
|
AppealToNature ->
|
||||||
displayFallacy "Appeal to Nature"
|
displayFallacy device "Appeal to Nature"
|
||||||
|
|
||||||
AppealToTradition ->
|
AppealToTradition ->
|
||||||
displayFallacy "Appeal to Tradition"
|
displayFallacy device "Appeal to Tradition"
|
||||||
|
|
||||||
AppealToIgnorance ->
|
AppealToIgnorance ->
|
||||||
displayFallacy "Appeal to Ignorance"
|
displayFallacy device "Appeal to Ignorance"
|
||||||
|
|
||||||
AppealFromIncredulity ->
|
AppealFromIncredulity ->
|
||||||
displayFallacy "Appeal from Incredulity"
|
displayFallacy device "Appeal from Incredulity"
|
||||||
|
|
||||||
RedHerring ->
|
RedHerring ->
|
||||||
displayFallacy "Red Herring"
|
displayFallacy device "Red Herring"
|
||||||
|
|
||||||
BeggingTheQuestion ->
|
BeggingTheQuestion ->
|
||||||
displayFallacy "Begging the Question"
|
displayFallacy device "Begging the Question"
|
||||||
|
|
||||||
Strawman ->
|
Strawman ->
|
||||||
displayFallacy "Strawman"
|
displayFallacy device "Strawman"
|
||||||
|
|
||||||
Equivocation ->
|
Equivocation ->
|
||||||
displayFallacy "Equivocation"
|
displayFallacy device "Equivocation"
|
||||||
|
|
||||||
GeneticFallacy ->
|
GeneticFallacy ->
|
||||||
displayFallacy "Genetic Fallacy"
|
displayFallacy device "Genetic Fallacy"
|
||||||
|
|
||||||
MotteAndBailey ->
|
MotteAndBailey ->
|
||||||
displayFallacy "Motte and Bailey"
|
displayFallacy device "Motte and Bailey"
|
||||||
|
|
||||||
|
|
||||||
reasonMaker : Dodge -> Element msg
|
reasonMaker : Device -> Dodge -> Element msg
|
||||||
reasonMaker dodge =
|
reasonMaker device dodge =
|
||||||
row
|
(case ( device.class, device.orientation ) of
|
||||||
([ F.color colourTheme.textLightGrey
|
( Phone, Portrait ) ->
|
||||||
, paragraphSpacing
|
column
|
||||||
, paragraphFontSize
|
|
||||||
, F.bold
|
( Tablet, Portrait ) ->
|
||||||
]
|
column
|
||||||
++ [ width fill ]
|
|
||||||
)
|
_ ->
|
||||||
|
row
|
||||||
|
)
|
||||||
|
[ F.color colourTheme.textLightGrey
|
||||||
|
, paragraphSpacing
|
||||||
|
, paragraphFontSize
|
||||||
|
, F.bold
|
||||||
|
, width fill
|
||||||
|
]
|
||||||
[ paragraph
|
[ paragraph
|
||||||
[ alignTop
|
[ alignTop
|
||||||
, dodgeWidth
|
, dodgeWidth
|
||||||
|
@ -501,9 +546,18 @@ reasonMaker dodge =
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
displayFallacy : String -> Element msg
|
displayFallacy : Device -> String -> Element msg
|
||||||
displayFallacy fallacyText =
|
displayFallacy device fallacyText =
|
||||||
row
|
(case ( device.class, device.orientation ) of
|
||||||
|
( Phone, Portrait ) ->
|
||||||
|
column
|
||||||
|
|
||||||
|
( Tablet, Portrait ) ->
|
||||||
|
column
|
||||||
|
|
||||||
|
_ ->
|
||||||
|
row
|
||||||
|
)
|
||||||
[ F.color colourTheme.textLightGrey
|
[ F.color colourTheme.textLightGrey
|
||||||
, paragraphSpacing
|
, paragraphSpacing
|
||||||
, paragraphFontSize
|
, paragraphFontSize
|
||||||
|
|
|
@ -12,6 +12,7 @@ import Config.Helpers.Format
|
||||||
, headerFontSizeSmall
|
, headerFontSizeSmall
|
||||||
, paragraphFontSize
|
, paragraphFontSize
|
||||||
, paragraphSpacing
|
, paragraphSpacing
|
||||||
|
, smallTextFontSize
|
||||||
)
|
)
|
||||||
import Config.Helpers.Headers.Helpers exposing (..)
|
import Config.Helpers.Headers.Helpers exposing (..)
|
||||||
import Config.Helpers.Headers.Records exposing (nutriDexHeader)
|
import Config.Helpers.Headers.Records exposing (nutriDexHeader)
|
||||||
|
@ -54,7 +55,6 @@ import Page exposing (Page)
|
||||||
import Route exposing (Route)
|
import Route exposing (Route)
|
||||||
import Shared exposing (..)
|
import Shared exposing (..)
|
||||||
import View exposing (View)
|
import View exposing (View)
|
||||||
import Config.Helpers.Format exposing (smallTextFontSize)
|
|
||||||
|
|
||||||
|
|
||||||
page : Shared.Model -> Route () -> Page Model Msg
|
page : Shared.Model -> Route () -> Page Model Msg
|
||||||
|
@ -301,26 +301,27 @@ featureList nutridex device =
|
||||||
|
|
||||||
nutriDexTitleMaker : String -> Element msg
|
nutriDexTitleMaker : String -> Element msg
|
||||||
nutriDexTitleMaker title =
|
nutriDexTitleMaker title =
|
||||||
column [ centerX, width fill ]
|
column
|
||||||
|
[ centerX
|
||||||
|
, width fill
|
||||||
|
]
|
||||||
[ divider
|
[ divider
|
||||||
, paragraph
|
, paragraph
|
||||||
([ F.color colourTheme.textLightGrey
|
[ F.color colourTheme.textLightGrey
|
||||||
, paragraphSpacing
|
, paragraphSpacing
|
||||||
, paragraphFontSize
|
, F.bold
|
||||||
, F.bold
|
, centerX
|
||||||
]
|
, F.center
|
||||||
++ [ centerX
|
, headerFontSizeBig
|
||||||
, headerFontSizeBig
|
, F.color colourTheme.textLightOrange
|
||||||
, F.color colourTheme.textLightOrange
|
, paddingEach
|
||||||
, paddingEach
|
{ top = 10
|
||||||
{ top = 10
|
, right = 0
|
||||||
, right = 0
|
, bottom = 10
|
||||||
, bottom = 10
|
, left = 0
|
||||||
, left = 0
|
}
|
||||||
}
|
]
|
||||||
]
|
[ text (String.toUpper title) ]
|
||||||
)
|
|
||||||
[ text title ]
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue