Testing fab

master
Nick Sergeant 2011-10-23 23:13:37 -04:00
parent 065a755072
commit 4204fbbc1a
4 changed files with 35 additions and 1 deletions

6
snipt/fabfile.py vendored
View File

@ -1,4 +1,8 @@
import os
from fabric.api import local
def deploy():
print 'hi'
BASE_PATH = os.path.dirname(__file__)
local('lessc %s/media/css/style.less %s/media/css/style.css' % (BASE_PATH, BASE_PATH))
local('coffee -c %s/media/js/script.coffee' % (BASE_PATH))

View File

@ -433,3 +433,6 @@ article.snipt footer ul.attrs li.comments {
.hidden {
display: none;
}
body {
background: blue;
}

View File

@ -515,3 +515,7 @@ article.snipt {
.hidden {
display: none;
}
body {
background: blue;
}

23
snipt/media/js/script.js Normal file
View File

@ -0,0 +1,23 @@
(function() {
var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
$(__bind(function() {
$(document).bind('keyup', '/', function() {
return $('input#search-query').focus();
});
$('div.infield label').inFieldLabels();
$('section.code a.expand').click(function() {
var el;
el = $(this).parent();
el.toggleClass('expanded');
if (el.hasClass('expanded')) {
el.css('height', 'auto');
$(this).text('Collapse');
} else {
el.css('height', '200px');
$(this).text('Expand');
}
return false;
});
return false;
}, this));
}).call(this);