feat: started working on responsiveness

This commit is contained in:
Nick 2024-12-06 02:13:22 -06:00
parent 0339496f42
commit 31be063412
8 changed files with 408 additions and 262 deletions

View file

@ -3,6 +3,7 @@ module Pages.Arguments exposing (Model, Msg, page)
import Config.Colour as T exposing (..)
import Config.Format as O exposing (..)
import Config.Identity as I exposing (..)
import Config.Response exposing (..)
import Config.Viewport exposing (..)
import Debate.Arguments.Abortion exposing (..)
import Debate.Arguments.Agnosticism exposing (..)
@ -72,7 +73,6 @@ import Ports exposing (gotArgHeight)
import Route exposing (Route)
import Shared
import View exposing (View)
import Config.Response exposing (..)
page : Shared.Model -> Route () -> Page Model Msg
@ -81,7 +81,7 @@ page shared route =
{ init = init
, update = update
, subscriptions = subscriptions
, view = view
, view = view shared
}
|> Page.withLayout toLayout
@ -141,78 +141,124 @@ subscriptions model =
-- VIEW
view : Model -> View Msg
view model =
view : Shared.Model -> Model -> View Msg
view shared model =
{ title = debateName
, attributes = []
, element = debateContainer
, element = debateContainer shared.device
}
debateContainer : Element msg
debateContainer =
topLevelContainer debateList
debateContainer : Device -> Element msg
debateContainer device =
topLevelContainer (debateList device)
debateList : Element msg
debateList =
column [ centerX ]
[ column
pageListDesktop
<|
List.concat
[ List.map headerMaker
[ argumentHeader ]
, List.map argumentMaker
[ 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
]
debateList : Device -> Element msg
debateList device =
column
(case ( device.class, device.orientation ) of
( Phone, Portrait ) ->
pageListDesktop
( Phone, Landscape ) ->
pageListDesktop
( Tablet, Portrait ) ->
pageListDesktop
( Tablet, Landscape ) ->
pageListDesktop
( Desktop, Portrait ) ->
pageListDesktop
( Desktop, Landscape ) ->
pageListDesktop
( BigDesktop, Portrait ) ->
pageListDesktop
( BigDesktop, Landscape ) ->
pageListDesktop
)
<|
List.concat
[ List.map headerMaker
[ argumentHeader ]
, (case ( device.class, device.orientation ) of
( Phone, Portrait ) ->
List.map argumentMakerMobile
( Phone, Landscape ) ->
List.map argumentMakerMobile
( Tablet, Portrait ) ->
List.map argumentMakerMobile
( Tablet, Landscape ) ->
List.map argumentMakerMobile
( Desktop, Portrait ) ->
List.map argumentMaker
( Desktop, Landscape ) ->
List.map argumentMaker
( BigDesktop, Portrait ) ->
List.map argumentMaker
( BigDesktop, Landscape ) ->
List.map argumentMaker
)
[ 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
]
]
]

View file

@ -3,6 +3,7 @@ module Pages.Gibberish exposing (Model, Msg, page)
import Config.Colour as T exposing (..)
import Config.Format as O exposing (..)
import Config.Identity as I exposing (..)
import Config.Response exposing (..)
import Config.Viewport exposing (..)
import Debate.Gibberish.Domains.Epistemology exposing (epistemologyGibberish)
import Debate.Gibberish.Domains.Metaphysics exposing (metaphysicsGibberish)
@ -29,7 +30,7 @@ import Ports exposing (gotArgHeight)
import Route exposing (Route)
import Shared
import View exposing (View)
import Config.Response exposing (..)
page : Shared.Model -> Route () -> Page Model Msg
page shared route =
@ -37,7 +38,7 @@ page shared route =
{ init = init
, update = update
, subscriptions = subscriptions
, view = view
, view = view shared
}
|> Page.withLayout toLayout
@ -97,36 +98,82 @@ subscriptions model =
-- VIEW
view : Model -> View Msg
view model =
view : Shared.Model -> Model -> View Msg
view shared model =
{ title = gibberishName
, attributes = []
, element = gibberishContainer
, element = gibberishContainer shared.device
}
gibberishContainer : Element msg
gibberishContainer =
topLevelContainer gibberishList
gibberishContainer : Device -> Element msg
gibberishContainer device =
topLevelContainer (gibberishList device)
gibberishList : Element msg
gibberishList =
column [ centerX ]
[ column
pageListDesktop
<|
List.concat
[ List.map headerMaker
[ gibberishHeader ]
, List.map gibberishMaker
[ epistemologyGibberish
, theologyGibberish
, metaphysicsGibberish
, normativityGibberish
, ontologyGibberish
, philOfMindGibberish
, philOfLanguageGibberish
]
gibberishList : Device -> Element msg
gibberishList device =
column
(case ( device.class, device.orientation ) of
( Phone, Portrait ) ->
pageListDesktop
( Phone, Landscape ) ->
pageListDesktop
( Tablet, Portrait ) ->
pageListDesktop
( Tablet, Landscape ) ->
pageListDesktop
( Desktop, Portrait ) ->
pageListDesktop
( Desktop, Landscape ) ->
pageListDesktop
( BigDesktop, Portrait ) ->
pageListDesktop
( BigDesktop, Landscape ) ->
pageListDesktop
)
<|
List.concat
[ List.map headerMaker
[ gibberishHeader ]
, (case ( device.class, device.orientation ) of
( Phone, Portrait ) ->
List.map gibberishMakerMobile
( Phone, Landscape ) ->
List.map gibberishMakerMobile
( Tablet, Portrait ) ->
List.map gibberishMakerMobile
( Tablet, Landscape ) ->
List.map gibberishMakerMobile
( Desktop, Portrait ) ->
List.map gibberishMaker
( Desktop, Landscape ) ->
List.map gibberishMaker
( BigDesktop, Portrait ) ->
List.map gibberishMaker
( BigDesktop, Landscape ) ->
List.map gibberishMaker
)
[ epistemologyGibberish
, theologyGibberish
, metaphysicsGibberish
, normativityGibberish
, ontologyGibberish
, philOfMindGibberish
, philOfLanguageGibberish
]
]
]

View file

@ -4,19 +4,21 @@ import Blog.Helpers exposing (..)
import Config.Colour as T exposing (..)
import Config.Format as O exposing (..)
import Config.Identity as I exposing (..)
import Config.Response exposing (..)
import Config.Viewport exposing (..)
import Effect exposing (Effect)
import Element as E exposing (..)
import Element.Background as B exposing (..)
import Element.Border as D exposing (..)
import Element.Font as F
import Home.Helpers exposing (..)
import Html.Attributes as H exposing (style)
import Layouts
import Page exposing (Page)
import Route exposing (Route)
import Shared exposing (..)
import View exposing (View)
import Config.Response exposing (..)
page : Shared.Model -> Route () -> Page Model Msg
page shared route =
@ -24,7 +26,7 @@ page shared route =
{ init = init
, update = update
, subscriptions = subscriptions
, view = view
, view = view shared
}
|> Page.withLayout toLayout
@ -81,46 +83,44 @@ subscriptions model =
-- VIEW
view : Model -> View Msg
view model =
view : Shared.Model -> Model -> View Msg
view shared model =
{ title = ""
, attributes = []
, element = homeContainer
, element = homeContainer shared.device
}
homeContainer : Element msg
homeContainer =
topLevelContainer homeList
homeContainer : Device -> Element msg
homeContainer device =
topLevelContainer (homeList device)
homeList : Element msg
homeList =
homeList : Device -> Element msg
homeList device =
column pageListDesktop
[ column
[ centerX
, centerY
, spacing 20
]
[ row [ centerX ]
[ E.image [ E.width <| px 785 ]
{ src = "assets/logo_extended.png"
, description = ""
}
]
, column
[ paddingEach
{ top = 15
, bottom = 15
, left = 20
, right = 20
}
, B.color colourTheme.backgroundDarkGrey
, rounded 10
, E.width fill
, spacing 8
]
[ paragraph (paragraphFormat ++ [ centerX ]) [ text "upRootNutrition is an open source project, created by Nick Hiebert, designed to elevate the quality of nutrition science communication in online discourse. By applying more rigorous systems of reasoning, such as formal logic, upRootNutrition aims to cut through the misinformation and sophistry that are endemic on social media." ]
]
]
]
(case ( device.class, device.orientation ) of
( Phone, Portrait ) ->
[mobileSmallesktopHomePage]
( Phone, Landscape ) ->
[mobileSmallesktopHomePage]
( Tablet, Portrait ) ->
[mobileLargedesktopHomePage]
( Tablet, Landscape ) ->
[mobileLargedesktopHomePage]
( Desktop, Portrait ) ->
[ desktopHomePage ]
( Desktop, Landscape ) ->
[ desktopHomePage ]
( BigDesktop, Portrait ) ->
[ desktopHomePage ]
( BigDesktop, Landscape ) ->
[ desktopHomePage ]
)