2018-03-21 18:19:20 +00:00
< ? php
2021-01-22 16:19:51 +00:00
/**
* The template for displaying the footer
*
* @ package Omphaloskepsis
* @ since Omphaloskepsis 1.0
*/
2018-03-21 18:19:20 +00:00
?>
2021-01-23 14:41:19 +00:00
< footer id = " site-footer " class = " show " >
2022-04-12 22:34:33 +01:00
< p > By < a href = " / " > Ben </ a > | < ? php if ( ! is_page ( 'Hi.' ) && ! is_page ( 'privacy-policy' ) && ! is_404 () ) : ?> <a href="https://github.com/Rumperuu/Omphaloskepsis/issues" target="_blank" rel="noopener noreferrer">Report an Issue</a> | <?php endif; ?><a href="/privacy-policy">Privacy Policy</a></p>
2021-01-23 14:41:19 +00:00
</ footer >
2020-08-08 10:55:20 +01: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 ));
});
2021-01-23 14:41:19 +00:00
2020-08-08 10:55:20 +01:00
$ ( 'blockquote' ) . each ( function () {
if ( $ ( this ) . children ( 'p' ) . children () . first () . is ( 'q' )) {
$ ( this ) . addClass ( 'no-first-quote' );
}
2021-01-23 14:41:19 +00:00
2020-08-08 10:55:20 +01:00
if ( $ ( this ) . children ( 'p' ) . children () . last () . is ( 'q' )) {
$ ( this ) . addClass ( 'no-last-quote' );
}
});
});
2021-01-23 14:41:19 +00:00
function toggleCommentary () {
2021-01-09 11:13:06 +00:00
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 " );
2021-01-23 14:41:19 +00:00
2021-01-09 11:13:06 +00:00
for ( var i = 0 ; i < commentaries . length ; i ++ ) {
2021-01-23 14:41:19 +00:00
commentaries [ i ] . style . display = ( commentaries [ i ] . style . display == 'none' ) ? 'inline' : 'none' ;
2021-01-09 11:13:06 +00:00
}
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 ];
2021-01-23 14:41:19 +00:00
}
</ script >
2020-08-08 10:55:20 +01:00
< ? php wp_footer (); ?>
2021-01-23 14:41:19 +00:00
2020-08-08 10:55:20 +01:00
</ body >
2018-03-21 18:19:20 +00:00
</ html >