<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>${metadata.alias!}</title>
    <style type="text/css">
        .right{float:right;}
    </style>
</head>
<body>
    <header>
        <h1>${(site.name)!}</h1>
    </header>
    <nav>
        <a href="${base}">Home</a>
<@_categoryList>
    <#list page.list as a>
        <a href="${a.url!}" target="_blank">${a.name}</a>
    </#list>
</@_categoryList>
    </nav>
    <main>
        <h3>Modify email</h3>
        <form action="${site.dynamicPath}user/saveEmail" method="post">
            <input type="hidden" name="_csrf" value="<@_csrfToken/>"/>
            <input type="hidden" name="returnUrl" value="${site.dynamicPath}email.html"/>
            <p><input type="email" name="email" placeholder="Email" title="Email" value="${user.email!}"/></p>
            <p>
                <input type="submit" class="button" value="Send verification email"/>
            </p>
            <#macro message code>${springMacroRequestContext.getMessage(code)}</#macro>
            <#if error??>
                <p class="message red"><@message error/></p>
            </#if>
            <#if message??>
                <p class="message"><@message "message."+message/></p>
            </#if>
        </form>
    </main>
    <footer>
        Copyright &copy; ${.now?string('yyyy')}
    </footer>
    <script src="${site.dynamicPath!}resource/js/jquery-1.12.4.min.js"></script>
    <script>
    var itemString="itemType=user&itemId=${user.id}";
    </script>
    <script src="${site.dynamicPath}resource/js/cms.analytics.js"></script>
    <script>
        var ca = cmsAnalytics();
        var url='${site.dynamicPath}api/visit/record';
        if("string" ==typeof itemString){
            url=url+"?"+itemString;
        }
        ca.report(url);
    </script>
</body>
</html>