add hit counter to page footer

This commit is contained in:
Joe Ardent 2024-03-30 13:15:52 -07:00
parent c67821256e
commit 87afa418b2

View file

@ -7,9 +7,19 @@
<hr>
<script src="/js/footnoter.js"></script>
<div class=hias-footer>
<p>There have been <span id="hitman-count">no</span> views of this page.</p>
<p>
<script async defer src="https://www.recurse-scout.com/loader.js?t=e38ac183ce767b3800a4b4587c00f3fd"></script>
<div class="rc-scout"></div>
</p>
</div>
<script defer>
const hits = document.getElementById('hitman-count');
fetch("/hit/{{ page.slug }}").then((resp) => {
return resp.text();
}).then((data) => {
hits.innerHTML = data;
});
</script>
{% endblock main_content %}