mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-16 04:25:11 -05:00
feat: added and customized AY navbar
This commit is contained in:
parent
0569a063bb
commit
a7000d6302
53 changed files with 2517 additions and 872 deletions
120
frontend/src/Pages/Debate/Cucklist.elm
Executable file
120
frontend/src/Pages/Debate/Cucklist.elm
Executable file
|
@ -0,0 +1,120 @@
|
|||
module Pages.Debate.Cucklist exposing (Model, Msg, page)
|
||||
|
||||
import Config.Data.Identity exposing (pageNames)
|
||||
import Config.Format.Response
|
||||
exposing
|
||||
( pageList
|
||||
, topLevelContainer
|
||||
)
|
||||
import Config.Helpers.Viewport exposing (resetViewport)
|
||||
import Config.Pages.Debate.Cuckery.Helpers exposing (..)
|
||||
import Config.Pages.Headers.Helpers exposing (headerMaker)
|
||||
import Config.Pages.Headers.Pages.CuckList exposing (cuckListHeader)
|
||||
import Effect exposing (Effect)
|
||||
import Element as E exposing (..)
|
||||
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 shared
|
||||
}
|
||||
|> Page.withLayout toLayout
|
||||
|
||||
|
||||
toLayout : Model -> Layouts.Layout Msg
|
||||
toLayout model =
|
||||
Layouts.Navbar {}
|
||||
|
||||
|
||||
|
||||
-- INIT
|
||||
|
||||
|
||||
type alias Model =
|
||||
{}
|
||||
|
||||
|
||||
init : () -> ( Model, Effect Msg )
|
||||
init () =
|
||||
( {}
|
||||
, Effect.map
|
||||
(\_ -> NoOp)
|
||||
(Effect.sendCmd resetViewport)
|
||||
)
|
||||
|
||||
|
||||
|
||||
-- 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 : Shared.Model -> Model -> View Msg
|
||||
view shared model =
|
||||
{ title = "debate (" ++ pageNames.pageCucks ++ ")"
|
||||
, attributes = []
|
||||
, element = cucksContainer shared.device
|
||||
}
|
||||
|
||||
|
||||
cucksContainer : Device -> Element msg
|
||||
cucksContainer device =
|
||||
topLevelContainer (cucksList device)
|
||||
|
||||
|
||||
cucksList : Device -> Element msg
|
||||
cucksList device =
|
||||
column
|
||||
(case ( device.class, device.orientation ) of
|
||||
_ ->
|
||||
pageList
|
||||
)
|
||||
<|
|
||||
List.concat
|
||||
[ List.map headerMaker
|
||||
[ cuckListHeader ]
|
||||
, (case ( device.class, device.orientation ) of
|
||||
( Phone, Portrait ) ->
|
||||
List.map mobileCuckMaker
|
||||
|
||||
( Tablet, Portrait ) ->
|
||||
List.map mobileCuckMaker
|
||||
|
||||
_ ->
|
||||
List.map desktopCuckMaker
|
||||
)
|
||||
cuckList
|
||||
]
|
Loading…
Add table
Add a link
Reference in a new issue