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(d,p){ | |
var a = new XMLHttpRequest(), b = d.body; | |
a.open("GET", p, !0); | |
a.send(); | |
a.onload = function(){ | |
var c = d.createElement("div"); | |
c.style.display = "none"; | |
c.innerHTML = a.responseText; | |
b.insertBefore(c,b.childNodes[0]); | |
} |
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
gulp.task("sprite", function () { | |
return gulp | |
.src(input) | |
.pipe(svgmin()) | |
.pipe(svgstore()) | |
.pipe(gulp.dest(output)); | |
}); |
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 sprite loading | |
// This file should be at the top of the body to avoid a flash | |
// ========================================================================== | |
// Loading SVG in with AJAX | |
// --------------------------------- | |
(function(url) { | |
var id = "svg-sprite", | |
cb = (window.location.host.indexOf("local.") === 0); |
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 role="img" class="icon"><use xlink:href="#icon-poop"></svg> |
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 role="img" class="icon"><use xlink:href="/path/to/sprite.svg#icon-poop"></svg> |
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
// Base size icon styles | |
// -------------------------------------------- | |
.icon { | |
fill: currentColor; | |
width: 24px; | |
height: 24px; | |
vertical-align: -3px; | |
} |
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
// Icons inside elements | |
// -------------------------------------------- | |
a svg, | |
button svg, | |
label svg { | |
pointer-events: none; | |
} |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Redirecting...</title> | |
<meta http-equiv="refresh" content="0;URL=https://selz.com"> | |
</head> | |
<body></body> | |
</html> |
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($) { | |
'use strict'; | |
var values = {}, | |
settings = []; | |
// Grab all inputs | |
$(".generated-form :input").each(function() { | |
var $input = $(this), | |
name = $input.attr("name"), |
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() { | |
if (!('MutationObserver' in window)) { | |
return; | |
} | |
var observer = new MutationObserver(function(mutations) { | |
console.log('mutation: ' + mutations.length); | |
for(var m = 0; m < mutations.length; ++m) { | |
for(var n = 0; n < mutations[m].addedNodes.length; ++n) { | |
findEmbed(mutations[m].addedNodes[n]); |
OlderNewer