website/frontend/src/Pages/Arguments.elm

131 lines
3.1 KiB
Elm
Raw Normal View History

2024-11-16 18:34:05 -06:00
module Pages.Arguments exposing (Model, Msg, page)
2024-11-12 19:23:16 -06:00
import Config.Colour as T exposing (..)
import Config.Format as O exposing (..)
import Config.Identity as I exposing (..)
2024-11-16 18:34:05 -06:00
import Debate.Arguments.Ancestry.AntagonisticPleiotropy exposing (..)
2024-11-16 22:47:26 -06:00
import Debate.Arguments.Ancestry.HealthSeeker exposing (..)
import Debate.Arguments.Ancestry.ImmortalityReductio exposing (..)
2024-11-17 01:28:10 -06:00
import Debate.Arguments.Ancestry.PolyphenolReductio exposing (argumentPolyphenolReductio)
2024-11-15 23:28:32 -06:00
import Debate.Arguments.Ethics.EthicalSlurs exposing (..)
import Debate.Helpers exposing (..)
2024-11-12 19:23:16 -06:00
import Effect exposing (Effect)
import Element exposing (..)
import Element.Border as D exposing (..)
import Element.Font as F
import Html
import Html.Attributes as H exposing (style, title, wrap)
import Layouts
import Page exposing (Page)
import Route exposing (Route)
import Shared
import View exposing (View)
2024-11-17 01:28:10 -06:00
import Debate.Arguments.Ethics.Abortion exposing (argumentAbortion)
import Debate.Arguments.Ethics.EfilismPatrolSquad exposing (argumentEfilismPatrolSquad)
import Debate.Arguments.Nutrition.Malondialdehyde exposing (argumentMalondialdehyde)
import Debate.Arguments.Nutrition.SaturatedFatLDL exposing (argumentSaturatedFatLDL)
import Debate.Arguments.Philosophy.Agnosticism exposing (argumentAgnosticism)
2024-11-12 19:23:16 -06:00
page : Shared.Model -> Route () -> Page Model Msg
page shared route =
Page.new
{ init = init
, update = update
, subscriptions = subscriptions
, view = view
}
|> Page.withLayout toLayout
toLayout : Model -> Layouts.Layout Msg
toLayout model =
Layouts.Navbar {}
-- INIT
type alias Model =
{}
init : () -> ( Model, Effect Msg )
init () =
( {}
, Effect.none
)
-- UPDATE
type Msg
= NoOp
update : Msg -> Model -> ( Model, Effect Msg )
update msg model =
case msg of
NoOp ->
( model
, Effect.none
)
-- SUBSCRIPTIONS
subscriptions : Model -> Sub Msg
subscriptions model =
Sub.none
-- VIEW
view : Model -> View Msg
view model =
{ title = debateName
, attributes = []
, element = debateContainer
}
debateContainer : Element msg
debateContainer =
topLevelContainer debateList
debateList : Element msg
debateList =
column
pageList
2024-11-15 23:28:32 -06:00
<|
List.map
(\category ->
column [ spacing 20 ]
[ el (nonHighlightedTitleFormat ++ [ centerX ]) (text category.categoryName)
, column [] (List.map argumentMaker category.arguments)
]
)
[ { categoryName = "Ethics"
, arguments =
2024-11-16 16:35:08 -06:00
[ argumentEthicalSlurs
2024-11-16 18:34:05 -06:00
, argumentAntagonisticPleiotropy
2024-11-16 22:50:09 -06:00
, argumentHealthSeeker
2024-11-17 01:28:10 -06:00
, argumentImmortalityReductio
2024-11-16 22:50:09 -06:00
, argumentPolyphenolReductio
2024-11-17 01:28:10 -06:00
, argumentAbortion
, argumentEfilismPatrolSquad
, argumentMalondialdehyde
, argumentSaturatedFatLDL
, argumentAgnosticism
2024-11-12 19:23:16 -06:00
]
2024-11-15 23:28:32 -06:00
}
2024-11-12 19:23:16 -06:00
]