wordpos/samples/self-hosted/index.html

43 lines
979 B
HTML
Raw Normal View History

2018-10-13 03:35:11 +00:00
<!doctype html>
<html>
<head>
2018-10-15 05:20:56 +00:00
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/javascript.min.js"></script>
2018-10-13 03:35:11 +00:00
2018-10-15 05:20:56 +00:00
<script src="./main.js"></script>
<style>
pre {
padding: 2em;
display: block;
2018-10-13 03:35:11 +00:00
}
2018-10-15 05:20:56 +00:00
</style>
2018-10-13 03:35:11 +00:00
</head>
<body>
<h1>Self-hosted WordPOS sample</h1>
2018-10-15 05:20:56 +00:00
Open console to see results.
<pre><code>
var a = "foo"
</code></pre>
<script>
var el = document.querySelector('code');
if (fetch) {
fetch('./main.txt')
.then(res => res.text())
.then(txt => {
// console.log(111, txt)
el.innerText = txt;
hljs.initHighlightingOnLoad();
});
} else {
el.innerHTML = 'Open <a href=main.txt>main.js</a>.';
}
</script>
2018-10-13 03:35:11 +00:00
</body>
</html>