Update
This commit is contained in:
parent
1ab6e5f0b0
commit
5faca190a6
13 changed files with 1070 additions and 535 deletions
46
footer.php
46
footer.php
|
@ -8,17 +8,39 @@
|
|||
*/
|
||||
?>
|
||||
|
||||
<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));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<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');
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
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';
|
||||
}
|
||||
|
||||
<?php wp_footer(); ?>
|
||||
|
||||
</body>
|
||||
link.innerHTML = (link.innerHTML == linkText[0]) ? linkText[1] : linkText[0];
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php wp_footer(); ?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
Reference in a new issue