<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>payment</title>
    <style>
        .text-center{ text-align:center;}
        .qr{height:200px;}
    </style>
</head>
<body>
    <header data-diy="page">
        <h1>${(site.name)!}</h1>
    </header>
    <nav data-diy="category">
        <a href="${site.useStatic?then(site.sitePath,site.dynamicPath)}">Home</a>
<@cms.categoryList>
    <#list page.list as a>
        <a href="${a.url!}" target="_blank" data-diy-item="${a.id}">${a.name}</a>
    </#list>
</@cms.categoryList>
    </nav>
    <main data-diy="config" data-diy-id="wechat">
        <h3 class="text-center">${payment.description!}</h3>
        <p class="text-center"><label>Amount:</label>${payment.amount!}</p>
        <div class="text-center qr"></div>
        <p class="text-center">WeChat scan and pay</p>
    </main>
    <footer>
        Copyright &copy; ${.now?string('yyyy')}
    </footer>
    <script src="${site.dynamicPath!}resource/plugins/jquery/jquery.min.js"></script>
    <script src="${site.dynamicPath!}resource/plugins/jquery/jquery.qrcode.min.js"></script>
    <script>
    $('.qr').qrcode({width: 200,height: 200,text: "${code_url!}"});
    </script>
    <script>
    var templatePath='${.current_template_name?keep_after('/')}';
    </script>
    <script src="${site.dynamicPath}resource/js/cms.support.js"></script>
    <script>
        var ca = cmsAnalytics();
        var url='${site.dynamicPath}api/visit/record';
        if("string" ==typeof itemString){
            url=url+"?"+itemString;
        }
        ca.setDomain('${site.sitePath?keep_after('//')?keep_before('/')?keep_before(':')}');
        ca.setPath('/');
        ca.report(url);
    </script>
</body>
</html>