MjmlApp.xml 9.27 KB
<?xml version="1.0" encoding="UTF-8"?>
<!--
This software is in the public domain under CC0 1.0 Universal plus a 
Grant of Patent License.

To the extent possible under law, the author(s) have dedicated all
copyright and related and neighboring rights to this software to the
public domain worldwide. This software is distributed without any
warranty.

You should have received a copy of the CC0 Public Domain Dedication
along with this software (see the LICENSE.md file). If not, see
<http://creativecommons.org/publicdomain/zero/1.0/>.
-->
<screen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/xml-screen-3.xsd"
        menu-image="fa fa-flash" menu-image-type="icon" standalone="true" screen-theme-type-enum-id="STT_MJML" >

    <widgets>
        <render-mode><text type="html" location="component://webroot/screen/includes/Header.html.ftl"/></render-mode>


        <render-mode><text type="html,vuet,qvt"><![CDATA[
            <style>
                body,
                html {
                    height: 100%;
                    margin: 0;
                }

                .cke_top {
                    background: #444 !important;
                }

                .cke_chrome {
                    border: none !important;
                }

                .cke_toolgroup {
                    border: none !important;
                    background: transparent !important;
                    box-shadow: none !important;
                }
            </style>
            <div id="gjs" style="height:0px; overflow:hidden">
                <mjml>
                    <mj-head>
                        <mj-font name="Barlow" href="https://fonts.googleapis.com/css?family=Barlow"></mj-font>

                        <mj-style>
                            .slogan {
                            background: #000;
                            }
                        </mj-style>
                    </mj-head>
                    <mj-body>
                        <!-- Company Header -->
                        <mj-section background-color="#f0f0f0">
                            <mj-column border="10px solid #F45E43">
                                <mj-text font-family="Barlow">A first line of text</mj-text>
                                <mj-spacer height="50px" />
                            </mj-column>
                        </mj-section>

                        <!-- Image Header -->
                        <mj-section background-url="http://1.bp.blogspot.com/-TPrfhxbYpDY/Uh3Refzk02I/AAAAAAAALw8/5sUJ0UUGYuw/s1600/New+York+in+The+1960's+-+70's+(2).jpg"
                                    background-size="cover" background-repeat="no-repeat">
                            <mj-column>
                                <mj-text css-class="slogan" align="center" color="#fff" font-size="40px" font-family="Helvetica Neue">Slogan here</mj-text>
                                <mj-button background-color="#F63A4D" href="#">
                                    Promotion
                                </mj-button>
                            </mj-column>
                        </mj-section>

                        <!-- Intro text -->
                        <mj-wrapper background-color="#ffe9f7" padding="10px">
                            <mj-section background-color="#eaeffa">
                                <mj-group background-color="#fffadd">
                                    <mj-column>
                                        <mj-text font-style="italic" font-size="20px" font-family="Helvetica Neue" color="#626262">My Awesome Text</mj-text>
                                        <mj-text color="#525252">
                                            Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin rutrum enim eget magna efficitur, eu semper augue semper.
                                            Aliquam erat volutpat. Cras id dui lectus. Vestibulum sed finibus lectus, sit amet suscipit nibh. Proin nec
                                            commodo purus. Sed eget nulla elit. Nulla aliquet mollis faucibus.
                                        </mj-text>
                                        <mj-button background-color="#F45E43" href="#">Learn more</mj-button>
                                    </mj-column>
                                </mj-group>
                            </mj-section>
                        </mj-wrapper>

                        <!-- Side image -->
                        <mj-section background-color="white">
                            <mj-column>
                                <mj-image width="200px" src="https://designspell.files.wordpress.com/2012/01/sciolino-paris-bw.jpg" />
                            </mj-column>
                            <mj-column>
                                <mj-text font-style="italic" font-size="20px" font-family="Helvetica Neue" color="#626262">
                                    Find amazing places ...
                                </mj-text>
                                <mj-text color="#525252">
                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin rutrum enim eget magna efficitur, eu semper augue semper.
                                    Aliquam erat volutpat. Cras id dui lectus. Vestibulum sed finibus lectus.</mj-text>
                            </mj-column>
                        </mj-section>
                        <mj-section>
                            <mj-column>
                                <mj-text font-style="italic" font-size="20px" font-family="Helvetica Neue" color="#626262" align="center">
                                    ... with real-life images
                                </mj-text>
                            </mj-column>
                        </mj-section>
                        <mj-raw>
                            <div class="container">
                                <img class="item" src="https://source.unsplash.com/random/200x141?random" alt="Example image">
                                <img class="item" src="https://source.unsplash.com/random/200x142?random" alt="Example image">
                                <img class="item" src="https://source.unsplash.com/random/200x143?random" alt="Example image">
                                <img class="item" src="https://source.unsplash.com/random/200x144?random" alt="Example image">
                                <img class="item" src="https://source.unsplash.com/random/200x145?random" alt="Example image">
                                <img class="item" src="https://source.unsplash.com/random/200x146?random" alt="Example image">
                            </div>
                        </mj-raw>
                        <!-- Icons -->
                        <mj-section background-color="#fbfbfb">
                            <mj-column>
                                <mj-image width="100px" src="http://191n.mj.am/img/191n/3s/x0l.png" />
                            </mj-column>
                            <mj-column>
                                <mj-image width="100px" src="http://191n.mj.am/img/191n/3s/x01.png" />
                            </mj-column>
                            <mj-column>
                                <mj-image width="100px" src="http://191n.mj.am/img/191n/3s/x0s.png" />
                            </mj-column>
                        </mj-section>

                        <!-- Footer -->
                        <mj-section background-color="#e7e7e7">
                            <mj-column>
                                <mj-button href="#">Hello There!</mj-button>
                                <mj-social font-size="15px" icon-size="30px" mode="horizontal">
                                    <mj-social-element name="facebook" href="https://mjml.io/">
                                        Facebook
                                    </mj-social-element>
                                    <mj-social-element name="google" href="https://mjml.io/">
                                        Google
                                    </mj-social-element>
                                    <mj-social-element name="twitter" href="https://mjml.io/">
                                        Twitter
                                    </mj-social-element>
                                </mj-social>
                            </mj-column>
                        </mj-section>
                        <!-- Footer -->
                    </mj-body>
                </mjml>
            </div>

            <script type="text/javascript">
                // Wait for the plugin to be injected by the dev server
                window.onload = () => {
                    window.editor = grapesjs.init({
                        height: '100%',
                        noticeOnUnload: false,
                        storageManager: false,
                        fromElement: true,
                        container: '#gjs',

                        plugins: ['grapesjs-mjml'],
                        pluginsOpts: {
                            'grapesjs-mjml': {}
                        }
                    });
                }
            </script>
            ]]></text></render-mode>

        <render-mode><text type="html" location="component://webroot/screen/includes/Footer.html.ftl"/></render-mode>

    </widgets>
</screen>