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