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
# hisrc: load low src image by default and on defined breakpoint load hires image | |
# html markup: <img data-breakpoint="450" data-hisrc="large-image.jpg" src="default-image.jpg" alt=" "> | |
# data-breakpoint="450" is not needed, 450 is default | |
hisrc = () -> | |
window_width = $(window).width() | |
$('[data-hisrc]').each () -> | |
$(this).attr('data-breakpoint', '450') if not $(this).attr('data-breakpoint') | |
$(this).attr('data-losrc', $(this).attr('src') ) if not $(this).attr('data-losrc') |
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 readyStateCheckInterval = setInterval(function() { | |
if (document.readyState === "complete") { | |
// do stuff | |
init(); | |
clearInterval(readyStateCheckInterval); | |
} | |
}, 10); |
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
.vidicon(@size) { | |
@trisize: (@size / 3); | |
position: relative; | |
z-index: 1; | |
&:before, | |
&:after { | |
content: ""; | |
opacity: .7; | |
display: block; | |
position: absolute; |
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
{{#svg}} | |
{{#selector}}.{{expression}}{{^last}}, | |
{{/last}}{{/selector}} { {{#sprite}} | |
background-position: {{position}};{{/sprite}}{{^common}} | |
background-repeat: no-repeat;{{#dimensions}} | |
display: block; | |
text-indent: -999em; | |
width: {{width}}px; | |
height: {{height}}px;{{/dimensions}} | |
background-image: url(/assets/sprite/{{#sprite}}{{sprite}}{{/sprite}}{{^sprite}}{{#encode}}"{{encoded}}"{{/encode}}{{^encode}}{{path}}{{/encode}}{{/sprite}});{{/common}} |
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 elements = document.querySelectorAll('.socialshares a'); | |
Array.prototype.forEach.call(elements, function(el, i){ | |
el.onclick = function(elaction) { | |
elaction.preventDefault(); | |
window.open( el.attributes.href.value, '', 'width=600,height=300' ); | |
} | |
}); |
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
// smooth scroll | |
$('a[href*="#"]:not([href="#"])').on("click", function() { | |
if (location.pathname.replace(/^\//,'') === this.pathname.replace(/^\//,'') && location.hostname === this.hostname) { | |
var target = $(this.hash); | |
target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); | |
if (target.length) { | |
var toppie = target.offset().top - 50; | |
$('html,body').animate({ | |
scrollTop: toppie | |
}, 600); |
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
^((?!Security|XHR).)*$ |
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
.row { | |
> .col-sm-4 { | |
@media screen and (min-width: @screen-sm-min){ | |
&:nth-child(3n + 1) { | |
clear: left; | |
} | |
} | |
} | |
> .col-sm-3 { | |
@media screen and (min-width: @screen-sm-min){ |