This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Smartresize | |
(function($,sr){ | |
// debouncing function from John Hann | |
// http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/ | |
var debounce = function (func, threshold, execAsap) { | |
var timeout; | |
return function debounced () { | |
var obj = this, args = arguments; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Menu linking to sections on the home page with click triggers | |
if(window.location.hash) { | |
var hash = window.location.hash; | |
$(hash+' a' ).trigger('click'); | |
$("html, body").animate({scrollTop: $(hash).offset().top - 100}, 1000); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AuthUserFile /var/www/vhosts/160over90.com/park.160over90.com/httpdocs/.htpasswd | |
AuthGroupFile /dev/null | |
AuthName "Password Protected Area" | |
AuthType Basic | |
<limit GET POST> | |
require valid-user | |
</limit> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$window.bind('scroll', function(e) { | |
parallax(); | |
}); | |
// Subtle Parallax Function | |
function parallax() { | |
$scrollPosition = $window.scrollTop(); | |
$windowHeight = (( $window.height() )); | |
$('body').css('background-position-y', (0 - ($scrollPosition * .2)) + 'px'); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$image_id = get_post_thumbnail_id(); | |
$alt_text = get_post_meta($image_id , '_wp_attachment_image_alt', true); | |
$image_url = wp_get_attachment_image_src($image_id, true); | |
?> | |
<?php echo $image_url[0]; ?> | |
<?php echo $alt_text; ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.visuallyhidden { | |
position: absolute; | |
overflow: hidden; | |
clip: rect(0 0 0 0); | |
height: 1px; width: 1px; | |
margin: -1px; padding: 0; border: 0; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( 'stories' == get_post_type() ) { ?> | |
<div id="post-nav"> | |
<div class="next"> | |
<?php | |
$next_post = get_next_post(); | |
$nextId = $next_post->ID; | |
$nextthumbnail = wp_get_attachment_image_src( get_post_thumbnail_id($nextId), 'thumbnail'); | |
if (!empty( $next_post )): ?> | |
<a href="<?php echo get_permalink( $nextId ); ?>"><span class="arrow">Next »</span><img src="<?php echo $nextthumbnail[0]; ?>" style="background: <?php the_field('thumbnail_background_color', $nextId );?>"><?php echo $next_post->post_title; ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if( !$('html').hasClass('no-svg') ) { | |
$('img[src*="png"]').attr('src', function() { | |
return $(this).attr('src').replace('.png', '.svg'); | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#main-nav li').on('click', function(){ | |
$this = $(this); | |
var category = $this.attr('data-category'); | |
$('#events li').removeClass('hide').css({'display':'block'}); | |
// Checks if li has selected class | |
if( !$this.hasClass('selected') ) { | |
// Finds li that has the the data-category | |
$('#events li:not(.' + category + ')').addClass('hide').css({'display':'none'}); | |
} | |
$this.toggleClass('selected').siblings().removeClass('selected'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var maxHeight = -1; | |
$('.three-column .nav-ad').each(function() { | |
maxHeight = maxHeight > $(this).height() ? maxHeight : $(this).height(); | |
}); | |
$('.three-column .nav-ad').each(function() { | |
$(this).height(maxHeight); | |
}); |