1234567891011121314151617181920212223242526 |
- <!DOCTYPE html>
- <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>
- </body>
- </html>
|