This file contains 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 svgSupport = (window.SVGSVGElement) ? true : false; | |
if (svgSupport == false || $.browser.msie == true) { | |
$('.svg').each(function(){ | |
var svgBI = $(this).css('background-image'); | |
if (svgBI.indexOf("svg") > -1){ | |
pngBI = svgBI.replace('svg', 'png'); | |
$(this).css('background-image',pngBI); | |
}; | |
}) |
This file contains 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 global $post; | |
if (isset($post)) { | |
//get the ancestors | |
$familyTree = get_ancestors($post->ID,'page'); | |
array_unshift( $familyTree, $post->ID ); //add the current page to the begining of the list | |
//loop through the family tree until you find a result or exhaust the array | |
$featuredImage = ''; | |
foreach ( $familyTree as $family_postid ) { |
This file contains 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
(function($) { | |
$.fn.placeholder = function() { | |
if(typeof document.createElement("input").placeholder == 'undefined') { | |
$('[placeholder]').focus(function() { | |
var input = $(this); | |
if (input.val() == input.attr('placeholder')) { | |
input.val(''); | |
input.removeClass('placeholder'); | |
} | |
}).blur(function() { |
This file contains 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
<svg width="96" height="96"> | |
<image xlink:href="svg.svg" src="svg.png" width="96" height="96"/> | |
</svg> | |
And here the magic: browsers which support SVG will read the code as: | |
<svg width="96" height="96"> | |
<image xlink:href="svg.svg" width="96" height="96"/> | |
</svg> | |
ignoring src attribute and will show SVG image. |
This file contains 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
# 480 weeks | |
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"> | |
Header set Cache-Control "max-age=290304000, public" | |
</FilesMatch> | |
# 2 DAYS | |
<FilesMatch "\.(xml|txt)$"> | |
Header set Cache-Control "max-age=172800, public, must-revalidate" | |
</FilesMatch> |
This file contains 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
... | |
<fieldType name="string" class="solr.StrField" omitNorms="true"> | |
<analyzer type="index"> | |
<tokenizer class="solr.StandardTokenizerFactory"/> | |
<filter class="solr.StandardFilterFactory"/> | |
<filter class="solr.LowerCaseFilterFactory"/> | |
<filter class="solr.PorterStemFilterFactory"/> | |
<filter class="solr.EdgeNGramFilterFactory" minGramSize="2" maxGramSize="15" side="front"/> | |
</analyzer> |
This file contains 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
/** | |
* Shopify Client API | |
*/ | |
var Shopify = {} | |
var API = Shopify.API = function ShopifyAPI(options) { | |
this.config = { | |
shop: options.shop, |
This file contains 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
let scrollPosition = 0; | |
let setPosition = () => { | |
if (window.pageYOffset !== undefined) { | |
scrollPosition = window.pageYOffset; | |
} else { | |
scrollPosition = (document.documentElement || document.body.parentNode || document.body).scrollTop; | |
} | |
}; |
This file contains 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
let Parallax = { | |
init(el, displace) { | |
this.animateItem(el, displace); | |
}, | |
setPosition() { | |
if (window.pageYOffset !== undefined) { | |
return window.pageYOffset; | |
} else { | |
return (document.documentElement || document.body.parentNode || document.body).scrollTop; | |
} |
This file contains 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.addEventListener('scroll', handleScrolling); |
OlderNewer