コード例 #1
0
        public override string RenderMjml()
        {
            var height = GetAttribute("height");

            if (string.IsNullOrWhiteSpace(height))
            {
                height = "20px";
            }

            return($@"
                {TagHelpers.ConditionalTag($@"
                    <table role=""presentation"" border=""0"" cellpadding=""0"" cellspacing=""0"">
                        <tr>
                            <td height=""{CssUnitParser.Parse(height).Value}"" style=""vertical-align:top;height:{height};"">
                ")}

                <div {HtmlAttributes(new Dictionary<string, string> {
                        { "style", "div"}
                     })}
                >
                    &nbsp;
                </div>

                {TagHelpers.ConditionalTag($@"
                            </td>
                        </tr>
                    </table>
                ")}
            ");
        }
コード例 #2
0
        public override string RenderMjml()
        {
            var height = GetAttribute("height");

            if (string.IsNullOrWhiteSpace(height))
            {
                return(RenderContent());
            }

            return($@"
                {TagHelpers.ConditionalTag($@"
                    <table role=""presentation"" border=""0"" cellpadding=""0"" cellspacing=""0"">
                        <tr>
                            <td height=""{height}"" style=""vertical-align:top;height:{height};"">
                ")}

                {this.RenderContent()}

                {TagHelpers.ConditionalTag($@"
                            </td>
                        </tr>
                    </table>
                ")}
            ");
        }
コード例 #3
0
        public override string RenderMjml()
        {
            return($@"
                {TagHelpers.ConditionalTag($@"
                    <td {HtmlAttributes(new Dictionary<string, string> {
                        { "style", "td" },
                        { "class", CssHelper.SuffixCssClasses(GetAttribute("css-class"), "outlook") }
                    })}>
                ")}

                {RenderContent()}

                {TagHelpers.ConditionalTag($@"
                    </td>
                ")}
            ");
        }
コード例 #4
0
        public override string RenderMjml()
        {
            return($@"
                {(GetAttribute("hamburger").Equals("hamburger", System.StringComparison.InvariantCultureIgnoreCase) ? RenderHamburger() : string.Empty)}

                <div {HtmlAttributes(new Dictionary<string, string> {
                    { "class", "mj-inline-links" },
                    { "style", "div" }
                })}>
                    {TagHelpers.ConditionalTag($@"
                        <table role=""presentation"" border=""0"" cellpadding=""0"" cellspacing=""0"" align=""{GetAttribute("align")}"">
                            <tr>
                    ")}

                    {RenderChildren()}

                    {TagHelpers.ConditionalTag($@"
                            </tr>
                        </table>
                    ")}
                </div>
            ");
        }