Update part5

This commit is contained in:
Richard Feldman
2018-08-13 06:08:36 -04:00
parent fd3ceff2d2
commit 91438546ba
19 changed files with 883 additions and 532 deletions

View File

@@ -1,21 +1,25 @@
module Loading exposing (error, icon)
module Loading exposing (error, icon, slowThreshold)
{-| A loading spinner icon.
-}
import Html exposing (Attribute, Html, div, li)
import Html.Attributes exposing (class, style)
import Asset
import Html exposing (Attribute, Html)
import Html.Attributes exposing (alt, height, src, width)
import Process
import Task exposing (Task)
icon : Html msg
icon =
li [ class "sk-three-bounce", style "float" "left", style "margin" "8px" ]
[ div [ class "sk-child sk-bounce1" ] []
, div [ class "sk-child sk-bounce2" ] []
, div [ class "sk-child sk-bounce3" ] []
]
Html.img [ Asset.src Asset.loading, width 64, height 64, alt "Loading..." ] []
error : String -> Html msg
error str =
Html.text ("Error loading " ++ str ++ ".")
slowThreshold : Task x ()
slowThreshold =
Process.sleep 500