Skip to content

Instantly share code, notes, and snippets.

@aaronwhite
Created October 17, 2019 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save aaronwhite/196b6e4226c85eae1d4b34d76e0f3e45 to your computer and use it in GitHub Desktop.
Save aaronwhite/196b6e4226c85eae1d4b34d76e0f3e45 to your computer and use it in GitHub Desktop.
module Email.Invitation.View exposing (view)
import Html exposing (..)
import Html.Attributes exposing (..)
import Mjml exposing (..)
import Email.UI.Base as Base
import Email.UI.Card as Card
import Email.UI.Style as Style
import Domain
import Render.HtmlToString exposing (htmlToString)
view : Domain.Email
view =
{
html = htmlToString body,
subject = subject
}
subject : String
subject = "You've been invited to App"
body : Html msg
body =
Base.base [
Card.card
|> Card.header [
mjText [] [
h1 [Style.cardHeaderTitle] [
text "You've been invited to App"
]
]
]
|> Card.body [
mjSection [] [
mjColumn [] [
mjText [] [
p [] [
text "You're invited!",
a [href "https://app.yourdomain.com"] [text "Login"],
text " with your Google account."
]
],
mjButton [href "https://app.yourdomain.com"] [
text "View App"
],
mjText [] [
p [] [
text "We hope you find our app super helpful"
],
p [] [
text "- Your friends at App"
]
]
]
]
]
|> Card.view
]
|> Base.view
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment