-
Can't remember the fancy name of these coding styles, but instead of:
return function() { if(expression) {
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 columns = 24, | |
css = '.bbcnews-debug-grid{position:fixed;left:0;top:0;right:0;bottom:0;z-index:9999;display:block;pointer-events:none}.bbcnews-debug-grid__inner{height:100%;margin:0 auto;padding:0 4px}.bbcnews-debug-column{float:left;width:4.166666667%;height:100%}.bbcnews-debug-column__inner{margin-left:4px;margin-right:4px;height:100%;background-color:rgba(0,171,236,0.2)}@media(min-width:400px){.bbcnews-debug-grid__inner{padding:0 12px}}@media(min-width:600px){.bbcnews-debug-grid__inner{padding:0 24px}.bbcnews-debug-column__inner{margin-left:8px;margin-right:8px}}@media(min-width:1008px){.bbcnews-debug-grid__inner{width:992px;max-width:992px;padding:0}}'; | |
function createColumn(i) { | |
var column = document.createElement('div'), | |
inner = document.createElement('div'); | |
column.className = 'bbcnews-debug-column bbcnews-debug-column--'+i; |
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
desc "Watch stylesheets to automatically compile" | |
task :news do | |
sh "compass watch --config tabloid/webapp/conf/compass.rb tabloid/webapp/static/sass/core.scss tabloid/webapp/static/sass/compact.scss tabloid/webapp/static/sass/tablet.scss tabloid/webapp/static/sass/wide.scss" | |
end |
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 structure = frag( | |
div('#js-a', | |
p.text('abc'), | |
p.text('def') | |
), | |
div('#js-b', ['x', 'y', 'z'], | |
p('#js-c', ['some_other_class']).text('ghi') | |
) | |
); |
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
{ | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/RailsCasts Colour Scheme/RailsCastsColorScheme.tmTheme", | |
"draw_white_space": "all", | |
"folder_exclude_patterns": | |
[ | |
"data", | |
".git", | |
".svn", | |
".hg", |
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
header .logo { | |
line-height: 1.25em; /* 20px */ | |
} | |
header .logo span { | |
margin-bottom: 0px; | |
} | |
header .logo span a { | |
text-decoration: none; | |
color: #28292A; | |
} |
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
Replace: | |
<header> | |
<div class="container"> | |
<a href="/" class="logo"> | |
<img ... /> | |
<span>{Title}</span> | |
<span class="subtitle">Design. IA. Flash.</span> | |
</a> | |
</div> |
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
require "sass" | |
# this just simplifies css comparison | |
class String | |
def format_css | |
self.strip.split(/\n/).select { |line| line.strip!; !line.empty? }.join('\n') | |
end | |
end | |
describe "Sass to CSS" do |
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
$ cat .git/config | |
[core] | |
repositoryformatversion = 0 | |
filemode = true | |
bare = false | |
logallrefupdates = true | |
ignorecase = true | |
[remote "heroku"] | |
url = [email protected]:bbc-news-prototypes.git |
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
---------------------------------------------------------------------------- | |
REQUEST FORMAT 1: | |
http://stats.bbc.co.uk/o.gif? | |
s: News | |
t: 0_Load | |
i: 19948140 | |
p: 99110 | |
a: 0 | |
u: http://pal.sandbox.dev.bbc.co.uk/news/test-map-0 | |
r: 0 |