feat: started working on responsiveness

This commit is contained in:
Nick 2024-12-06 00:43:00 -06:00
parent e6b3e90698
commit 0339496f42
37 changed files with 790 additions and 249 deletions

View file

@ -12,6 +12,7 @@ module Shared exposing
-}
import Browser.Events as BR exposing (..)
import Effect exposing (Effect)
import Element as E exposing (..)
import Json.Decode exposing (..)
@ -89,8 +90,16 @@ type alias Msg =
update : Route () -> Msg -> Model -> ( Model, Effect Msg )
update route msg model =
case msg of
Shared.Msg.NoOp ->
( model
Shared.Msg.Resize width height ->
( { model
| device =
{ height = height
, width = width
}
|> E.classifyDevice
, height = height
, width = width
}
, Effect.none
)
@ -101,4 +110,4 @@ update route msg model =
subscriptions : Route () -> Model -> Sub Msg
subscriptions route model =
Sub.none
BR.onResize Shared.Msg.Resize