Skip to content

Instantly share code, notes, and snippets.

@ronanyeah
Forked from aaronwhite/ElmMJMLSample.elm
Created December 6, 2019 03:42
Show Gist options
  • Save ronanyeah/30cce9f53445ee0f624a45e0ff1eba7a to your computer and use it in GitHub Desktop.
Save ronanyeah/30cce9f53445ee0f624a45e0ff1eba7a 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