site/_footer.html
2019-06-06 23:10:28 +00:00

58 lines
1.4 KiB
HTML

<hr>
<footer class="text-center">
<a href="https://tildegit.org/radiofreqs/site">page source</a>
<!--&mdash;
<a href="https://bhh.sh/donate/">donate</a>-->
</footer>
</div>
<br>
<br>
<script>
function myFunction() {
var x = document.getElementById("myTopnav");
if (x.className === "topnav") {
x.className += " responsive";
} else {
x.className = "topnav";
}
}
</script>
<script>
var url = window.location.href;
var fileName = url.slice(url.lastIndexOf('/') + 1);
// forEach method, could be shipped as part of an Object Literal/Module
var forEach = function (array, callback, scope) {
for (var i = 0; i < array.length; i++) {
callback.call(scope, i, array[i]); // passes back stuff we need
}
};
// Usage:
// optionally change the scope as final parameter too, like ECMA5
var myNodeList = document.querySelectorAll('a.topnav');
forEach(myNodeList, function (index, value) {
console.log(index, value); // passes index + value back!
});
switch (fileName){
case '':
myNodeList[0].style.textDecoration = "underline";
break;
case 'about.html':
myNodeList[1].style.textDecoration = "underline";
break;
case '/signup.html':
myNodeList[2].style.textDecoration = "underline";
break;
case 'stats.html':
myNodeList[6].style.textDecoration = "underline";
break;
}
</script>
</body>
</html>