WMarkDown/HTML/WMarkDown.web.base.html

83 lines
3.1 KiB
HTML

<!DOCTYPE html>
<html lang="{language}">
<head>
<title data-i18n="{title_i18n}">{title_text}</title>
<meta http-equiv="content-type" content="text/html;charset={charset}" />
<meta charset="{charset}" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="xdoc:project" content="{project}" />
<meta name="xdoc:link" content="{web}" />
<meta name="xdoc:git" content="{git}" />
<meta name="xdoc:author" content="{authors}" />
<meta name="xdoc:since" content="{since}" />
<meta name="xdoc:version" content="{version}" />
<meta name="xdoc:access" content="public" /><!-- [[metas]] -->
<style data-type="text/css;charset=utf-8" data-language="CSS1.2" data-rel="stylesheet" charset="utf-8">
html,body{
height : 100%;
margin : 0em;
}
</style>
<script data-type="text/javascript;charset=utf-8" data-language="ECMAScript 2015" charset="utf-8">
"use strict";
/** @type {string} */
const domain = /^https?\:\/{2}[^\/]+\.(local|anprm)/i.test(window.location) ? "local" : "k3y.pw",
/** @type {HTMLScriptElement} */
script = document.querySelector("head").appendChild(document.createElement("script"));
[
["data-type", "text/javascript;charset=utf-8"],
["data-language", "ECMAScript 2015"],
["src", "https://anp." + domain + "/ecma/AnPScriptsLoader.ecma.js"],
["data-crossorigin", "anonymous"],
["charset", "utf-8"]
].forEach(([key, value]) => script.setAttribute(key, value));
script.onload = () => new AnPScriptsLoader({
domain : domain,
mode : "wmarkdown",
styles : [{styles}],
scripts : [{scripts}]
}, () => {
/** @type {WMarkDown} */
const wmarkdown = new WMarkDown({dictionary : [{dictionary}]});
/** @type {AnP} */
const anp = new AnP({
globals : {anp_root : "https://anp." + domain},
callback : () => {
anp.base.set(".{class}");
}
});
});
</script>
</head>
<body class="anp {class}">
<header>
<h1 data-i18n="{snake}" data-i18n-without="true" title="{{{snake}}}">
<a href="{link}" target="_blank">
<span class="image">
<img src="{logo}" />
<span style="background-image:url('{logo}');"></span>
</span>
<span data-i18n="{snake}">{{{snake}}}</span>
</a>
</h1>
<nav class="main-menu">
<ul><!-- [[menu]] -->></ul>
</nav>
</header>
<main>{contents}</main>
<footer>
<span class="license"><!-- [[licenses]] --></span>
</footer>
</body>
</html>