- Technique lifted directly from https://scotch.io/tutorials/aesthetic-sass-2-colors
- base.scss comes before color-palette.scss
- The
palette-color
scss function lets you do things likeborder-bottom: 1px solid palette-color('background', 'dark');
orcolor: palette-color('primary');
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($) { | |
var methods = { | |
init: function( options ) { | |
// iterate and reformat each matched element | |
return this.each(function() { | |
var $this = $(this), | |
opts = $.extend({}, $.fn.PLUGIN_NAME.defaults, options), | |
data = $this.data('PLUGIN_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
$('#selling nav a').click(function(){ | |
var what = $(this).attr('href'); | |
if($(this).hasClass('active') != true){ | |
$(this).addClass('active').parent().siblings().children().removeClass('active'); | |
$('.s-section:visible').animate({ | |
left: '-700px' | |
}, 500, function() { | |
$(this).css({'left':'0'}).hide(); | |
}); | |
$(what).css({'left':'700px'}).show().animate({ |
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 means of using underscore.js to do templates with conditionals | |
// Inside of underscore's template, it returns a function that uses | |
// 'with' on a variable named obj, and you can touch into that using | |
// inline JS and <% %> wrappers | |
// A template with conditional display of last names: | |
var good = _.template("Hello: <%= name %> <% if (obj.lastname) { %> <%= lastname %> <% } %>"); | |
// A template that tries to do that, but fails: | |
var bad = _.template("Hello: <%= name %> <% if (lastname) { %> <%= lastname %> <% } %>"); |
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
.some-selector { | |
background: white #{inline_image("image.png")} | |
} |
This document is meant to be a brief "checklist" of things to setup for your Ember addon when beginning development in order to have the best possible architecture and workflow out of the gate. For more comprehensive material, the following are bookshelf-caliber:
-
Ember Addon Secrets - Written around the Ember 2.6 era, this article takes a much deeper dive into several of the topics mentioned here.
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
# Tips for jQuery Bug Patching | |
# There are some assumptions made here, one being that you're | |
# set up with some form of "localhost" http server and that it's running. | |
# - http://www.mamp.info/en/mamp/ | |
# - sudo apt-get install apache2 | |
# Get it running: | |
# On Mac: | |
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
#!/bin/bash | |
## v1.0.6 | |
## this script will gernerate css stats | |
### example output | |
# CSS STATS | |
# ---------- | |
# Floats: 132 |
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> | |
<meta charset=utf-8> | |
<meta name=viewport content="width=device-width, initial-scale=1, maximum-scale=1"> | |
<meta name=apple-mobile-web-app-capable content=yes> | |
<meta name=apple-mobile-web-app-status-bar-style content=black> | |
<title>Test fullscreen</title> | |
<style> | |
html, body { | |
margin: 0; | |
padding: 0; |
OlderNewer