diff --git a/client/.parcelrc b/client/.parcelrc index ad8e9ae..6e4eb7e 100644 --- a/client/.parcelrc +++ b/client/.parcelrc @@ -9,6 +9,5 @@ "@parcel/compressor-gzip", "@parcel/compressor-brotli" ] - }, - "reporters": ["...", "parcel-reporter-static-files-copy"] + } } diff --git a/client/package.json b/client/package.json index 60e8634..226c13c 100644 --- a/client/package.json +++ b/client/package.json @@ -34,10 +34,8 @@ 128, 256, 512 - ] + ], + "genFavicons": true } - }, - "staticFiles": { - "staticPath": "src/static" } } diff --git a/client/src/elm/Loading.elm b/client/src/elm/Loading.elm deleted file mode 100644 index a4f5f12..0000000 --- a/client/src/elm/Loading.elm +++ /dev/null @@ -1,41 +0,0 @@ -module Loading exposing (..) - -import Html as H exposing (Html) -import Html.Attributes as HA -import Html.Events as HE - - -type alias Model = - Int - - -type Msg - = Dec - | Inc - | Done - - -init = - 0 - - -view mdl = - H.div [] - [ H.button [ HE.onClick Dec ] [ H.text "-" ] - , H.button [ HE.onClick Inc ] [ H.text "+" ] - , H.text <| String.fromInt mdl - , H.button [ HE.onClick Done ] [ H.text "done" ] - ] - - -update : Msg -> Model -> Model -update msg mdl = - case msg of - Dec -> - mdl - 1 - - Inc -> - mdl + 1 - - _ -> - mdl diff --git a/client/src/elm/Main.elm b/client/src/elm/Main.elm index 25e3b3d..a59e3f4 100644 --- a/client/src/elm/Main.elm +++ b/client/src/elm/Main.elm @@ -4,48 +4,44 @@ import Browser as B import Html as H exposing (Html) import Html.Attributes as HA import Html.Events as HE -import Loading +import List exposing (isEmpty) main : Program () Model Msg main = - B.sandbox { init = init, update = update, view = view } + B.element + { init = init + , update = update + , view = view + , subscriptions = subscriptions + } type Model - = LoadingMdl Loading.Model - | EmptyMdl + = EmptyMdl type Msg - = LoadingMsg Loading.Msg + = Msg -init : Model -init = - LoadingMdl Loading.init +init : flags -> (Model, Cmd msg) +init _ = + (EmptyMdl, Cmd.none) + + +update : Msg -> Model -> (Model, Cmd msg) +update msg mdl = + case ( msg, mdl ) of + ( _, EmptyMdl ) -> + (EmptyMdl, Cmd.none) view : Model -> Html Msg view mdl = case mdl of - LoadingMdl m -> - H.map LoadingMsg <| Loading.view m - EmptyMdl -> - H.div [] [] + H.div [] [ H.text "Test" ] - -update : Msg -> Model -> Model -update msg_ mdl_ = - case ( msg_, mdl_ ) of - ( LoadingMsg msg, LoadingMdl mdl ) -> - case msg of - Loading.Done -> - EmptyMdl - - _ -> - LoadingMdl <| Loading.update msg mdl - - ( _, EmptyMdl ) -> - EmptyMdl +subscriptions : Model -> Sub msg +subscriptions mdl = Sub.none diff --git a/client/src/static/favicon.ico b/client/src/static/favicon.ico deleted file mode 100644 index 33e7079..0000000 Binary files a/client/src/static/favicon.ico and /dev/null differ diff --git a/client/src/sw.js b/client/src/sw.js index 780239e..c8129bb 100644 --- a/client/src/sw.js +++ b/client/src/sw.js @@ -3,8 +3,8 @@ import { precacheAndRoute, matchPrecache } from 'workbox-precaching'; import { setCatchHandler } from 'workbox-routing'; -const manifestVersionPair = manifest.map ( x => { - return { url : x , revision : version }; -}); - -precacheAndRoute(manifestVersionPair); +// const manifestVersionPair = manifest.map ( x => { +// return { url : x , revision : version }; +// }); +// +// precacheAndRoute(manifestVersionPair);