View Local Fallback for jQuery and Modernizr
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
HTML | |
===== | |
<script type='text/javascript'> | |
window.jQuery || document.write('<script src="js/jquery-1.7.1.js">\x3C/script>') | |
</script> | |
<script src='http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.0.6/modernizr.min.js' type='text/javascript'></script> | |
<script type='text/javascript'> | |
window.Modernizr || document.write('<script src="js/modernizr-2.0.6.js">\x3C/script>') | |
</script> |
View dabblet.css
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
/** | |
* Clean Home Button | |
*/ | |
body { | |
text-align: center; | |
} | |
a { | |
background: -webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(0%, #ffffff), color-stop(100%, #e5e5e5)), -webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(0%, #6d8a18), color-stop(100%, #6d8a18)); | |
background: -webkit-linear-gradient(bottom, #ffffff, #e5e5e5), -webkit-linear-gradient(bottom, #6d8a18, #6d8a18); |
View dabblet.css
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
/** | |
* Red Push Button | |
*/ | |
html { | |
background: url(data:image/jpeg;base64,/9j/4QAYRXhpZgAASUkqAAgAAAAAAAAAAAAAAP/sABFEdWNreQABAAQAAABQAAD/7gAOQWRvYmUAZMAAAAAB/9sAhAACAgICAgICAgICAwICAgMEAwICAwQFBAQEBAQFBgUFBQUFBQYGBwcIBwcGCQkKCgkJDAwMDAwMDAwMDAwMDAwMAQMDAwUEBQkGBgkNCwkLDQ8ODg4ODw8MDAwMDA8PDAwMDAwMDwwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAz/wAARCACHAIcDAREAAhEBAxEB/8QAhgABAQEBAQEAAAAAAAAAAAAAAgMBAAQIAQEBAQAAAAAAAAAAAAAAAAAAAQQQAQACAQMCBQIDBwMEAwEAAAERAiExEgMAQVFhcSITgTLwkaGxwdFCcoIjUqKyYtLiM+HxkgQRAQACAQQDAQADAQEBAAAAAPAAAaERITFhQXGi4VGRArHBgf/aAAwDAQACEQMRAD8A+CK+3kKna1N1piFqmAx5foYz1tHd+KmYdV5uSGOJmdmyaGLWzbVqY0O/h/p6D64oxKtqW5Fvu2luXdbOYNwAkTGs/XsdB1W+tyDGlTkrupBteO1CGCtGpmXPjOf+WgdVtrcozpUjpWtxzbjxaYbbbEoZfLy7SzAfPIZlVi3KWaUF5DmaoQNWsAflj0MS9B3fipB1/NzN1bWpkTdw7RfuCsqrAzGmn9p0H1wGJm8aWb23TxzZ3Bu9+e2dJz6uIOj0/K31uBjSo2u69l1/yRx5Nvtzl7/jKx0HVba3KM6VOLbo98cZfiPdqxuMlZ7vZ9Mr0HzzBmCm5GzEfHF+avabwAefYPTGXoO78VA6rzcoOcG5bcsUUtZgwpBGn18qnQfXFGJkw1qKBbitaz/MxOqaZFx5+Anp+VvrcgxpUCW2K614WKg22xcYZ82fXOvQdVtrcozpUpYtYsk1 |
View jQuery testing and fallback
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
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min1.js"></script> | |
<script> | |
var $$; | |
// If 1.7.1 is loaded, put it into noConflict mode | |
if(window.jQuery().jquery = '1.7.1') { | |
$$ = $.noConflict(true); | |
} else { | |
// If it is not loaded, load the local version | |
document.write("<script src='/js/jquery-1.7.1.js'>\x3C/script>"); |
View Javascript to lock iOS zoom until touch
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
// lock the zoom unless the user is manually zooming | |
var viewportmeta = document.querySelector('meta[name="viewport"]'); | |
if (viewportmeta) { | |
viewportmeta.content = 'width=device-width, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0'; | |
document.body.addEventListener('gesturestart', function () { | |
viewportmeta.content = 'width=device-width, minimum-scale=0.25, maximum-scale=1.6'; | |
}, false); | |
} |
View dabblet.css
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
/** | |
* Green Upload Button | |
*/ | |
a { | |
background: -webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(100%, rgba(255, 255, 255, 0.4))), -webkit-gradient(linear, 50% 100%, 50% 0%, color-stop(0%, #6d8a18), color-stop(100%, #6d8a18)); | |
background: -webkit-linear-gradient(bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.4)), -webkit-linear-gradient(bottom, #6d8a18, #6d8a18); | |
background: -moz-linear-gradient(bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.4)), -moz-linear-gradient(bottom, #6d8a18, #6d8a18); | |
background: -o-linear-gradient(bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.4)), -o-linear-gradient(bottom, #6d8a18, #6d8a18); | |
background: -ms-linear-gradient(bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.4)), -ms-linear-gradient(bottom, #6d8a18, #6d8a18); |
View dabblet.css
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
/** | |
* Audio Toggle | |
*/ | |
div, a, ul, li { | |
margin: 0; | |
padding: 0; | |
border: 0; | |
font-size: 100%; | |
font-weight: 100; |
View Add custom classes to Middleman pages
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
def page_classes | |
path = request.path_info.dup | |
path << settings.index_file if path.match(%r{/$}) | |
path = path.gsub(%r{^/}, '') | |
classes = [] | |
parts = path.split('.')[0].split('/') | |
parts.join(' ') | |
end |
View jQuery for smooth scrolling local links
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
$('a[href*=#]').on("click", function(event) { | |
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 targetOffset = $target.offset().top; | |
$('html,body').animate({scrollTop: targetOffset}, 300); | |
return false; | |
} | |
} |
View dabblet.css
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
/** | |
* Audio Toggle | |
*/ | |
html { | |
background: #333; | |
} | |
div { | |
padding: 0; | |
} | |
#threeway { |
OlderNewer