mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-16 12:25:12 -05:00
feat: updating arguments
This commit is contained in:
parent
f2647072fb
commit
600f2ed3f4
34 changed files with 384 additions and 397 deletions
114
frontend/src/Pages/Arguments.elm
Executable file
114
frontend/src/Pages/Arguments.elm
Executable file
|
@ -0,0 +1,114 @@
|
|||
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 Debate.Arguments.Ancestry.AntagonisticPleiotropy exposing (..)
|
||||
import Debate.Arguments.Ethics.EthicalSlurs exposing (..)
|
||||
import Debate.Helpers exposing (..)
|
||||
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)
|
||||
|
||||
|
||||
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
|
||||
<|
|
||||
List.map
|
||||
(\category ->
|
||||
column [ spacing 20 ]
|
||||
[ el (nonHighlightedTitleFormat ++ [ centerX ]) (text category.categoryName)
|
||||
, column [] (List.map argumentMaker category.arguments)
|
||||
]
|
||||
)
|
||||
[ { categoryName = "Ethics"
|
||||
, arguments =
|
||||
[ argumentEthicalSlurs
|
||||
, argumentAntagonisticPleiotropy
|
||||
]
|
||||
}
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue