Add part4

This commit is contained in:
Richard Feldman
2018-08-05 08:28:31 -04:00
parent a33c199c11
commit 2e0d00f947
53 changed files with 5522 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
module Assets exposing (error, src)
{-| Assets, such as images, videos, and audio. (We only have images for now.)
We should never expose asset URLs directly; this module should be in charge of
all of them. One source of truth!
-}
import Html exposing (Attribute, Html)
import Html.Attributes as Attr
type Image
= Image String
-- IMAGES
error : Image
error =
Image "/assets/images/error.jpg"
-- USING IMAGES
src : Image -> Attribute msg
src (Image url) =
Attr.src url