Commit 95d2bc8c authored by Bryan Tong's avatar Bryan Tong

Add viewport calculation to the footer

parent cbd425e1
......@@ -4,6 +4,7 @@
<div class="support">Powered by <a href="">Kado v4.2.1</a> Try it on your project today!</div>
<div class="conduct">Kado is openly developed and open source. To contribute view our <a href="/info/contributing/">Code of Conduct</a>. Then send a merge request on <a href="">Gitlab</a>.</div>
<div class="license">This software is licensed under the Lesser GNU Public License Version 3 or above. Please see <a href="/license/">LICENSE</a> for more details and a full copy of the license.</div>
<div>Your viewport width is <span id="viewport-width">0</span>px</div>
<!-- jQuery CDN - Slim version (=without AJAX) -->
<script src="" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
......@@ -15,5 +16,13 @@
<script src="/js/sidebar.js"></script>
<script async src=""></script>
<script>window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-51999698-15');</script>
function setSidebar () {
const width = window.innerWidth || document.documentElement.clientWidth
document.getElementById('viewport-width').textContent = width
if (width <= 697) { document.getElementById('wrapper').classList.add('active') }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment