This repository has been archived on 2023-08-16. You can view files and clone it, but cannot push or open issues or pull requests.
Omphaloskepsis/footer.php

47 lines
1.3 KiB
PHP
Raw Normal View History

2018-03-21 18:19:20 +00:00
<?php
/**
2021-01-09 11:13:06 +00:00
* The template for displaying the footer
*
* @package WordPress
* @subpackage Omphaloskepsis
* @since Omphaloskepsis 1.0
*/
2018-03-21 18:19:20 +00:00
?>
2021-01-09 11:13:06 +00:00
2020-08-08 09:55:20 +00:00
<script type="text/javascript">
// Displays and hides the top header bar on page scroll.
jQuery(document).ready(function($) {
$(window).on("scroll", function() {
var fromTop = $(window).scrollTop();
$('body > header').toggleClass("show", (fromTop > 200));
});
$('blockquote').each(function() {
if ($(this).children('p').children().first().is('q')) {
$(this).addClass('no-first-quote');
}
if ($(this).children('p').children().last().is('q')) {
$(this).addClass('no-last-quote');
}
});
});
2021-01-09 11:13:06 +00:00
function toggleCommentary() {
var linkText = ["Click here to hide all commentary and leave only reportage.", "Click here to show commentary."];
var commentaries = document.getElementsByClassName("article__text--commentary");
var link = document.getElementById("toggleCommentary");
for (var i = 0; i < commentaries.length; i++) {
commentaries[i].style.display = (commentaries[i].style.display == 'none') ? 'inline' : 'none';
}
2018-03-21 18:19:20 +00:00
2021-01-09 11:13:06 +00:00
link.innerHTML = (link.innerHTML == linkText[0]) ? linkText[1] : linkText[0];
}
</script>
2020-08-08 09:55:20 +00:00
<?php wp_footer(); ?>
</body>
2018-03-21 18:19:20 +00:00
</html>