@haxtheweb/haxcms-nodejs
Version:
HAXcms single and multisite nodejs server, api, and administration
89 lines • 2.7 kB
HTML
<html lang="en">
<head>
<base href="{{ basePath }}" />
{{ metadata|raw }}
<!-- Start Single Page Apps for GitHub Pages -->
<script>
// Single Page Apps for GitHub Pages
// https://github.com/rafrex/spa-github-pages
// Copyright (c) 2016 Rafael Pedicini, licensed under the MIT License
// ----------------------------------------------------------------------
// This script checks to see if a redirect is present in the query string
// and converts it back into the correct url and adds it to the
// browser's history using window.history.replaceState(...),
// which won't cause the browser to attempt to load the new url.
// When the single page app is loaded further down in this file,
// the correct url will be waiting in the browser's history for
// the single page app to route accordingly.
(function (l) {
if (l.search) {
var q = {};
l.search.slice(1).split('&').forEach(function (v) {
var a = v.split('=');
q[a[0]] = a.slice(1).join('=').replace(/~and~/g, '&');
});
if (q.p !== undefined) {
window.history.replaceState(null, null,
l.pathname.slice(0, -1) + (q.p || '') +
(q.q ? ('?' + q.q) : '') +
l.hash
);
}
}
}(window.location))
</script>
<!-- End Single Page Apps for GitHub Pages -->
{{ serviceWorkerScript|raw }}
<style>
body {
margin: 0;
min-height: 100vh;
}
.use-modern-browser a {
font-size: 22px;
}
.use-modern-browser {
font-size: 22px;
text-align: center;
width: 100%;
}
haxcms-site-builder {
display: block;
}
haxcms-site-builder:not(:defined) div.loading {
width: 100vw;
display: block;
position: initial;
height: 100vh;
background: {{ hexCode }};
}
haxcms-site-builder:not(:defined) div {
font-size: 6vw;
line-height: 1;
margin: 0 auto;
top: calc(50vh - 8vw);
width: 100%;
justify-content: center;
display: grid;
text-align: center;
padding: 0;
position: relative;
font-family: "Courier New", Courier, monospace;
color: black;
}
body[no-js] haxcms-site-builder{
display: none ;
}
</style>
</head>
<body {{ bodyAttrs|raw }}>
<haxcms-site-builder id="site" file="site.json"><div class="loading"><div>{{ title }}</div><div>loading</div></div></haxcms-site-builder>
<script>
window.HAXCMSContext="published";
window.__appCDN="./";
</script>
<script src="./build-haxcms.js"></script>
<script src="./build.js"></script>
</body>
</html>