|
@@ -2,25 +2,9 @@
|
|
|
<html>
|
|
|
<head>
|
|
|
<title>Baba Yaga</title>
|
|
|
- <script src="/static/jquery-3.5.0.min.js"></script>
|
|
|
</head>
|
|
|
<body>
|
|
|
<div id="root"></div>
|
|
|
- <script type="application/javascript">
|
|
|
- function renderPage() {
|
|
|
- if (!window.location.hash) {
|
|
|
- window.location.hash = "#index";
|
|
|
- }
|
|
|
- const currentPage = window.location.hash.substring(1);
|
|
|
- const req = new XMLHttpRequest();
|
|
|
- req.addEventListener("load", function () {
|
|
|
- $("#root").html(JSON.parse(this.responseText).rendered);
|
|
|
- });
|
|
|
- req.open("GET", `/p/${currentPage}`);
|
|
|
- req.setRequestHeader("Accept", "application/json");
|
|
|
- req.send();
|
|
|
- }
|
|
|
- renderPage();
|
|
|
- </script>
|
|
|
+ <script src="/static/by.js"></script>
|
|
|
</body>
|
|
|
</html>
|