mirror of
https://gitlab.com/upRootNutrition/website.git
synced 2025-06-16 04:25:11 -05:00
126 lines
2.7 KiB
Elm
126 lines
2.7 KiB
Elm
module Pages.Donate exposing (Model, Msg, page)
|
|
|
|
import Config.Colour as T exposing (..)
|
|
import Config.Format as O exposing (..)
|
|
import Config.Identity as I exposing (..)
|
|
import Donate.Helpers exposing (..)
|
|
import Donate.Methods.Cardano exposing (donateCardano)
|
|
import Donate.Methods.KoFi exposing (donateKoFi)
|
|
import Donate.Methods.LiberaPay exposing (donateLiberaPay)
|
|
import Donate.Methods.Merch exposing (donateMerch)
|
|
import Donate.Methods.Patreon exposing (donatePatreon)
|
|
import Donate.Methods.PayPal exposing (donatePayPal)
|
|
import Donate.Methods.YouTube exposing (donateYouTube)
|
|
import Donate.Types 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 Html.Attributes as H exposing (style)
|
|
import Layouts
|
|
import Page exposing (Page)
|
|
import Route exposing (Route)
|
|
import Shared exposing (..)
|
|
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 = donateName
|
|
, attributes = []
|
|
, element = donateContainer
|
|
}
|
|
|
|
|
|
donateContainer : Element msg
|
|
donateContainer =
|
|
topLevelContainer donateList
|
|
|
|
|
|
donateList : Element msg
|
|
donateList =
|
|
column pageList
|
|
[ paragraph
|
|
(paragraphFormat
|
|
++ [ F.size 18
|
|
, alignTop
|
|
, E.width <| px 800
|
|
, centerX, F.center
|
|
]
|
|
)
|
|
[ text "Any of the below services may be bundled for a $10 discount off each hour. For example, bundling two sessions of Debate Analysis would be $140 total, rather than $80/hr. All services are changed in CAD." ]
|
|
, column
|
|
pageList
|
|
<|
|
|
List.map donateMaker
|
|
[ donateLiberaPay
|
|
, donatePayPal
|
|
, donatePatreon
|
|
, donateCardano
|
|
, donateKoFi
|
|
, donateYouTube
|
|
, donateMerch
|
|
]
|
|
]
|