mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-16 12:25:12 -05:00
feat: push
This commit is contained in:
parent
4d59a6997c
commit
f79e2d9fca
5 changed files with 601 additions and 264 deletions
|
@ -60,6 +60,7 @@ import Element.Font as F
|
|||
import Html
|
||||
import Html.Attributes as H exposing (style, title, wrap)
|
||||
import Layouts
|
||||
import List.Extra as L exposing (..)
|
||||
import Page exposing (Page)
|
||||
import Route exposing (Route)
|
||||
import Shared
|
||||
|
@ -87,12 +88,16 @@ toLayout model =
|
|||
|
||||
|
||||
type alias Model =
|
||||
{}
|
||||
{ areArgsExpanded : List Bool }
|
||||
|
||||
|
||||
init : () -> ( Model, Effect Msg )
|
||||
init () =
|
||||
( {}
|
||||
( { areArgsExpanded =
|
||||
[ False
|
||||
, False
|
||||
]
|
||||
}
|
||||
, Effect.none
|
||||
)
|
||||
|
||||
|
@ -102,14 +107,19 @@ init () =
|
|||
|
||||
|
||||
type Msg
|
||||
= NoOp
|
||||
= ToggleExpandArg Int
|
||||
|
||||
|
||||
update : Msg -> Model -> ( Model, Effect Msg )
|
||||
update msg model =
|
||||
case msg of
|
||||
NoOp ->
|
||||
( model
|
||||
ToggleExpandArg index ->
|
||||
( case getAt index model.areArgsExpanded of
|
||||
Nothing ->
|
||||
model
|
||||
|
||||
Just isExpanded ->
|
||||
{ model | areArgsExpanded = setAt index (not isExpanded) model.areArgsExpanded }
|
||||
, Effect.none
|
||||
)
|
||||
|
||||
|
@ -131,68 +141,74 @@ view : Model -> View Msg
|
|||
view model =
|
||||
{ title = debateName
|
||||
, attributes = []
|
||||
, element = debateContainer
|
||||
, element = debateContainer model
|
||||
}
|
||||
|
||||
|
||||
debateContainer : Element msg
|
||||
debateContainer =
|
||||
topLevelContainer debateList
|
||||
debateContainer : Model -> Element Msg
|
||||
debateContainer model =
|
||||
topLevelContainer <| debateList model
|
||||
|
||||
|
||||
debateList : Element msg
|
||||
debateList =
|
||||
debateList : Model -> Element Msg
|
||||
debateList model =
|
||||
column
|
||||
pageList
|
||||
<|
|
||||
List.map argumentMaker
|
||||
List.map2 (argumentMaker ToggleExpandArg model.areArgsExpanded)
|
||||
[ argumentApoBCVD
|
||||
, argumentAnabolicKeto
|
||||
, argumentAntagonisticPleiotropy
|
||||
, argumentCarbsObesity
|
||||
, argumentDietaryCholesterol
|
||||
, argumentFructoseNAFLD
|
||||
, argumentHealthPromotingFoods
|
||||
, argumentHealthSeeker
|
||||
, argumentHealthyChocolate
|
||||
, argumentHealthyDairy
|
||||
, argumentHealthyFattyFish
|
||||
, argumentHealthyFibre
|
||||
, argumentHealthyFood
|
||||
, argumentHealthyPlantFoods
|
||||
, argumentHealthySeedOils
|
||||
, argumentHealthySoy
|
||||
, argumentMalondialdehyde
|
||||
, argumentOmega3Omega6Ratio
|
||||
, argumentPlantBasedCVDReversal
|
||||
, argumentPolyphenolReductio
|
||||
, argumentSodiumCVD
|
||||
, argumentTMAOCausality
|
||||
, argumentUnhealthyCoconutOil
|
||||
, argumentUnhealthyProcessedMeat
|
||||
, argumentUnhealthyRedMeat
|
||||
, argumentUnhealthySaturatedFat
|
||||
, argumentAbortion
|
||||
, argumentAgnosticism
|
||||
, argumentAgriculturalPredation
|
||||
, argumentAnimalRights
|
||||
, argumentAntiRewilding
|
||||
, argumentAntiVandalism
|
||||
, argumentColonizingNature
|
||||
, argumentCropDeaths
|
||||
, argumentDairyCowRape
|
||||
, argumentEfilismPatrolSquad
|
||||
, argumentEthicalSlurs
|
||||
, argumentFineTuning
|
||||
, argumentImmortalityReductio
|
||||
, argumentOddOrderPredators
|
||||
, argumentOstroveganism
|
||||
, argumentPollinationReductio
|
||||
, argumentScratcherPioneers
|
||||
, argumentTransPeople
|
||||
, argumentVeganSocietyReductio
|
||||
, argumentBoobyTrapPagers
|
||||
, argumentEpidemiologyCausality
|
||||
, argumentFlatEarthDebunk
|
||||
, argumentTruncatedMeta
|
||||
]
|
||||
<|
|
||||
List.range 0 <|
|
||||
List.length model.areArgsExpanded
|
||||
|
||||
|
||||
|
||||
-- , argumentAntagonisticPleiotropy
|
||||
-- , argumentCarbsObesity
|
||||
-- , argumentDietaryCholesterol
|
||||
-- , argumentFructoseNAFLD
|
||||
-- , argumentHealthPromotingFoods
|
||||
-- , argumentHealthSeeker
|
||||
-- , argumentHealthyChocolate
|
||||
-- , argumentHealthyDairy
|
||||
-- , argumentHealthyFattyFish
|
||||
-- , argumentHealthyFibre
|
||||
-- , argumentHealthyFood
|
||||
-- , argumentHealthyPlantFoods
|
||||
-- , argumentHealthySeedOils
|
||||
-- , argumentHealthySoy
|
||||
-- , argumentMalondialdehyde
|
||||
-- , argumentOmega3Omega6Ratio
|
||||
-- , argumentPlantBasedCVDReversal
|
||||
-- , argumentPolyphenolReductio
|
||||
-- , argumentSodiumCVD
|
||||
-- , argumentTMAOCausality
|
||||
-- , argumentUnhealthyCoconutOil
|
||||
-- , argumentUnhealthyProcessedMeat
|
||||
-- , argumentUnhealthyRedMeat
|
||||
-- , argumentUnhealthySaturatedFat
|
||||
-- , argumentAbortion
|
||||
-- , argumentAgnosticism
|
||||
-- , argumentAgriculturalPredation
|
||||
-- , argumentAnimalRights
|
||||
-- , argumentAntiRewilding
|
||||
-- , argumentAntiVandalism
|
||||
-- , argumentColonizingNature
|
||||
-- , argumentCropDeaths
|
||||
-- , argumentDairyCowRape
|
||||
-- , argumentEfilismPatrolSquad
|
||||
-- , argumentEthicalSlurs
|
||||
-- , argumentFineTuning
|
||||
-- , argumentImmortalityReductio
|
||||
-- , argumentOddOrderPredators
|
||||
-- , argumentOstroveganism
|
||||
-- , argumentPollinationReductio
|
||||
-- , argumentScratcherPioneers
|
||||
-- , argumentTransPeople
|
||||
-- , argumentVeganSocietyReductio
|
||||
-- , argumentBoobyTrapPagers
|
||||
-- , argumentEpidemiologyCausality
|
||||
-- , argumentFlatEarthDebunk
|
||||
-- , argumentTruncatedMeta
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue