Html & tables compared to MJML

생성일 비교 결과 만료 없음
220 삭제
221 행
63 추가
103 행
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Forms.Core.Models.FormsHtmlModel>
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage<Umbraco.Forms.Core.Models.FormsHtmlModel>


@{
@{
//This is an example email template where you can use Razor Views to send HTML emails
//This is an example email template where you can use Razor Views to send HTML emails


//You can use Umbraco.TypedContent & Umbraco.TypedMedia etc to use Images & content from your site
//You can use Umbraco.TypedContent & Umbraco.TypedMedia etc to use Images & content from your site
//directly in your email templates too
//directly in your email templates too


//Strongly Typed
//Strongly Typed
//@Model.GetValue("aliasFormField")
//@Model.GetValue("aliasFormField")
//@foreach (var color in Model.GetValues("checkboxField")){}
//@foreach (var color in Model.GetValues("checkboxField")){}


//Dynamics
//Dynamics
//@Model.DynamicFields.aliasFormField
//@Model.DynamicFields.aliasFormField
//@foreach(var color in Model.DynamicFields.checkboxField
//@foreach(var color in Model.DynamicFields.checkboxField


//Images need to be absolute - so fetching domain to prefix with images
//Images need to be absolute - so fetching domain to prefix with images
var siteDomain = Context.Request.Scheme + "://" + Context.Request.Host;
var siteDomain = Context.Request.Scheme + "://" + Context.Request.Host;
var assetUrl = siteDomain + "/App_plugins/UmbracoForms/Assets/Email-Example";
var assetUrl = siteDomain + "/App_plugins/UmbracoForms/Assets/Email-Example";


}
}
<!DOCTYPE html>
<mjml>
<html>
<head>
<mj-head>
<title></title>
<mj-preview>Umbraco Forms Email</mj-preview>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<mj-style inline="inline">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link href="https://fonts.googleapis.com/css?family=Lato:400,700,900" rel="stylesheet">
<style type="text/css">

/* CLIENT-SPECIFIC STYLES */
body, table, td, a { -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }
table, td { mso-table-lspace: 0pt; mso-table-rspace: 0pt; }
img { -ms-interpolation-mode: bicubic; }

/* RESET STYLES */
img { border: 0; height: auto; line-height: 100%; outline: none; text-decoration: none; }
table { border-collapse: collapse !important; }
body { height: 100% !important; margin: 0 !important; padding: 0 !important; width: 100% !important; }

/* iOS BLUE LINKS */
a[x-apple-data-detectors] {
color: inherit !important;
text-decoration: none !important;
font-size: inherit !important;
font-family: inherit !important;
font-weight: inherit !important;
line-height: inherit !important;
}

/* MOBILE STYLES */
@@media screen and (max-width:600px){
h1 {
font-size: 32px !important;
h1 { font-size: 32px !important; line-height: 32px !important; }
line-height: 32px !important;
}
}
</mj-style>
</mj-head>
<mj-body background-color="#f4f4f4">

/* ANDROID CENTER FIX */
div[style*="margin: 16px 0;"] { margin: 0 !important; }
</style>
</head>
<body style="background-color: #f4f4f4; margin: 0 !important; padding: 0 !important;">
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="margin-bottom: 40px;">
<!-- LOGO -->
<!-- LOGO -->
<tr>
<mj-section background-color="#413659">
<td bgcolor="#413659" align="center">
<mj-column>
<!--[if (gte mso 9)|(IE)]>
<table align="center" border="0" cellspacing="0" cellpadding="0" width="600">
<tr>
<td align="center" valign="top" width="600">
<![endif]-->
<table border="0" cellpadding="0" cellspacing="0" width="100%" style="max-width: 600px;">
<tr>
<td align="center" valign="top" style="padding: 40px 10px 40px 10px;">
<a href="http://umbraco.com" target="_blank">
<img alt="Logo" src="@assetUrl/umbraco-logo.png" width="40" height="40" style="display: block; width: 40px; max-width: 40px; min-width: 40px; font-family: 'Lato', Helvetica, Arial, sans-serif; color: #ffffff; font-size: 18px;" border="0">
<mj-image width="40px" src="@assetUrl/umbraco-logo.png" alt="Logo" />
</a>
</mj-column>
</td>
</mj-section>
</tr>
</table>
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</td>
</tr>

<!-- HERO -->
<!-- HERO -->
<tr>
<mj-section background-color="#ffffff">
<td bgcolor="#413659" align="center" style="padding: 0px 10px 0px 10px;">
<!--[if (gte mso 9)|(IE)]>
<table align="center" border="0" cellspacing="0" cellpadding="0" width="600">
<tr>
<td align="center" valign="top" width="600">
<![endif]-->