@ -0,0 +1 @@ |
|||
--ignore-dir=public |
@ -1,9 +1,4 @@ |
|||
guard 'shell' do |
|||
watch(/source\/sass\/(.*)\.s[ac]ss/) {|m| `compass compile` } |
|||
watch(%r{public/.+\.(js|html)}) {|m| `compass compile` } |
|||
end |
|||
|
|||
guard 'livereload', :api_version => '1.6' do |
|||
watch(%r{public/.+\.(css)}) |
|||
watch(%r{public/.+\.(js|html)}) |
|||
watch(/public\/stylesheets\/(.*)\.css/); |
|||
watch(/public\/(.*)\.(js|html|png|jpg|gif|jpeg|ttf|otf|woff|svg)/i); |
|||
end |
|||
|
@ -0,0 +1 @@ |
|||
system "sleep 0.5; compass compile --css-dir source/stylesheets" |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 504 B |
After Width: | Height: | Size: 333 B |
Before Width: | Height: | Size: 1.0 KiB |
@ -0,0 +1,20 @@ |
|||
// https://gist.github.com/901295
|
|||
// By @mathias, @cheeaun and @jdalton
|
|||
|
|||
(function(doc) { |
|||
var addEvent = 'addEventListener', |
|||
type = 'gesturestart', |
|||
qsa = 'querySelectorAll', |
|||
scales = [1, 1], |
|||
meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : []; |
|||
function fix() { |
|||
meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1]; |
|||
doc.removeEventListener(type, fix, true); |
|||
} |
|||
if ((meta = meta[meta.length - 1]) && addEvent in doc) { |
|||
fix(); |
|||
scales = [.25, 1.6]; |
|||
doc[addEvent](type, fix, true); |
|||
} |
|||
}(document)); |
|||
|
@ -0,0 +1,8 @@ |
|||
/* |
|||
* respond.js - A small and fast polyfill for min/max-width CSS3 Media Queries |
|||
* Copyright 2011, Scott Jehl, scottjehl.com |
|||
* Dual licensed under the MIT or GPL Version 2 licenses. |
|||
* Usage: Check out the readme file or github.com/scottjehl/respond |
|||
*/ |
|||
(function(e,h){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=h;if(h){return}var u=e.document,r=u.documentElement,i=[],k=[],p=[],o={},g=30,f=u.getElementsByTagName("head")[0]||r,b=f.getElementsByTagName("link"),d=[],a=function(){var B=b,w=B.length;for(var z=0;z<w;z++){var y=B[z],x=y.href,A=y.media,v=y.rel&&y.rel.toLowerCase()==="stylesheet";if(!!x&&v&&!o[x]){if(!/^([a-zA-Z]+?:(\/\/)?(www\.)?)/.test(x)||x.replace(RegExp.$1,"").split("/")[0]===e.location.host){d.push({href:x,media:A})}else{o[x]=true}}}t()},t=function(){if(d.length){var v=d.shift();n(v.href,function(w){m(w,v.href,v.media);o[v.href]=true;t()})}},m=function(G,v,x){var E=G.match(/@media ([^\{]+)\{((?!@media)[\s\S])*(?=\}[\s]*\/\*\/mediaquery\*\/)/gmi),H=E&&E.length||0,v=v.substring(0,v.lastIndexOf("/")),w=function(I){return I.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+v+"$2$3")},y=!H&&x;if(v.length){v+="/"}if(y){H=1}for(var B=0;B<H;B++){var C;if(y){C=x;k.push(w(G))}else{C=E[B].match(/@media ([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1;k.push(RegExp.$2&&w(RegExp.$2))}var z=C.split(","),F=z.length;for(var A=0;A<F;A++){var D=z[A];i.push({media:D.match(/(only\s+)?([a-zA-Z]+)(\sand)?/)&&RegExp.$2,rules:k.length-1,minw:D.match(/\(min\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1),maxw:D.match(/\(max\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1)})}}j()},l,q,j=function(E){var v="clientWidth",x=r[v],D=u.compatMode==="CSS1Compat"&&x||u.body[v]||x,z={},C=u.createDocumentFragment(),B=b[b.length-1],w=(new Date()).getTime();if(E&&l&&w-l<g){clearTimeout(q);q=setTimeout(j,g);return}else{l=w}for(var y in i){var F=i[y];if(!F.minw&&!F.maxw||(!F.minw||F.minw&&D>=F.minw)&&(!F.maxw||F.maxw&&D<=F.maxw)){if(!z[F.media]){z[F.media]=[]}z[F.media].push(k[F.rules])}}for(var y in p){if(p[y]&&p[y].parentNode===f){f.removeChild(p[y])}}for(var y in z){var G=u.createElement("style"),A=z[y].join("\n");G.type="text/css";G.media=y;if(G.styleSheet){G.styleSheet.cssText=A}else{G.appendChild(u.createTextNode(A))}C.appendChild(G);p.push(G)}f.insertBefore(C,B.nextSibling)},n=function(v,x){var w=c();if(!w){return}w.open("GET",v,true);w.onreadystatechange=function(){if(w.readyState!=4||w.status!=200&&w.status!=304){return}x(w.responseText)};if(w.readyState==4){return}w.send()},c=(function(){var v=false,w=[function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new XMLHttpRequest()}],y=w.length;while(y--){try{v=w[y]()}catch(x){continue}break}return function(){return v}})();a();respond.update=a;function s(){j(true)}if(e.addEventListener){e.addEventListener("resize",s,false)}else{if(e.attachEvent){e.attachEvent("onresize",s)}}})(this,(function(f){if(f.matchMedia){return true}var e,i=document,c=i.documentElement,g=c.firstElementChild||c.firstChild,h=!i.body,d=i.body||i.createElement("body"),b=i.createElement("div"),a="only all";b.id="mq-test-1";b.style.cssText="position:absolute;top:-99em";d.appendChild(b);b.innerHTML='_<style media="'+a+'"> #mq-test-1 { width: 9px; }</style>';if(h){c.insertBefore(d,g)}b.removeChild(b.firstChild);e=b.offsetWidth==9;if(h){c.removeChild(d)}else{d.removeChild(b)}return e})(this)); |
|||
|
@ -0,0 +1,5 @@ |
|||
/*! |
|||
* selectivizr v1.0.2 - (c) Keith Clark, freely distributable under the terms of the MIT license. |
|||
* selectivizr.com |
|||
*/ |
|||
(function(j){function A(a){return a.replace(B,h).replace(C,function(a,d,b){for(var a=b.split(","),b=0,e=a.length;b<e;b++){var s=D(a[b].replace(E,h).replace(F,h))+o,l=[];a[b]=s.replace(G,function(a,b,c,d,e){if(b){if(l.length>0){var a=l,f,e=s.substring(0,e).replace(H,i);if(e==i||e.charAt(e.length-1)==o)e+="*";try{f=t(e)}catch(k){}if(f){e=0;for(c=f.length;e<c;e++){for(var d=f[e],h=d.className,j=0,m=a.length;j<m;j++){var g=a[j];if(!RegExp("(^|\\s)"+g.className+"(\\s|$)").test(d.className)&&g.b&&(g.b===!0||g.b(d)===!0))h=u(h,g.className,!0)}d.className=h}}l=[]}return b}else{if(b=c?I(c):!v||v.test(d)?{className:w(d),b:!0}:null)return l.push(b),"."+b.className;return a}})}return d+a.join(",")})}function I(a){var c=!0,d=w(a.slice(1)),b=a.substring(0,5)==":not(",e,f;b&&(a=a.slice(5,-1));var l=a.indexOf("(");l>-1&&(a=a.substring(0,l));if(a.charAt(0)==":")switch(a.slice(1)){case "root":c=function(a){return b?a!=p:a==p};break;case "target":if(m==8){c=function(a){function c(){var d=location.hash,e=d.slice(1);return b?d==i||a.id!=e:d!=i&&a.id==e}k(j,"hashchange",function(){g(a,d,c())});return c()};break}return!1;case "checked":c=function(a){J.test(a.type)&&k(a,"propertychange",function(){event.propertyName=="checked"&&g(a,d,a.checked!==b)});return a.checked!==b};break;case "disabled":b=!b;case "enabled":c=function(c){if(K.test(c.tagName))return k(c,"propertychange",function(){event.propertyName=="$disabled"&&g(c,d,c.a===b)}),q.push(c),c.a=c.disabled,c.disabled===b;return a==":enabled"?b:!b};break;case "focus":e="focus",f="blur";case "hover":e||(e="mouseenter",f="mouseleave");c=function(a){k(a,b?f:e,function(){g(a,d,!0)});k(a,b?e:f,function(){g(a,d,!1)});return b};break;default:if(!L.test(a))return!1}return{className:d,b:c}}function w(a){return M+"-"+(m==6&&N?O++:a.replace(P,function(a){return a.charCodeAt(0)}))}function D(a){return a.replace(x,h).replace(Q,o)}function g(a,c,d){var b=a.className,c=u(b,c,d);if(c!=b)a.className=c,a.parentNode.className+=i}function u(a,c,d){var b=RegExp("(^|\\s)"+c+"(\\s|$)"),e=b.test(a);return d?e?a:a+o+c:e?a.replace(b,h).replace(x,h):a}function k(a,c,d){a.attachEvent("on"+c,d)}function r(a,c){if(/^https?:\/\//i.test(a))return c.substring(0,c.indexOf("/",8))==a.substring(0,a.indexOf("/",8))?a:null;if(a.charAt(0)=="/")return c.substring(0,c.indexOf("/",8))+a;var d=c.split(/[?#]/)[0];a.charAt(0)!="?"&&d.charAt(d.length-1)!="/"&&(d=d.substring(0,d.lastIndexOf("/")+1));return d+a}function y(a){if(a)return n.open("GET",a,!1),n.send(),(n.status==200?n.responseText:i).replace(R,i).replace(S,function(c,d,b,e,f){return y(r(b||f,a))}).replace(T,function(c,d,b){d=d||i;return" url("+d+r(b,a)+d+") "});return i}function U(){var a,c;a=f.getElementsByTagName("BASE");for(var d=a.length>0?a[0].href:f.location.href,b=0;b<f.styleSheets.length;b++)if(c=f.styleSheets[b],c.href!=i&&(a=r(c.href,d)))c.cssText=A(y(a));q.length>0&&setInterval(function(){for(var a=0,c=q.length;a<c;a++){var b=q[a];if(b.disabled!==b.a)b.disabled?(b.disabled=!1,b.a=!0,b.disabled=!0):b.a=b.disabled}},250)}if(!/*@cc_on!@*/true){var f=document,p=f.documentElement,n=function(){if(j.XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(a){return null}}(),m=/MSIE (\d+)/.exec(navigator.userAgent)[1];if(!(f.compatMode!="CSS1Compat"||m<6||m>8||!n)){var z={NW:"*.Dom.select",MooTools:"$$",DOMAssistant:"*.$",Prototype:"$$",YAHOO:"*.util.Selector.query",Sizzle:"*",jQuery:"*",dojo:"*.query"},t,q=[],O=0,N=!0,M="slvzr",R=/(\/\*[^*]*\*+([^\/][^*]*\*+)*\/)\s*/g,S=/@import\s*(?:(?:(?:url\(\s*(['"]?)(.*)\1)\s*\))|(?:(['"])(.*)\3))[^;]*;/g,T=/\burl\(\s*(["']?)(?!data:)([^"')]+)\1\s*\)/g,L=/^:(empty|(first|last|only|nth(-last)?)-(child|of-type))$/,B=/:(:first-(?:line|letter))/g,C=/(^|})\s*([^\{]*?[\[:][^{]+)/g,G=/([ +~>])|(:[a-z-]+(?:\(.*?\)+)?)|(\[.*?\])/g,H=/(:not\()?:(hover|enabled|disabled|focus|checked|target|active|visited|first-line|first-letter)\)?/g,P=/[^\w-]/g,K=/^(INPUT|SELECT|TEXTAREA|BUTTON)$/,J=/^(checkbox|radio)$/,v=m>6?/[\$\^*]=(['"])\1/:null,E=/([(\[+~])\s+/g,F=/\s+([)\]+~])/g,Q=/\s+/g,x=/^\s*((?:[\S\s]*\S)?)\s*$/,i="",o=" ",h="$1";(function(a,c){function d(){try{p.doScroll("left")}catch(a){setTimeout(d,50);return}b("poll")}function b(d){if(!(d.type=="readystatechange"&&f.readyState!="complete")&&((d.type=="load"?a:f).detachEvent("on"+d.type,b,!1),!e&&(e=!0)))c.call(a,d.type||d)}var e=!1,g=!0;if(f.readyState=="complete")c.call(a,i);else{if(f.createEventObject&&p.doScroll){try{g=!a.frameElement}catch(h){}g&&d()}k(f,"readystatechange",b);k(a,"load",b)}})(j,function(){for(var a in z){var c,d,b=j;if(j[a]){for(c=z[a].replace("*",a).split(".");(d=c.shift())&&(b=b[d]););if(typeof b=="function"){t=b;U();break}}}})}}})(this); |
@ -1,100 +0,0 @@ |
|||
//MooTools More, <http://mootools.net/more>. Copyright (c) 2006-2009 Aaron Newton <http://clientcide.com/>, Valerio Proietti <http://mad4milk.net> & the MooTools team <http://mootools.net/developers>, MIT Style License.
|
|||
|
|||
MooTools.More={version:"1.2.4.2",build:"bd5a93c0913cce25917c48cbdacde568e15e02ef"};(function(){var a={language:"en-US",languages:{"en-US":{}},cascades:["en-US"]}; |
|||
var b;MooTools.lang=new Events();$extend(MooTools.lang,{setLanguage:function(c){if(!a.languages[c]){return this;}a.language=c;this.load();this.fireEvent("langChange",c); |
|||
return this;},load:function(){var c=this.cascade(this.getCurrentLanguage());b={};$each(c,function(e,d){b[d]=this.lambda(e);},this);},getCurrentLanguage:function(){return a.language; |
|||
},addLanguage:function(c){a.languages[c]=a.languages[c]||{};return this;},cascade:function(e){var c=(a.languages[e]||{}).cascades||[];c.combine(a.cascades); |
|||
c.erase(e).push(e);var d=c.map(function(f){return a.languages[f];},this);return $merge.apply(this,d);},lambda:function(c){(c||{}).get=function(e,d){return $lambda(c[e]).apply(this,$splat(d)); |
|||
};return c;},get:function(e,d,c){if(b&&b[e]){return(d?b[e].get(d,c):b[e]);}},set:function(d,e,c){this.addLanguage(d);langData=a.languages[d];if(!langData[e]){langData[e]={}; |
|||
}$extend(langData[e],c);if(d==this.getCurrentLanguage()){this.load();this.fireEvent("langChange",d);}return this;},list:function(){return Hash.getKeys(a.languages); |
|||
}});})();(function(){var i=this.Date;if(!i.now){i.now=$time;}i.Methods={ms:"Milliseconds",year:"FullYear",min:"Minutes",mo:"Month",sec:"Seconds",hr:"Hours"}; |
|||
["Date","Day","FullYear","Hours","Milliseconds","Minutes","Month","Seconds","Time","TimezoneOffset","Week","Timezone","GMTOffset","DayOfYear","LastMonth","LastDayOfMonth","UTCDate","UTCDay","UTCFullYear","AMPM","Ordinal","UTCHours","UTCMilliseconds","UTCMinutes","UTCMonth","UTCSeconds"].each(function(p){i.Methods[p.toLowerCase()]=p; |
|||
});var d=function(q,p){return new Array(p-String(q).length+1).join("0")+q;};i.implement({set:function(t,r){switch($type(t)){case"object":for(var s in t){this.set(s,t[s]); |
|||
}break;case"string":t=t.toLowerCase();var q=i.Methods;if(q[t]){this["set"+q[t]](r);}}return this;},get:function(q){q=q.toLowerCase();var p=i.Methods;if(p[q]){return this["get"+p[q]](); |
|||
}return null;},clone:function(){return new i(this.get("time"));},increment:function(p,r){p=p||"day";r=$pick(r,1);switch(p){case"year":return this.increment("month",r*12); |
|||
case"month":var q=this.get("date");this.set("date",1).set("mo",this.get("mo")+r);return this.set("date",q.min(this.get("lastdayofmonth")));case"week":return this.increment("day",r*7); |
|||
case"day":return this.set("date",this.get("date")+r);}if(!i.units[p]){throw new Error(p+" is not a supported interval");}return this.set("time",this.get("time")+r*i.units[p]()); |
|||
},decrement:function(p,q){return this.increment(p,-1*$pick(q,1));},isLeapYear:function(){return i.isLeapYear(this.get("year"));},clearTime:function(){return this.set({hr:0,min:0,sec:0,ms:0}); |
|||
},diff:function(q,p){if($type(q)=="string"){q=i.parse(q);}return((q-this)/i.units[p||"day"](3,3)).toInt();},getLastDayOfMonth:function(){return i.daysInMonth(this.get("mo"),this.get("year")); |
|||
},getDayOfYear:function(){return(i.UTC(this.get("year"),this.get("mo"),this.get("date")+1)-i.UTC(this.get("year"),0,1))/i.units.day();},getWeek:function(){return(this.get("dayofyear")/7).ceil(); |
|||
},getOrdinal:function(p){return i.getMsg("ordinal",p||this.get("date"));},getTimezone:function(){return this.toString().replace(/^.*? ([A-Z]{3}).[0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3"); |
|||
},getGMTOffset:function(){var p=this.get("timezoneOffset");return((p>0)?"-":"+")+d((p.abs()/60).floor(),2)+d(p%60,2);},setAMPM:function(p){p=p.toUpperCase(); |
|||
var q=this.get("hr");if(q>11&&p=="AM"){return this.decrement("hour",12);}else{if(q<12&&p=="PM"){return this.increment("hour",12);}}return this;},getAMPM:function(){return(this.get("hr")<12)?"AM":"PM"; |
|||
},parse:function(p){this.set("time",i.parse(p));return this;},isValid:function(p){return !!(p||this).valueOf();},format:function(p){if(!this.isValid()){return"invalid date"; |
|||
}p=p||"%x %X";p=k[p.toLowerCase()]||p;var q=this;return p.replace(/%([a-z%])/gi,function(s,r){switch(r){case"a":return i.getMsg("days")[q.get("day")].substr(0,3); |
|||
case"A":return i.getMsg("days")[q.get("day")];case"b":return i.getMsg("months")[q.get("month")].substr(0,3);case"B":return i.getMsg("months")[q.get("month")]; |
|||
case"c":return q.toString();case"d":return d(q.get("date"),2);case"H":return d(q.get("hr"),2);case"I":return((q.get("hr")%12)||12);case"j":return d(q.get("dayofyear"),3); |
|||
case"m":return d((q.get("mo")+1),2);case"M":return d(q.get("min"),2);case"o":return q.get("ordinal");case"p":return i.getMsg(q.get("ampm"));case"S":return d(q.get("seconds"),2); |
|||
case"U":return d(q.get("week"),2);case"w":return q.get("day");case"x":return q.format(i.getMsg("shortDate"));case"X":return q.format(i.getMsg("shortTime")); |
|||
case"y":return q.get("year").toString().substr(2);case"Y":return q.get("year");case"T":return q.get("GMTOffset");case"Z":return q.get("Timezone");}return r; |
|||
});},toISOString:function(){return this.format("iso8601");}});i.alias("toISOString","toJSON");i.alias("diff","compare");i.alias("format","strftime");var k={db:"%Y-%m-%d %H:%M:%S",compact:"%Y%m%dT%H%M%S",iso8601:"%Y-%m-%dT%H:%M:%S%T",rfc822:"%a, %d %b %Y %H:%M:%S %Z","short":"%d %b %H:%M","long":"%B %d, %Y %H:%M"}; |
|||
var g=[];var e=i.parse;var n=function(s,u,r){var q=-1;var t=i.getMsg(s+"s");switch($type(u)){case"object":q=t[u.get(s)];break;case"number":q=t[month-1]; |
|||
if(!q){throw new Error("Invalid "+s+" index: "+index);}break;case"string":var p=t.filter(function(v){return this.test(v);},new RegExp("^"+u,"i"));if(!p.length){throw new Error("Invalid "+s+" string"); |
|||
}if(p.length>1){throw new Error("Ambiguous "+s);}q=p[0];}return(r)?t.indexOf(q):q;};i.extend({getMsg:function(q,p){return MooTools.lang.get("Date",q,p); |
|||
},units:{ms:$lambda(1),second:$lambda(1000),minute:$lambda(60000),hour:$lambda(3600000),day:$lambda(86400000),week:$lambda(608400000),month:function(q,p){var r=new i; |
|||
return i.daysInMonth($pick(q,r.get("mo")),$pick(p,r.get("year")))*86400000;},year:function(p){p=p||new i().get("year");return i.isLeapYear(p)?31622400000:31536000000; |
|||
}},daysInMonth:function(q,p){return[31,i.isLeapYear(p)?29:28,31,30,31,30,31,31,30,31,30,31][q];},isLeapYear:function(p){return((p%4===0)&&(p%100!==0))||(p%400===0); |
|||
},parse:function(r){var q=$type(r);if(q=="number"){return new i(r);}if(q!="string"){return r;}r=r.clean();if(!r.length){return null;}var p;g.some(function(t){var s=t.re.exec(r); |
|||
return(s)?(p=t.handler(s)):false;});return p||new i(e(r));},parseDay:function(p,q){return n("day",p,q);},parseMonth:function(q,p){return n("month",q,p); |
|||
},parseUTC:function(q){var p=new i(q);var r=i.UTC(p.get("year"),p.get("mo"),p.get("date"),p.get("hr"),p.get("min"),p.get("sec"));return new i(r);},orderIndex:function(p){return i.getMsg("dateOrder").indexOf(p)+1; |
|||
},defineFormat:function(p,q){k[p]=q;},defineFormats:function(p){for(var q in p){i.defineFormat(q,p[q]);}},parsePatterns:g,defineParser:function(p){g.push((p.re&&p.handler)?p:l(p)); |
|||
},defineParsers:function(){Array.flatten(arguments).each(i.defineParser);},define2DigitYearStart:function(p){h=p%100;m=p-h;}});var m=1900;var h=70;var j=function(p){return new RegExp("(?:"+i.getMsg(p).map(function(q){return q.substr(0,3); |
|||
}).join("|")+")[a-z]*");};var a=function(p){switch(p){case"x":return((i.orderIndex("month")==1)?"%m[.-/]%d":"%d[.-/]%m")+"([.-/]%y)?";case"X":return"%H([.:]%M)?([.:]%S([.:]%s)?)? ?%p? ?%T?"; |
|||
}return null;};var o={d:/[0-2]?[0-9]|3[01]/,H:/[01]?[0-9]|2[0-3]/,I:/0?[1-9]|1[0-2]/,M:/[0-5]?\d/,s:/\d+/,o:/[a-z]*/,p:/[ap]\.?m\.?/,y:/\d{2}|\d{4}/,Y:/\d{4}/,T:/Z|[+-]\d{2}(?::?\d{2})?/}; |
|||
o.m=o.I;o.S=o.M;var c;var b=function(p){c=p;o.a=o.A=j("days");o.b=o.B=j("months");g.each(function(r,q){if(r.format){g[q]=l(r.format);}});};var l=function(r){if(!c){return{format:r}; |
|||
}var p=[];var q=(r.source||r).replace(/%([a-z])/gi,function(t,s){return a(s)||t;}).replace(/\((?!\?)/g,"(?:").replace(/ (?!\?|\*)/g,",? ").replace(/%([a-z%])/gi,function(t,s){var u=o[s]; |
|||
if(!u){return s;}p.push(s);return"("+u.source+")";}).replace(/\[a-z\]/gi,"[a-z\\u00c0-\\uffff]");return{format:r,re:new RegExp("^"+q+"$","i"),handler:function(u){u=u.slice(1).associate(p); |
|||
var s=new i().clearTime();if("d" in u){f.call(s,"d",1);}if("m" in u){f.call(s,"m",1);}for(var t in u){f.call(s,t,u[t]);}return s;}};};var f=function(p,q){if(!q){return this; |
|||
}switch(p){case"a":case"A":return this.set("day",i.parseDay(q,true));case"b":case"B":return this.set("mo",i.parseMonth(q,true));case"d":return this.set("date",q); |
|||
case"H":case"I":return this.set("hr",q);case"m":return this.set("mo",q-1);case"M":return this.set("min",q);case"p":return this.set("ampm",q.replace(/\./g,"")); |
|||
case"S":return this.set("sec",q);case"s":return this.set("ms",("0."+q)*1000);case"w":return this.set("day",q);case"Y":return this.set("year",q);case"y":q=+q; |
|||
if(q<100){q+=m+(q<h?100:0);}return this.set("year",q);case"T":if(q=="Z"){q="+00";}var r=q.match(/([+-])(\d{2}):?(\d{2})?/);r=(r[1]+"1")*(r[2]*60+(+r[3]||0))+this.getTimezoneOffset(); |
|||
return this.set("time",this-r*60000);}return this;};i.defineParsers("%Y([-./]%m([-./]%d((T| )%X)?)?)?","%Y%m%d(T%H(%M%S?)?)?","%x( %X)?","%d%o( %b( %Y)?)?( %X)?","%b( %d%o)?( %Y)?( %X)?","%Y %b( %d%o( %X)?)?","%o %b %d %X %T %Y"); |
|||
MooTools.lang.addEvent("langChange",function(p){if(MooTools.lang.get("Date")){b(p);}}).fireEvent("langChange",MooTools.lang.getCurrentLanguage());})(); |
|||
Date.implement({timeDiffInWords:function(a){return Date.distanceOfTimeInWords(this,a||new Date);},timeDiff:function(g,b){if(g==null){g=new Date;}var f=((g-this)/1000).toInt(); |
|||
if(!f){return"0s";}var a={s:60,m:60,h:24,d:365,y:0};var e,d=[];for(var c in a){if(!f){break;}if((e=a[c])){d.unshift((f%e)+c);f=(f/e).toInt();}else{d.unshift(f+c); |
|||
}}return d.join(b||":");}});Date.alias("timeDiffInWords","timeAgoInWords");Date.extend({distanceOfTimeInWords:function(b,a){return Date.getTimePhrase(((a-b)/1000).toInt()); |
|||
},getTimePhrase:function(f){var d=(f<0)?"Until":"Ago";if(f<0){f*=-1;}var b={minute:60,hour:60,day:24,week:7,month:52/12,year:12,eon:Infinity};var e="lessThanMinute"; |
|||
for(var c in b){var a=b[c];if(f<1.5*a){if(f>0.75*a){e=c;}break;}f/=a;e=c+"s";}return Date.getMsg(e+d).substitute({delta:f.round()});}});Date.defineParsers({re:/^(?:tod|tom|yes)/i,handler:function(a){var b=new Date().clearTime(); |
|||
switch(a[0]){case"tom":return b.increment();case"yes":return b.decrement();default:return b;}}},{re:/^(next|last) ([a-z]+)$/i,handler:function(e){var f=new Date().clearTime(); |
|||
var b=f.getDay();var c=Date.parseDay(e[2],true);var a=c-b;if(c<=b){a+=7;}if(e[1]=="last"){a-=7;}return f.set("date",f.getDate()+a);}});Element.implement({measure:function(e){var g=function(h){return !!(!h||h.offsetHeight||h.offsetWidth); |
|||
};if(g(this)){return e.apply(this);}var d=this.getParent(),f=[],b=[];while(!g(d)&&d!=document.body){b.push(d.expose());d=d.getParent();}var c=this.expose(); |
|||
var a=e.apply(this);c();b.each(function(h){h();});return a;},expose:function(){if(this.getStyle("display")!="none"){return $empty;}var a=this.style.cssText; |
|||
this.setStyles({display:"block",position:"absolute",visibility:"hidden"});return function(){this.style.cssText=a;}.bind(this);},getDimensions:function(a){a=$merge({computeSize:false},a); |
|||
var f={};var d=function(g,e){return(e.computeSize)?g.getComputedSize(e):g.getSize();};var b=this.getParent("body");if(b&&this.getStyle("display")=="none"){f=this.measure(function(){return d(this,a); |
|||
});}else{if(b){try{f=d(this,a);}catch(c){}}else{f={x:0,y:0};}}return $chk(f.x)?$extend(f,{width:f.x,height:f.y}):$extend(f,{x:f.width,y:f.height});},getComputedSize:function(a){a=$merge({styles:["padding","border"],plains:{height:["top","bottom"],width:["left","right"]},mode:"both"},a); |
|||
var c={width:0,height:0};switch(a.mode){case"vertical":delete c.width;delete a.plains.width;break;case"horizontal":delete c.height;delete a.plains.height; |
|||
break;}var b=[];$each(a.plains,function(g,f){g.each(function(h){a.styles.each(function(i){b.push((i=="border")?i+"-"+h+"-width":i+"-"+h);});});});var e={}; |
|||
b.each(function(f){e[f]=this.getComputedStyle(f);},this);var d=[];$each(a.plains,function(g,f){var h=f.capitalize();c["total"+h]=c["computed"+h]=0;g.each(function(i){c["computed"+i.capitalize()]=0; |
|||
b.each(function(k,j){if(k.test(i)){e[k]=e[k].toInt()||0;c["total"+h]=c["total"+h]+e[k];c["computed"+i.capitalize()]=c["computed"+i.capitalize()]+e[k];}if(k.test(i)&&f!=k&&(k.test("border")||k.test("padding"))&&!d.contains(k)){d.push(k); |
|||
c["computed"+h]=c["computed"+h]-e[k];}});});});["Width","Height"].each(function(g){var f=g.toLowerCase();if(!$chk(c[f])){return;}c[f]=c[f]+this["offset"+g]+c["computed"+g]; |
|||
c["total"+g]=c[f]+c["total"+g];delete c["computed"+g];},this);return $extend(e,c);}});Element.implement({isDisplayed:function(){return this.getStyle("display")!="none"; |
|||
},isVisible:function(){var a=this.offsetWidth,b=this.offsetHeight;return(a==0&&b==0)?false:(a>0&&b>0)?true:this.isDisplayed();},toggle:function(){return this[this.isDisplayed()?"hide":"show"](); |
|||
},hide:function(){var b;try{if((b=this.getStyle("display"))=="none"){b=null;}}catch(a){}return this.store("originalDisplay",b||"block").setStyle("display","none"); |
|||
},show:function(a){return this.setStyle("display",a||this.retrieve("originalDisplay")||"block");},swapClass:function(a,b){return this.removeClass(a).addClass(b); |
|||
}});Fx.Reveal=new Class({Extends:Fx.Morph,options:{link:"cancel",styles:["padding","border","margin"],transitionOpacity:!Browser.Engine.trident4,mode:"vertical",display:"block",hideInputs:Browser.Engine.trident?"select, input, textarea, object, embed":false},dissolve:function(){try{if(!this.hiding&&!this.showing){if(this.element.getStyle("display")!="none"){this.hiding=true; |
|||
this.showing=false;this.hidden=true;this.cssText=this.element.style.cssText;var d=this.element.getComputedSize({styles:this.options.styles,mode:this.options.mode}); |
|||
this.element.setStyle("display","block");if(this.options.transitionOpacity){d.opacity=1;}var b={};$each(d,function(f,e){b[e]=[f,0];},this);this.element.setStyle("overflow","hidden"); |
|||
var a=this.options.hideInputs?this.element.getElements(this.options.hideInputs):null;this.$chain.unshift(function(){if(this.hidden){this.hiding=false;$each(d,function(f,e){d[e]=f; |
|||
},this);this.element.style.cssText=this.cssText;this.element.setStyle("display","none");if(a){a.setStyle("visibility","visible");}}this.fireEvent("hide",this.element); |
|||
this.callChain();}.bind(this));if(a){a.setStyle("visibility","hidden");}this.start(b);}else{this.callChain.delay(10,this);this.fireEvent("complete",this.element); |
|||
this.fireEvent("hide",this.element);}}else{if(this.options.link=="chain"){this.chain(this.dissolve.bind(this));}else{if(this.options.link=="cancel"&&!this.hiding){this.cancel(); |
|||
this.dissolve();}}}}catch(c){this.hiding=false;this.element.setStyle("display","none");this.callChain.delay(10,this);this.fireEvent("complete",this.element); |
|||
this.fireEvent("hide",this.element);}return this;},reveal:function(){try{if(!this.showing&&!this.hiding){if(this.element.getStyle("display")=="none"||this.element.getStyle("visiblity")=="hidden"||this.element.getStyle("opacity")==0){this.showing=true; |
|||
this.hiding=this.hidden=false;var d;this.cssText=this.element.style.cssText;this.element.measure(function(){d=this.element.getComputedSize({styles:this.options.styles,mode:this.options.mode}); |
|||
}.bind(this));$each(d,function(f,e){d[e]=f;});if($chk(this.options.heightOverride)){d.height=this.options.heightOverride.toInt();}if($chk(this.options.widthOverride)){d.width=this.options.widthOverride.toInt(); |
|||
}if(this.options.transitionOpacity){this.element.setStyle("opacity",0);d.opacity=1;}var b={height:0,display:this.options.display};$each(d,function(f,e){b[e]=0; |
|||
});this.element.setStyles($merge(b,{overflow:"hidden"}));var a=this.options.hideInputs?this.element.getElements(this.options.hideInputs):null;if(a){a.setStyle("visibility","hidden"); |
|||
}this.start(d);this.$chain.unshift(function(){this.element.style.cssText=this.cssText;this.element.setStyle("display",this.options.display);if(!this.hidden){this.showing=false; |
|||
}if(a){a.setStyle("visibility","visible");}this.callChain();this.fireEvent("show",this.element);}.bind(this));}else{this.callChain();this.fireEvent("complete",this.element); |
|||
this.fireEvent("show",this.element);}}else{if(this.options.link=="chain"){this.chain(this.reveal.bind(this));}else{if(this.options.link=="cancel"&&!this.showing){this.cancel(); |
|||
this.reveal();}}}}catch(c){this.element.setStyles({display:this.options.display,visiblity:"visible",opacity:1});this.showing=false;this.callChain.delay(10,this); |
|||
this.fireEvent("complete",this.element);this.fireEvent("show",this.element);}return this;},toggle:function(){if(this.element.getStyle("display")=="none"||this.element.getStyle("visiblity")=="hidden"||this.element.getStyle("opacity")==0){this.reveal(); |
|||
}else{this.dissolve();}return this;},cancel:function(){this.parent.apply(this,arguments);this.element.style.cssText=this.cssText;this.hidding=false;this.showing=false; |
|||
}});Element.Properties.reveal={set:function(a){var b=this.retrieve("reveal");if(b){b.cancel();}return this.eliminate("reveal").store("reveal:options",a); |
|||
},get:function(a){if(a||!this.retrieve("reveal")){if(a||!this.retrieve("reveal:options")){this.set("reveal",a);}this.store("reveal",new Fx.Reveal(this,this.retrieve("reveal:options"))); |
|||
}return this.retrieve("reveal");}};Element.Properties.dissolve=Element.Properties.reveal;Element.implement({reveal:function(a){this.get("reveal",a).reveal(); |
|||
return this;},dissolve:function(a){this.get("reveal",a).dissolve();return this;},nix:function(){var a=Array.link(arguments,{destroy:Boolean.type,options:Object.type}); |
|||
this.get("reveal",a.options).dissolve().chain(function(){this[a.destroy?"destroy":"dispose"]();}.bind(this));return this;},wink:function(){var b=Array.link(arguments,{duration:Number.type,options:Object.type}); |
|||
var a=this.get("reveal",b.options);a.reveal().chain(function(){(function(){a.dissolve();}).delay(b.duration||2000);});}});MooTools.lang.set("en-US","Date",{months:["January","February","March","April","May","June","July","August","September","October","November","December"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dateOrder:["month","date","year"],shortDate:"%m/%d/%Y",shortTime:"%I:%M%p",AM:"AM",PM:"PM",ordinal:function(a){return(a>3&&a<21)?"th":["th","st","nd","rd","th"][Math.min(a%10,4)]; |
|||
},lessThanMinuteAgo:"less than a minute ago",minuteAgo:"about a minute ago",minutesAgo:"{delta} minutes ago",hourAgo:"about an hour ago",hoursAgo:"about {delta} hours ago",dayAgo:"1 day ago",daysAgo:"{delta} days ago",weekAgo:"1 week ago",weeksAgo:"{delta} weeks ago",monthAgo:"1 month ago",monthsAgo:"{delta} months ago",yearAgo:"1 year ago",yearsAgo:"{delta} years ago",lessThanMinuteUntil:"less than a minute from now",minuteUntil:"about a minute from now",minutesUntil:"{delta} minutes from now",hourUntil:"about an hour from now",hoursUntil:"about {delta} hours from now",dayUntil:"1 day from now",daysUntil:"{delta} days from now",weekUntil:"1 week from now",weeksUntil:"{delta} weeks from now",monthUntil:"1 month from now",monthsUntil:"{delta} months from now",yearUntil:"1 year from now",yearsUntil:"{delta} years from now"}); |
@ -1,76 +0,0 @@ |
|||
window.addEvent('domready', function() { |
|||
codeblocks = $$('div.highlight'); |
|||
codeblocks.each(addExpander); |
|||
}); |
|||
|
|||
window.addEvents({ |
|||
domready: function(){ |
|||
if(twitter_user){ |
|||
new Request.Twitter(twitter_user, { |
|||
include_replies: false, |
|||
data: { count: 3 }, |
|||
onSuccess: function(tweets){ |
|||
$('tweets').empty(); |
|||
for (var i = tweets.length; i--; ){ |
|||
new Element('li', { |
|||
'class': 'tweet' |
|||
}).adopt( |
|||
new Element('p', { 'html': tweets[i].text+' ' }).adopt( |
|||
new Element('a', { |
|||
'href': 'http://twitter.com/'+twitter_user+'/status/'+tweets[i].id_str, |
|||
'text': new Date(tweets[i].created_at).timeDiffInWords() |
|||
})) |
|||
).inject('tweets', 'top'); |
|||
} |
|||
} |
|||
}).send(); |
|||
} |
|||
$$('#recent_posts time').each(function(date){ |
|||
date.set('text', new Date(date.get('text')).timeDiffInWords()); |
|||
}); |
|||
}, |
|||
}); |
|||
|
|||
|
|||
function addExpander(div){ |
|||
new Element('span',{ |
|||
html: 'expand »', |
|||
'class': 'pre_expander', |
|||
'events': { |
|||
'click': function(){ |
|||
toggleExpander(this); |
|||
} |
|||
} |
|||
}).inject(div, 'top'); |
|||
} |
|||
function toggleExpander(expander){ |
|||
var html = ''; |
|||
var expanderPos = expander.getPosition().y; |
|||
if($('page').toggleClass('expanded').hasClass('expanded')) |
|||
html = '« contract'; |
|||
else |
|||
html = 'expand »'; |
|||
$$('div.highlight span.pre_expander').each(function(span){ |
|||
span.set('html',html); |
|||
}); |
|||
fixScroll(expander, expanderPos); |
|||
} |
|||
function fixScroll(el, position){ |
|||
pos = el.getPosition().y - position; |
|||
window.scrollTo(window.getScroll().x ,window.getScroll().y + pos); |
|||
} |
|||
function enableCompressedLayout(codeblocks){ |
|||
if(!codeblocks.length) return; |
|||
new Element('span',{ |
|||
html: 'Collapse layout', |
|||
'id': 'collapser', |
|||
'events': { |
|||
'click': function(){ |
|||
if($('page').toggleClass('collapsed').hasClass('collapsed')) |
|||
this.set('html','Expand layout'); |
|||
else |
|||
this.set('html','Collapse layout'); |
|||
} |
|||
} |
|||
}).inject($('main'), 'top'); |
|||
} |
@ -1,52 +1,70 @@ |
|||
Request.Twitter = new Class({ |
|||
/* http://www.JSON.org/json2.js 2009-09-29 Public Domain. NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. See http://www.JSON.org/js.html */ |
|||
if(!this.JSON){this.JSON={}}(function(){function l(c){return c<10?'0'+c:c}if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(c){return isFinite(this.valueOf())?this.getUTCFullYear()+'-'+l(this.getUTCMonth()+1)+'-'+l(this.getUTCDate())+'T'+l(this.getUTCHours())+':'+l(this.getUTCMinutes())+':'+l(this.getUTCSeconds())+'Z':null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(c){return this.valueOf()}}var o=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,p=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,h,m,r={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},j;function q(a){p.lastIndex=0;return p.test(a)?'"'+a.replace(p,function(c){var f=r[c];return typeof f==='string'?f:'\\u'+('0000'+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function n(c,f){var a,e,d,i,k=h,g,b=f[c];if(b&&typeof b==='object'&&typeof b.toJSON==='function'){b=b.toJSON(c)}if(typeof j==='function'){b=j.call(f,c,b)}switch(typeof b){case'string':return q(b);case'number':return isFinite(b)?String(b):'null';case'boolean':case'null':return String(b);case'object':if(!b){return'null'}h+=m;g=[];if(Object.prototype.toString.apply(b)==='[object Array]'){i=b.length;for(a=0;a<i;a+=1){g[a]=n(a,b)||'null'}d=g.length===0?'[]':h?'[\n'+h+g.join(',\n'+h)+'\n'+k+']':'['+g.join(',')+']';h=k;return d}if(j&&typeof j==='object'){i=j.length;for(a=0;a<i;a+=1){e=j[a];if(typeof e==='string'){d=n(e,b);if(d){g.push(q(e)+(h?': ':':')+d)}}}}else{for(e in b){if(Object.hasOwnProperty.call(b,e)){d=n(e,b);if(d){g.push(q(e)+(h?': ':':')+d)}}}}d=g.length===0?'{}':h?'{\n'+h+g.join(',\n'+h)+'\n'+k+'}':'{'+g.join(',')+'}';h=k;return d}}if(typeof JSON.stringify!=='function'){JSON.stringify=function(c,f,a){var e;h='';m='';if(typeof a==='number'){for(e=0;e<a;e+=1){m+=' '}}else if(typeof a==='string'){m=a}j=f;if(f&&typeof f!=='function'&&(typeof f!=='object'||typeof f.length!=='number')){throw new Error('JSON.stringify');}return n('',{'':c})}}if(typeof JSON.parse!=='function'){JSON.parse=function(i,k){var g;function b(c,f){var a,e,d=c[f];if(d&&typeof d==='object'){for(a in d){if(Object.hasOwnProperty.call(d,a)){e=b(d,a);if(e!==undefined){d[a]=e}else{delete d[a]}}}}return k.call(c,f,d)}o.lastIndex=0;if(o.test(i)){i=i.replace(o,function(c){return'\\u'+('0000'+c.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(i.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){g=eval('('+i+')');return typeof k==='function'?b({'':g},''):g}throw new SyntaxError('JSON.parse');}}}()); |
|||
|
|||
Extends: Request.JSONP, |
|||
// jXHR.js (JSON-P XHR) | v0.1 (c) Kyle Simpson | MIT License
|
|||
(function(c){var b=c.setTimeout,d=c.document,a=0;c.jXHR=function(){var e,g,n,h,m=null;function l(){try{h.parentNode.removeChild(h)}catch(o){}}function k(){g=false;e="";l();h=null;i(0)}function f(p){try{m.onerror.call(m,p,e)}catch(o){throw new Error(p)}}function j(){if((this.readyState&&this.readyState!=="complete"&&this.readyState!=="loaded")||g){return}this.onload=this.onreadystatechange=null;g=true;if(m.readyState!==4){f("Script failed to load ["+e+"].")}l()}function i(o,p){p=p||[];m.readyState=o;if(typeof m.onreadystatechange==="function"){m.onreadystatechange.apply(m,p)}}m={onerror:null,onreadystatechange:null,readyState:0,open:function(p,o){k();internal_callback="cb"+(a++);(function(q){c.jXHR[q]=function(){try{i.call(m,4,arguments)}catch(r){m.readyState=-1;f("Script failed to run ["+e+"].")}c.jXHR[q]=null}})(internal_callback);e=o.replace(/=\?/,"=jXHR."+internal_callback);i(1)},send:function(){b(function(){h=d.createElement("script");h.setAttribute("type","text/javascript");h.onload=h.onreadystatechange=function(){j.call(h)};h.setAttribute("src",e);d.getElementsByTagName("head")[0].appendChild(h)},0);i(2)},setRequestHeader:function(){},getResponseHeader:function(){return""},getAllResponseHeaders:function(){return[]}};k();return m}})(window); |
|||
|
|||
options: { |
|||
linkify: true, |
|||
url: 'http://twitter.com/statuses/user_timeline/{term}.json', |
|||
include_replies: true, |
|||
data: { |
|||
count: 5, |
|||
trim_user: true |
|||
function getTwitterFeed(success, user, count, replies) { |
|||
feed = new jXHR(); |
|||
feed.onerror = function (msg,url) { alert(msg); } |
|||
feed.onreadystatechange = function(data){ |
|||
if (feed.readyState === 4) { |
|||
var tweets = new Array(); |
|||
for (i in data){ |
|||
if(tweets.length < count){ |
|||
if(replies || data[i].in_reply_to_user_id == null){ |
|||
tweets.push(data[i]); |
|||
} |
|||
} |
|||
} |
|||
success(tweets); |
|||
} |
|||
}, |
|||
}; |
|||
feed.open("GET","http://twitter.com/statuses/user_timeline/"+user+".json?trim_user=true&count="+parseInt(count)+25+"&callback=?"); |
|||
feed.send(); |
|||
} |
|||
|
|||
initialize: function(term, options){ |
|||
this.parent(options); |
|||
if(this.options.include_replies == false){ |
|||
this.options.count = this.options.data.count |
|||
this.options.data.count += 30; // adds 30 tweets to request for filtering
|
|||
} |
|||
this.options.url = this.options.url.substitute({term: term}); |
|||
console.log(this.options.url); |
|||
}, |
|||
|
|||
success: function(args, index){ |
|||
if(!this.options.include_replies){ |
|||
args[0] = args[0].filter(function(item, index, array){ |
|||
return item.in_reply_to_screen_name == null; |
|||
}); |
|||
if(args[0].length > this.options.count){ args[0].length = this.options.count; } |
|||
} |
|||
var data = args[0]; |
|||
|
|||
if (this.options.linkify) data.each(function(tweet){ |
|||
tweet.text = this.linkify(tweet.text); |
|||
}, this); |
|||
|
|||
if (data[0]) this.options.data.since_id = data[0].id; // keep subsequent calls newer
|
|||
|
|||
this.parent(args, index); |
|||
}, |
|||
getTwitterFeed(showTwitterFeed, twitter_user, tweet_count, show_replies); |
|||
|
|||
linkify: function(text){ |
|||
// modified from TwitterGitter by David Walsh (davidwalsh.name)
|
|||
// courtesy of Jeremy Parrish (rrish.org)
|
|||
return text.replace(/(https?:\/\/[\w\-:;?&=+.%#\/]+)/gi, '<a href="$1">$1</a>') |
|||
.replace(/(^|\W)@(\w+)/g, '$1<a href="http://twitter.com/$2">@$2</a>') |
|||
.replace(/(^|\W)#(\w+)/g, '$1#<a href="http://search.twitter.com/search?q=%23$2">$2</a>'); |
|||
function showTwitterFeed(tweets){ |
|||
var timeline = document.getElementById('tweets'); |
|||
timeline.innerHTML=''; |
|||
for (t in tweets){ |
|||
timeline.innerHTML+='<li>'+'<p>'+linkifyTweet(tweets[t].text)+'<a href="http://twitter.com/'+twitter_user+'/status/'+tweets[t].id_str+'">'+prettyDate(tweets[t].created_at)+'</a></p>'+'</li>'; |
|||
} |
|||
} |
|||
function linkifyTweet(text){ |
|||
return text.replace(/(https?:\/\/[\w\-:;?&=+.%#\/]+)/gi, '<a href="$1">$1</a>') |
|||
.replace(/(^|\W)@(\w+)/g, '$1<a href="http://twitter.com/$2">@$2</a>') |
|||
.replace(/(^|\W)#(\w+)/g, '$1#<a href="http://search.twitter.com/search?q=%23$2">$2</a>'); |
|||
} |
|||
|
|||
}); |
|||
|
|||
function prettyDate(date_str){ |
|||
var time_formats = [ |
|||
[60, 'just now', 1], // 60
|
|||
[120, '1 min', '1 minute from now'], // 60*2
|
|||
[3600, 'mins', 60], // 60*60, 60
|
|||
[7200, '1 hour', '1 hour from now'], // 60*60*2
|
|||
[86400, 'hours', 3600], // 60*60*24, 60*60
|
|||
[172800, '1 day', 'tomorrow'], // 60*60*24*2
|
|||
[2903040000, 'days', 86400], // 60*60*24*7, 60*60*24
|
|||
]; |
|||
var time = ('' + date_str).replace(/-/g,"/").replace(/[TZ]/g," ").replace(/^\s\s*/, '').replace(/\s\s*$/, ''); |
|||
if(time.substr(time.length-4,1)==".") time =time.substr(0,time.length-4); |
|||
var seconds = (new Date - new Date(time)) / 1000; |
|||
var token = 'ago', list_choice = 1; |
|||
if (seconds < 0) { |
|||
seconds = Math.abs(seconds); |
|||
token = 'from now'; |
|||
list_choice = 2; |
|||
} |
|||
var i = 0, format; |
|||
while (format = time_formats[i++]) |
|||
if (seconds < format[0]) { |
|||
if (typeof format[2] == 'string') |
|||
return format[list_choice]; |
|||
else |
|||
return Math.floor(seconds / format[2]) + ' ' + format[1]; |
|||
} |
|||
return time; |
|||
}; |
|||
|
@ -1,35 +1,35 @@ |
|||
<?xml version="1.0" encoding="UTF-8"?> |
|||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> |
|||
<url> |
|||
<loc>http://recursive-design.com/about.haml</loc> |
|||
<lastmod>2009-11-24</lastmod> |
|||
<loc>http://yoursite.com/about.haml</loc> |
|||
<lastmod>2011-05-14</lastmod> |
|||
</url> |
|||
<url> |
|||
<loc>http://recursive-design.com/atom.xml</loc> |
|||
<lastmod>2011-03-13</lastmod> |
|||
<loc>http://yoursite.com/atom.xml</loc> |
|||
<lastmod>2011-05-12</lastmod> |
|||
</url> |
|||
<url> |
|||
<loc>http://recursive-design.com/</loc> |
|||
<lastmod>2011-04-08</lastmod> |
|||
<loc>http://yoursite.com/</loc> |
|||
<lastmod>2011-05-12</lastmod> |
|||
</url> |
|||
<url> |
|||
<loc>http://recursive-design.com/test/syntax.html</loc> |
|||
<loc>http://yoursite.com/test/syntax.html</loc> |
|||
<lastmod>2010-04-10</lastmod> |
|||
</url> |
|||
<url> |
|||
<loc>http://recursive-design.com/test/typography.haml</loc> |
|||
<lastmod>2009-11-24</lastmod> |
|||
<loc>http://yoursite.com/test/typography.haml</loc> |
|||
<lastmod>2011-05-14</lastmod> |
|||
</url> |
|||
<url> |
|||
<loc>http://recursive-design.com/2011/04/07/test-of-typography</loc> |
|||
<loc>http://yoursite.com/2011/04/07/test-of-typography</loc> |
|||
<lastmod>2011-04-07</lastmod> |
|||
</url> |
|||
<url> |
|||
<loc>http://recursive-design.com/2011/03/14/test-post</loc> |
|||
<loc>http://yoursite.com/2011/03/14/test-post</loc> |
|||
<lastmod>2011-03-14</lastmod> |
|||
</url> |
|||
<url> |
|||
<loc>http://recursive-design.com/2009/11/13/hello-world</loc> |
|||
<loc>http://yoursite.com/2009/11/13/hello-world</loc> |
|||
<lastmod>2009-11-13</lastmod> |
|||
</url> |
|||
</urlset> |
@ -1,5 +1,5 @@ |
|||
@import "compass"; |
|||
@import "compass/layout"; |
|||
|
|||
|
|||
@include global-reset; |
|||
|
@ -1,8 +1,8 @@ |
|||
@import "partials/shared"; |
|||
@import "partials/syntax"; |
|||
@import "partials/search"; |
|||
@import "partials/sidebar"; |
|||
@import "partials/twitter"; |
|||
//@import "partials/shared"; |
|||
//@import "partials/syntax"; |
|||
//@import "partials/search"; |
|||
//@import "partials/sidebar"; |
|||
//@import "partials/twitter"; |
|||
|
|||
/* layout partials */ |
|||
@import "partials/header"; |
@ -1,4 +1,4 @@ |
|||
@import "core/layout"; |
|||
@import "core/theme"; |
|||
@import "core/layout"; |
|||
@import "core/typography"; |
|||
//@import "partials"; |
|||
@import "partials"; |
@ -0,0 +1,94 @@ |
|||
a { |
|||
color: $link_color; |
|||
&:hover, &:focus { |
|||
color: saturate(darken($link_color, 15), 20); } |
|||
&:visited { |
|||
color: darken(adjust_hue($link_color, 70), 10); |
|||
} |
|||
} |
|||
|
|||
$min-width: 320px; |
|||
$max-width: 1440px; |
|||
$default-border-radius: 4px; |
|||
|
|||
.group { @include pie-clearfix; } |
|||
.core-layout { > div { @extend .inner-wrap; } } |
|||
|
|||
body { |
|||
> header, > nav, > footer { |
|||
@extend .core-layout; |
|||
min-width: $min-width; |
|||
} |
|||
} |
|||
|
|||
|
|||
@mixin media-layout($page-pad, $sidebar-width, $sidebar-pad) { |
|||
$side-nav: $sidebar-width - $page-pad - $sidebar-pad; |
|||
|
|||
.inner-wrap { |
|||
padding: 0 $page-pad; |
|||
position: relative; |
|||
margin: 0 auto; |
|||
max-width: $max-width; |
|||
@extend .group; |
|||
} |
|||
|
|||
body > nav + div { |
|||
@extend .group; |
|||
padding: 0; |
|||
max-width: $max-width + $page-pad*2; |
|||
margin: 0 auto; |
|||
> div { |
|||
@extend .group; |
|||
margin-right: $sidebar-width; |
|||
} |
|||
} |
|||
body > nav > div > div { width: $side-nav; |
|||
.search { width: $side-nav - 70px; } |
|||
} |
|||
|
|||
#articles { |
|||
float: left; |
|||
width: 100%; |
|||
padding-top: 25px; |
|||
padding-bottom: 25px; |
|||
> * { |
|||
padding-right: $page-pad; |
|||
padding-left: $page-pad; |
|||
} |
|||
> article { |
|||
margin-bottom: 1.5em; |
|||
padding-bottom: 1.5em; |
|||
padding-right: $page-pad; |
|||
padding-left: $page-pad; |
|||
} |
|||
+ aside { |
|||
display: block; |
|||
float: left; |
|||
width: $sidebar-width - $sidebar-pad*2; |
|||
margin: 0 -100% 0 0; |
|||
padding: $sidebar-pad; |
|||
} |
|||
} |
|||
} |
|||
|
|||
@media only screen and (min-width: 320px) { |
|||
@import "../media/480"; |
|||
} |
|||
|
|||
@media only screen and (min-width: 768px) { |
|||
@include media-layout(15px, 240px, 15px); |
|||
@import "../media/768"; |
|||
} |
|||
|
|||
@media only screen and (min-width: 992px) { |
|||
@include media-layout(40px, 320px, 30px); |
|||
@import "../media/992"; |
|||
} |
|||
|
|||
|
|||
//*{ |
|||
//transition: width .5s; |
|||
//-moz-transition: width .5s; |
|||
//-webkit-transition: margin .5s; |
|||
//} |
@ -0,0 +1,16 @@ |
|||
body { |
|||
> header, > nav, > footer { |
|||
> div { |
|||
padding-left: .5em; |
|||
padding-right: .5em; |
|||
} |
|||
} |
|||
> header { font-size: .7em; padding: .5em 0; } |
|||
} |
|||
#articles { font-size: .9em; line-height: 1.5em; |
|||
> article { padding: .5em; } |
|||
+ aside { display: none; } |
|||
} |
|||
body > nav > div > div { width: 180px; |
|||
.search { width: 110px; } |
|||
} |
@ -0,0 +1,16 @@ |
|||
body > header, body #articles { |
|||
font-size: .95em; |
|||
} |
|||
|
|||
//body { |
|||
//> header, > nav, > footer { |
|||
//> div { padding: 0 15px; } |
|||
//} |
|||
//} |
|||
//#page > div { |
|||
//margin-right: 0; |
|||
//#main { float: none; } |
|||
//> aside { margin: 0; float: none; } |
|||
//} |
|||
//page > div > aside { float: none; } |
|||
//#main > * { padding-left: 15px; padding-right: 15px; } |
@ -0,0 +1,3 @@ |
|||
body > header, body #articles { |
|||
font-size: 1.05em; |
|||
} |
@ -1,7 +1,4 @@ |
|||
article { |
|||
h2 { |
|||
padding-top: 0; |
|||
margin-bottom: 0.1em; } |
|||
.title { |
|||
text-decoration: none; |
|||
&:hover { |
@ -1,11 +1,13 @@ |
|||
body > header { |
|||
background-color: $header_bg; |
|||
border-bottom: 1px solid $header_border; |
|||
padding: 25px 0; |
|||
h1 { |
|||
display: inline-block; |
|||
margin: 0; |
|||
a, a:visited { |
|||
font-weight: normal; |
|||
color: $title_color; |
|||
text-decoration: none; } } } |
|||
text-decoration: none; |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,67 @@ |
|||
body > nav { |
|||
> div > div { |
|||
float: right; |
|||
position: relative; |
|||
padding: .45em 0 0 0; |
|||
a { |
|||
float: right; |
|||
@include replace-text-with-dimensions('rss.png'); |
|||
} |
|||
form { |
|||
margin: 0; padding: 0; |
|||
@include background-clip(padding-box); |
|||
input[type='text']{ |
|||
margin: 0; |
|||
@include border-radius(1em); |
|||
float: left; |
|||
border: 1px solid #ccc; |
|||
color: #888; |
|||
background: image-url('search.png') no-repeat .5em .4em #f6f6f6; |
|||
padding: .4em .8em .1em 1.8em; |
|||
line-height: 1.35em; |
|||
font-size: .85em; |
|||
&:focus { |
|||
color: #444; |
|||
border-color: #80b1df; |
|||
@include box-shadow(#80b1df 0 0 4px, #80b1df 0 0 3px inset); |
|||
background-color: #fff; |
|||
outline: none; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@extend .group; |
|||
position: relative; |
|||
z-index: 1; |
|||
background-color: $nav-bg; |
|||
@include background-image(linear-gradient(#fcfcfc, #f4f4f4 0.3, #dddddd)); |
|||
border: { |
|||
top: 1px solid $nav-border-top; |
|||
bottom: 1px solid $nav-border-bottom; }; |
|||
ul { |
|||
position: relative; |
|||
@include horizontal-list; |
|||
margin: 0 auto; |
|||
padding: .5em 0; |
|||
} |
|||
ul li { |
|||
padding: 0 1em; |
|||
margin: 0; |
|||
border-left: 1px solid $nav-border-left; |
|||
border-right: 1px solid $nav-border-right; |
|||
&:first-child { |
|||
border-left: none; |
|||
padding-left: 0; } |
|||
&:last-child { |
|||
border-right: 0; } |
|||
a { |
|||
display: inline-block; |
|||
color: $nav-color; |
|||
line-height: 150%; |
|||
text-decoration: none; |
|||
&:hover { |
|||
color: $nav-color-hover; |
|||
} |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,20 @@ |
|||
#articles + aside { |
|||
section { |
|||
@extend .sans-font; |
|||
font-size: .8em; |
|||
line-height: 1.5em; |
|||
margin-bottom: 1.5em; |
|||
} |
|||
ul { |
|||
margin-bottom: 0.5em; |
|||
} |
|||
li { |
|||
list-style: none; |
|||
padding: .5em 0; |
|||
margin: 0; |
|||
border-bottom: 1px solid #ddd; |
|||
p:last-child { |
|||
margin-bottom: 0; |
|||
} |
|||
} |
|||
} |
@ -1,3 +1,3 @@ |
|||
<h4>On Delicious</h4> |
|||
<h1>On Delicious</h1> |
|||
<script type="text/javascript" src="http://feeds.delicious.com/v2/js/{{ site.delicious_user }}?title=&count={{ site.delicious_count }}&sort=date&extended"></script> |
|||
<p><a href="http://delicious.com/{{ site.delicious_user }}">My Delicious Bookmarks »</a></p> |
|||
|
@ -1,5 +1,11 @@ |
|||
<div> |
|||
<a href="/atom.xml">Subscribe</a> |
|||
<form action="{{ site.simple_search }}" method="get"> |
|||
<input class="search" type="text" name="q" results="0" placeholder="Search"/> |
|||
<input type="hidden" name="q" value="site:{{ site.url | search_url }}" /> |
|||
</form> |
|||
</div> |
|||
<ul> |
|||
<li><a href="/">Blog</a></li> |
|||
<li><a href="/about/">About</a></li> |
|||
<li class="subscribe"><a href="/atom.xml">Subscribe</a></li> |
|||
</ul> |
|||
|
@ -1,3 +1,3 @@ |
|||
<h4>My Pinboard</h4> |
|||
<h1>My Pinboard</h1> |
|||
<ul id="pinboard_linkroll">Fetching linkroll...</ul> |
|||
<p><a href="http://pinboard.in/u:{{ site.pinboard_user }}">My Pinboard Bookmarks »</a></p> |
|||
|
@ -1,5 +1,13 @@ |
|||
<h4>On Twitter</h4> |
|||
<h1>Latest Tweets</h1> |
|||
<ul id="tweets"> |
|||
Status updating... |
|||
</ul> |
|||
<p>Follow <a href="http://twitter.com/#{page.twitter_user}">@{{ site.twitter_user }}</a></p> |
|||
<p>Follow <a href="http://twitter.com/{{site.twitter_user}}">@{{ site.twitter_user }}</a></p> |
|||
{% if site.twitter_user %} |
|||
<script> |
|||
var twitter_user = "{{site.twitter_user}}"; |
|||
var show_replies = {{site.show_replies}}; |
|||
var tweet_count = {{site.tweet_count}}; |
|||
</script> |
|||
<script src="/javascripts/twitter.js" type="text/javascript"></script> |
|||
{% endif %} |
|||
|
@ -1,15 +1,26 @@ |
|||
<!DOCTYPE html> |
|||
<html> |
|||
<!--[if IEMobile 7 ]><html class="no-js iem7" manifest="default.appcache?v=1"><![endif]--> |
|||
<!--[if lt IE 7 ]><html class="no-js ie6" lang="en"><![endif]--> |
|||
<!--[if IE 7 ]><html class="no-js ie7" lang="en"><![endif]--> |
|||
<!--[if IE 8 ]><html class="no-js ie8" lang="en"><![endif]--> |
|||
<!--[if (gte IE 9)|(gt IEMobile 7)|!(IEMobile)|!(IE)]><!--><html class="no-js" manifest="default.appcache?v=1" lang="en"><!--<![endif]--> |
|||
{% include head.html %} |
|||
<body id="{{ page.body_id }}"> |
|||
<body {% if page.body_id %} id="{{ page.body_id }}" {% endif %} {% if page.no_sidebar %} class="no-sidebar" {% endif %}> |
|||
<header><div>{% include header.html %}</div></header> |
|||
<nav id="nav"><div>{% include navigation.html %}</div></nav> |
|||
<div id="page"> |
|||
<nav><div>{% include navigation.html %}</div></nav> |
|||
<div> |
|||
<div> |
|||
<div id="main"><article>{{ content }}</article></div> |
|||
<aside>{% include sidebar.html %}</aside> |
|||
<div id="articles">{{ content }}</div> |
|||
{% unless page.no_sidebar %} |
|||
<aside>{% include sidebar.html %}</aside> |
|||
{% endunless %} |
|||
</div> |
|||
</div> |
|||
<footer><div>{% include footer.html %}</div></footer> |
|||
<!--[if (lt IE 9) & (!IEMobile)]> |
|||
<script src="javascripts/libs/DOMAssistantCompressed-2.8.js"></script> |
|||
<script src="javascripts/libs/selectivizr-1.0.1.js"></script> |
|||
<script src="javascripts/libs/respond.min.js"></script> |
|||
<![endif]--> |
|||
</body> |
|||
</html> |
|||
|
@ -0,0 +1,10 @@ |
|||
--- |
|||
layout: default |
|||
--- |
|||
|
|||
<article> |
|||
{% include article.html %} |
|||
{% if site.disqus_short_name %} |
|||
<div id="disqus_thread">{% include disqus_thread.html %}</div> |
|||
{% endif %} |
|||
</article> |
@ -1,13 +1,13 @@ |
|||
--- |
|||
layout: default |
|||
title: About Me |
|||
layout: page |
|||
date: May 14 2011 |
|||
--- |
|||
/ use the :mardown filter if you want to write pages with Markdown |
|||
:markdown |
|||
# About Me |
|||
|
|||
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum. |
|||
|
|||
Ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt. |
|||
|
|||
Dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent. |
|||
Dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent. |
|||
|
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 504 B |
After Width: | Height: | Size: 333 B |
Before Width: | Height: | Size: 1.0 KiB |
@ -0,0 +1,20 @@ |
|||
// https://gist.github.com/901295
|
|||
// By @mathias, @cheeaun and @jdalton
|
|||
|
|||
(function(doc) { |
|||
var addEvent = 'addEventListener', |
|||
type = 'gesturestart', |
|||
qsa = 'querySelectorAll', |
|||
scales = [1, 1], |
|||
meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : []; |
|||
function fix() { |
|||
meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1]; |
|||
doc.removeEventListener(type, fix, true); |
|||
} |
|||
if ((meta = meta[meta.length - 1]) && addEvent in doc) { |
|||
fix(); |
|||
scales = [.25, 1.6]; |
|||
doc[addEvent](type, fix, true); |
|||
} |
|||
}(document)); |
|||
|
@ -0,0 +1,8 @@ |
|||
/* |
|||
* respond.js - A small and fast polyfill for min/max-width CSS3 Media Queries |
|||
* Copyright 2011, Scott Jehl, scottjehl.com |
|||
* Dual licensed under the MIT or GPL Version 2 licenses. |
|||
* Usage: Check out the readme file or github.com/scottjehl/respond |
|||
*/ |
|||
(function(e,h){e.respond={};respond.update=function(){};respond.mediaQueriesSupported=h;if(h){return}var u=e.document,r=u.documentElement,i=[],k=[],p=[],o={},g=30,f=u.getElementsByTagName("head")[0]||r,b=f.getElementsByTagName("link"),d=[],a=function(){var B=b,w=B.length;for(var z=0;z<w;z++){var y=B[z],x=y.href,A=y.media,v=y.rel&&y.rel.toLowerCase()==="stylesheet";if(!!x&&v&&!o[x]){if(!/^([a-zA-Z]+?:(\/\/)?(www\.)?)/.test(x)||x.replace(RegExp.$1,"").split("/")[0]===e.location.host){d.push({href:x,media:A})}else{o[x]=true}}}t()},t=function(){if(d.length){var v=d.shift();n(v.href,function(w){m(w,v.href,v.media);o[v.href]=true;t()})}},m=function(G,v,x){var E=G.match(/@media ([^\{]+)\{((?!@media)[\s\S])*(?=\}[\s]*\/\*\/mediaquery\*\/)/gmi),H=E&&E.length||0,v=v.substring(0,v.lastIndexOf("/")),w=function(I){return I.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,"$1"+v+"$2$3")},y=!H&&x;if(v.length){v+="/"}if(y){H=1}for(var B=0;B<H;B++){var C;if(y){C=x;k.push(w(G))}else{C=E[B].match(/@media ([^\{]+)\{([\S\s]+?)$/)&&RegExp.$1;k.push(RegExp.$2&&w(RegExp.$2))}var z=C.split(","),F=z.length;for(var A=0;A<F;A++){var D=z[A];i.push({media:D.match(/(only\s+)?([a-zA-Z]+)(\sand)?/)&&RegExp.$2,rules:k.length-1,minw:D.match(/\(min\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1),maxw:D.match(/\(max\-width:[\s]*([\s]*[0-9]+)px[\s]*\)/)&&parseFloat(RegExp.$1)})}}j()},l,q,j=function(E){var v="clientWidth",x=r[v],D=u.compatMode==="CSS1Compat"&&x||u.body[v]||x,z={},C=u.createDocumentFragment(),B=b[b.length-1],w=(new Date()).getTime();if(E&&l&&w-l<g){clearTimeout(q);q=setTimeout(j,g);return}else{l=w}for(var y in i){var F=i[y];if(!F.minw&&!F.maxw||(!F.minw||F.minw&&D>=F.minw)&&(!F.maxw||F.maxw&&D<=F.maxw)){if(!z[F.media]){z[F.media]=[]}z[F.media].push(k[F.rules])}}for(var y in p){if(p[y]&&p[y].parentNode===f){f.removeChild(p[y])}}for(var y in z){var G=u.createElement("style"),A=z[y].join("\n");G.type="text/css";G.media=y;if(G.styleSheet){G.styleSheet.cssText=A}else{G.appendChild(u.createTextNode(A))}C.appendChild(G);p.push(G)}f.insertBefore(C,B.nextSibling)},n=function(v,x){var w=c();if(!w){return}w.open("GET",v,true);w.onreadystatechange=function(){if(w.readyState!=4||w.status!=200&&w.status!=304){return}x(w.responseText)};if(w.readyState==4){return}w.send()},c=(function(){var v=false,w=[function(){return new ActiveXObject("Microsoft.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new XMLHttpRequest()}],y=w.length;while(y--){try{v=w[y]()}catch(x){continue}break}return function(){return v}})();a();respond.update=a;function s(){j(true)}if(e.addEventListener){e.addEventListener("resize",s,false)}else{if(e.attachEvent){e.attachEvent("onresize",s)}}})(this,(function(f){if(f.matchMedia){return true}var e,i=document,c=i.documentElement,g=c.firstElementChild||c.firstChild,h=!i.body,d=i.body||i.createElement("body"),b=i.createElement("div"),a="only all";b.id="mq-test-1";b.style.cssText="position:absolute;top:-99em";d.appendChild(b);b.innerHTML='_<style media="'+a+'"> #mq-test-1 { width: 9px; }</style>';if(h){c.insertBefore(d,g)}b.removeChild(b.firstChild);e=b.offsetWidth==9;if(h){c.removeChild(d)}else{d.removeChild(b)}return e})(this)); |
|||
|
@ -0,0 +1,5 @@ |
|||
/*! |
|||
* selectivizr v1.0.2 - (c) Keith Clark, freely distributable under the terms of the MIT license. |
|||
* selectivizr.com |
|||
*/ |
|||
(function(j){function A(a){return a.replace(B,h).replace(C,function(a,d,b){for(var a=b.split(","),b=0,e=a.length;b<e;b++){var s=D(a[b].replace(E,h).replace(F,h))+o,l=[];a[b]=s.replace(G,function(a,b,c,d,e){if(b){if(l.length>0){var a=l,f,e=s.substring(0,e).replace(H,i);if(e==i||e.charAt(e.length-1)==o)e+="*";try{f=t(e)}catch(k){}if(f){e=0;for(c=f.length;e<c;e++){for(var d=f[e],h=d.className,j=0,m=a.length;j<m;j++){var g=a[j];if(!RegExp("(^|\\s)"+g.className+"(\\s|$)").test(d.className)&&g.b&&(g.b===!0||g.b(d)===!0))h=u(h,g.className,!0)}d.className=h}}l=[]}return b}else{if(b=c?I(c):!v||v.test(d)?{className:w(d),b:!0}:null)return l.push(b),"."+b.className;return a}})}return d+a.join(",")})}function I(a){var c=!0,d=w(a.slice(1)),b=a.substring(0,5)==":not(",e,f;b&&(a=a.slice(5,-1));var l=a.indexOf("(");l>-1&&(a=a.substring(0,l));if(a.charAt(0)==":")switch(a.slice(1)){case "root":c=function(a){return b?a!=p:a==p};break;case "target":if(m==8){c=function(a){function c(){var d=location.hash,e=d.slice(1);return b?d==i||a.id!=e:d!=i&&a.id==e}k(j,"hashchange",function(){g(a,d,c())});return c()};break}return!1;case "checked":c=function(a){J.test(a.type)&&k(a,"propertychange",function(){event.propertyName=="checked"&&g(a,d,a.checked!==b)});return a.checked!==b};break;case "disabled":b=!b;case "enabled":c=function(c){if(K.test(c.tagName))return k(c,"propertychange",function(){event.propertyName=="$disabled"&&g(c,d,c.a===b)}),q.push(c),c.a=c.disabled,c.disabled===b;return a==":enabled"?b:!b};break;case "focus":e="focus",f="blur";case "hover":e||(e="mouseenter",f="mouseleave");c=function(a){k(a,b?f:e,function(){g(a,d,!0)});k(a,b?e:f,function(){g(a,d,!1)});return b};break;default:if(!L.test(a))return!1}return{className:d,b:c}}function w(a){return M+"-"+(m==6&&N?O++:a.replace(P,function(a){return a.charCodeAt(0)}))}function D(a){return a.replace(x,h).replace(Q,o)}function g(a,c,d){var b=a.className,c=u(b,c,d);if(c!=b)a.className=c,a.parentNode.className+=i}function u(a,c,d){var b=RegExp("(^|\\s)"+c+"(\\s|$)"),e=b.test(a);return d?e?a:a+o+c:e?a.replace(b,h).replace(x,h):a}function k(a,c,d){a.attachEvent("on"+c,d)}function r(a,c){if(/^https?:\/\//i.test(a))return c.substring(0,c.indexOf("/",8))==a.substring(0,a.indexOf("/",8))?a:null;if(a.charAt(0)=="/")return c.substring(0,c.indexOf("/",8))+a;var d=c.split(/[?#]/)[0];a.charAt(0)!="?"&&d.charAt(d.length-1)!="/"&&(d=d.substring(0,d.lastIndexOf("/")+1));return d+a}function y(a){if(a)return n.open("GET",a,!1),n.send(),(n.status==200?n.responseText:i).replace(R,i).replace(S,function(c,d,b,e,f){return y(r(b||f,a))}).replace(T,function(c,d,b){d=d||i;return" url("+d+r(b,a)+d+") "});return i}function U(){var a,c;a=f.getElementsByTagName("BASE");for(var d=a.length>0?a[0].href:f.location.href,b=0;b<f.styleSheets.length;b++)if(c=f.styleSheets[b],c.href!=i&&(a=r(c.href,d)))c.cssText=A(y(a));q.length>0&&setInterval(function(){for(var a=0,c=q.length;a<c;a++){var b=q[a];if(b.disabled!==b.a)b.disabled?(b.disabled=!1,b.a=!0,b.disabled=!0):b.a=b.disabled}},250)}if(!/*@cc_on!@*/true){var f=document,p=f.documentElement,n=function(){if(j.XMLHttpRequest)return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(a){return null}}(),m=/MSIE (\d+)/.exec(navigator.userAgent)[1];if(!(f.compatMode!="CSS1Compat"||m<6||m>8||!n)){var z={NW:"*.Dom.select",MooTools:"$$",DOMAssistant:"*.$",Prototype:"$$",YAHOO:"*.util.Selector.query",Sizzle:"*",jQuery:"*",dojo:"*.query"},t,q=[],O=0,N=!0,M="slvzr",R=/(\/\*[^*]*\*+([^\/][^*]*\*+)*\/)\s*/g,S=/@import\s*(?:(?:(?:url\(\s*(['"]?)(.*)\1)\s*\))|(?:(['"])(.*)\3))[^;]*;/g,T=/\burl\(\s*(["']?)(?!data:)([^"')]+)\1\s*\)/g,L=/^:(empty|(first|last|only|nth(-last)?)-(child|of-type))$/,B=/:(:first-(?:line|letter))/g,C=/(^|})\s*([^\{]*?[\[:][^{]+)/g,G=/([ +~>])|(:[a-z-]+(?:\(.*?\)+)?)|(\[.*?\])/g,H=/(:not\()?:(hover|enabled|disabled|focus|checked|target|active|visited|first-line|first-letter)\)?/g,P=/[^\w-]/g,K=/^(INPUT|SELECT|TEXTAREA|BUTTON)$/,J=/^(checkbox|radio)$/,v=m>6?/[\$\^*]=(['"])\1/:null,E=/([(\[+~])\s+/g,F=/\s+([)\]+~])/g,Q=/\s+/g,x=/^\s*((?:[\S\s]*\S)?)\s*$/,i="",o=" ",h="$1";(function(a,c){function d(){try{p.doScroll("left")}catch(a){setTimeout(d,50);return}b("poll")}function b(d){if(!(d.type=="readystatechange"&&f.readyState!="complete")&&((d.type=="load"?a:f).detachEvent("on"+d.type,b,!1),!e&&(e=!0)))c.call(a,d.type||d)}var e=!1,g=!0;if(f.readyState=="complete")c.call(a,i);else{if(f.createEventObject&&p.doScroll){try{g=!a.frameElement}catch(h){}g&&d()}k(f,"readystatechange",b);k(a,"load",b)}})(j,function(){for(var a in z){var c,d,b=j;if(j[a]){for(c=z[a].replace("*",a).split(".");(d=c.shift())&&(b=b[d]););if(typeof b=="function"){t=b;U();break}}}})}}})(this); |
@ -1,100 +0,0 @@ |
|||
//MooTools More, <http://mootools.net/more>. Copyright (c) 2006-2009 Aaron Newton <http://clientcide.com/>, Valerio Proietti <http://mad4milk.net> & the MooTools team <http://mootools.net/developers>, MIT Style License.
|
|||
|
|||
MooTools.More={version:"1.2.4.2",build:"bd5a93c0913cce25917c48cbdacde568e15e02ef"};(function(){var a={language:"en-US",languages:{"en-US":{}},cascades:["en-US"]}; |
|||
var b;MooTools.lang=new Events();$extend(MooTools.lang,{setLanguage:function(c){if(!a.languages[c]){return this;}a.language=c;this.load();this.fireEvent("langChange",c); |
|||
return this;},load:function(){var c=this.cascade(this.getCurrentLanguage());b={};$each(c,function(e,d){b[d]=this.lambda(e);},this);},getCurrentLanguage:function(){return a.language; |
|||
},addLanguage:function(c){a.languages[c]=a.languages[c]||{};return this;},cascade:function(e){var c=(a.languages[e]||{}).cascades||[];c.combine(a.cascades); |
|||
c.erase(e).push(e);var d=c.map(function(f){return a.languages[f];},this);return $merge.apply(this,d);},lambda:function(c){(c||{}).get=function(e,d){return $lambda(c[e]).apply(this,$splat(d)); |
|||
};return c;},get:function(e,d,c){if(b&&b[e]){return(d?b[e].get(d,c):b[e]);}},set:function(d,e,c){this.addLanguage(d);langData=a.languages[d];if(!langData[e]){langData[e]={}; |
|||
}$extend(langData[e],c);if(d==this.getCurrentLanguage()){this.load();this.fireEvent("langChange",d);}return this;},list:function(){return Hash.getKeys(a.languages); |
|||
}});})();(function(){var i=this.Date;if(!i.now){i.now=$time;}i.Methods={ms:"Milliseconds",year:"FullYear",min:"Minutes",mo:"Month",sec:"Seconds",hr:"Hours"}; |
|||
["Date","Day","FullYear","Hours","Milliseconds","Minutes","Month","Seconds","Time","TimezoneOffset","Week","Timezone","GMTOffset","DayOfYear","LastMonth","LastDayOfMonth","UTCDate","UTCDay","UTCFullYear","AMPM","Ordinal","UTCHours","UTCMilliseconds","UTCMinutes","UTCMonth","UTCSeconds"].each(function(p){i.Methods[p.toLowerCase()]=p; |
|||
});var d=function(q,p){return new Array(p-String(q).length+1).join("0")+q;};i.implement({set:function(t,r){switch($type(t)){case"object":for(var s in t){this.set(s,t[s]); |
|||
}break;case"string":t=t.toLowerCase();var q=i.Methods;if(q[t]){this["set"+q[t]](r);}}return this;},get:function(q){q=q.toLowerCase();var p=i.Methods;if(p[q]){return this["get"+p[q]](); |
|||
}return null;},clone:function(){return new i(this.get("time"));},increment:function(p,r){p=p||"day";r=$pick(r,1);switch(p){case"year":return this.increment("month",r*12); |
|||
case"month":var q=this.get("date");this.set("date",1).set("mo",this.get("mo")+r);return this.set("date",q.min(this.get("lastdayofmonth")));case"week":return this.increment("day",r*7); |
|||
case"day":return this.set("date",this.get("date")+r);}if(!i.units[p]){throw new Error(p+" is not a supported interval");}return this.set("time",this.get("time")+r*i.units[p]()); |
|||
},decrement:function(p,q){return this.increment(p,-1*$pick(q,1));},isLeapYear:function(){return i.isLeapYear(this.get("year"));},clearTime:function(){return this.set({hr:0,min:0,sec:0,ms:0}); |
|||
},diff:function(q,p){if($type(q)=="string"){q=i.parse(q);}return((q-this)/i.units[p||"day"](3,3)).toInt();},getLastDayOfMonth:function(){return i.daysInMonth(this.get("mo"),this.get("year")); |
|||
},getDayOfYear:function(){return(i.UTC(this.get("year"),this.get("mo"),this.get("date")+1)-i.UTC(this.get("year"),0,1))/i.units.day();},getWeek:function(){return(this.get("dayofyear")/7).ceil(); |
|||
},getOrdinal:function(p){return i.getMsg("ordinal",p||this.get("date"));},getTimezone:function(){return this.toString().replace(/^.*? ([A-Z]{3}).[0-9]{4}.*$/,"$1").replace(/^.*?\(([A-Z])[a-z]+ ([A-Z])[a-z]+ ([A-Z])[a-z]+\)$/,"$1$2$3"); |
|||
},getGMTOffset:function(){var p=this.get("timezoneOffset");return((p>0)?"-":"+")+d((p.abs()/60).floor(),2)+d(p%60,2);},setAMPM:function(p){p=p.toUpperCase(); |
|||
var q=this.get("hr");if(q>11&&p=="AM"){return this.decrement("hour",12);}else{if(q<12&&p=="PM"){return this.increment("hour",12);}}return this;},getAMPM:function(){return(this.get("hr")<12)?"AM":"PM"; |
|||
},parse:function(p){this.set("time",i.parse(p));return this;},isValid:function(p){return !!(p||this).valueOf();},format:function(p){if(!this.isValid()){return"invalid date"; |
|||
}p=p||"%x %X";p=k[p.toLowerCase()]||p;var q=this;return p.replace(/%([a-z%])/gi,function(s,r){switch(r){case"a":return i.getMsg("days")[q.get("day")].substr(0,3); |
|||
case"A":return i.getMsg("days")[q.get("day")];case"b":return i.getMsg("months")[q.get("month")].substr(0,3);case"B":return i.getMsg("months")[q.get("month")]; |
|||
case"c":return q.toString();case"d":return d(q.get("date"),2);case"H":return d(q.get("hr"),2);case"I":return((q.get("hr")%12)||12);case"j":return d(q.get("dayofyear"),3); |
|||
case"m":return d((q.get("mo")+1),2);case"M":return d(q.get("min"),2);case"o":return q.get("ordinal");case"p":return i.getMsg(q.get("ampm"));case"S":return d(q.get("seconds"),2); |
|||
case"U":return d(q.get("week"),2);case"w":return q.get("day");case"x":return q.format(i.getMsg("shortDate"));case"X":return q.format(i.getMsg("shortTime")); |
|||
case"y":return q.get("year").toString().substr(2);case"Y":return q.get("year");case"T":return q.get("GMTOffset");case"Z":return q.get("Timezone");}return r; |
|||
});},toISOString:function(){return this.format("iso8601");}});i.alias("toISOString","toJSON");i.alias("diff","compare");i.alias("format","strftime");var k={db:"%Y-%m-%d %H:%M:%S",compact:"%Y%m%dT%H%M%S",iso8601:"%Y-%m-%dT%H:%M:%S%T",rfc822:"%a, %d %b %Y %H:%M:%S %Z","short":"%d %b %H:%M","long":"%B %d, %Y %H:%M"}; |
|||
var g=[];var e=i.parse;var n=function(s,u,r){var q=-1;var t=i.getMsg(s+"s");switch($type(u)){case"object":q=t[u.get(s)];break;case"number":q=t[month-1]; |
|||
if(!q){throw new Error("Invalid "+s+" index: "+index);}break;case"string":var p=t.filter(function(v){return this.test(v);},new RegExp("^"+u,"i"));if(!p.length){throw new Error("Invalid "+s+" string"); |
|||
}if(p.length>1){throw new Error("Ambiguous "+s);}q=p[0];}return(r)?t.indexOf(q):q;};i.extend({getMsg:function(q,p){return MooTools.lang.get("Date",q,p); |
|||
},units:{ms:$lambda(1),second:$lambda(1000),minute:$lambda(60000),hour:$lambda(3600000),day:$lambda(86400000),week:$lambda(608400000),month:function(q,p){var r=new i; |
|||
return i.daysInMonth($pick(q,r.get("mo")),$pick(p,r.get("year")))*86400000;},year:function(p){p=p||new i().get("year");return i.isLeapYear(p)?31622400000:31536000000; |
|||
}},daysInMonth:function(q,p){return[31,i.isLeapYear(p)?29:28,31,30,31,30,31,31,30,31,30,31][q];},isLeapYear:function(p){return((p%4===0)&&(p%100!==0))||(p%400===0); |
|||
},parse:function(r){var q=$type(r);if(q=="number"){return new i(r);}if(q!="string"){return r;}r=r.clean();if(!r.length){return null;}var p;g.some(function(t){var s=t.re.exec(r); |
|||
return(s)?(p=t.handler(s)):false;});return p||new i(e(r));},parseDay:function(p,q){return n("day",p,q);},parseMonth:function(q,p){return n("month",q,p); |
|||
},parseUTC:function(q){var p=new i(q);var r=i.UTC(p.get("year"),p.get("mo"),p.get("date"),p.get("hr"),p.get("min"),p.get("sec"));return new i(r);},orderIndex:function(p){return i.getMsg("dateOrder").indexOf(p)+1; |
|||
},defineFormat:function(p,q){k[p]=q;},defineFormats:function(p){for(var q in p){i.defineFormat(q,p[q]);}},parsePatterns:g,defineParser:function(p){g.push((p.re&&p.handler)?p:l(p)); |
|||
},defineParsers:function(){Array.flatten(arguments).each(i.defineParser);},define2DigitYearStart:function(p){h=p%100;m=p-h;}});var m=1900;var h=70;var j=function(p){return new RegExp("(?:"+i.getMsg(p).map(function(q){return q.substr(0,3); |
|||
}).join("|")+")[a-z]*");};var a=function(p){switch(p){case"x":return((i.orderIndex("month")==1)?"%m[.-/]%d":"%d[.-/]%m")+"([.-/]%y)?";case"X":return"%H([.:]%M)?([.:]%S([.:]%s)?)? ?%p? ?%T?"; |
|||
}return null;};var o={d:/[0-2]?[0-9]|3[01]/,H:/[01]?[0-9]|2[0-3]/,I:/0?[1-9]|1[0-2]/,M:/[0-5]?\d/,s:/\d+/,o:/[a-z]*/,p:/[ap]\.?m\.?/,y:/\d{2}|\d{4}/,Y:/\d{4}/,T:/Z|[+-]\d{2}(?::?\d{2})?/}; |
|||
o.m=o.I;o.S=o.M;var c;var b=function(p){c=p;o.a=o.A=j("days");o.b=o.B=j("months");g.each(function(r,q){if(r.format){g[q]=l(r.format);}});};var l=function(r){if(!c){return{format:r}; |
|||
}var p=[];var q=(r.source||r).replace(/%([a-z])/gi,function(t,s){return a(s)||t;}).replace(/\((?!\?)/g,"(?:").replace(/ (?!\?|\*)/g,",? ").replace(/%([a-z%])/gi,function(t,s){var u=o[s]; |
|||
if(!u){return s;}p.push(s);return"("+u.source+")";}).replace(/\[a-z\]/gi,"[a-z\\u00c0-\\uffff]");return{format:r,re:new RegExp("^"+q+"$","i"),handler:function(u){u=u.slice(1).associate(p); |
|||
var s=new i().clearTime();if("d" in u){f.call(s,"d",1);}if("m" in u){f.call(s,"m",1);}for(var t in u){f.call(s,t,u[t]);}return s;}};};var f=function(p,q){if(!q){return this; |
|||
}switch(p){case"a":case"A":return this.set("day",i.parseDay(q,true));case"b":case"B":return this.set("mo",i.parseMonth(q,true));case"d":return this.set("date",q); |
|||
case"H":case"I":return this.set("hr",q);case"m":return this.set("mo",q-1);case"M":return this.set("min",q);case"p":return this.set("ampm",q.replace(/\./g,"")); |
|||
case"S":return this.set("sec",q);case"s":return this.set("ms",("0."+q)*1000);case"w":return this.set("day",q);case"Y":return this.set("year",q);case"y":q=+q; |
|||
if(q<100){q+=m+(q<h?100:0);}return this.set("year",q);case"T":if(q=="Z"){q="+00";}var r=q.match(/([+-])(\d{2}):?(\d{2})?/);r=(r[1]+"1")*(r[2]*60+(+r[3]||0))+this.getTimezoneOffset(); |
|||
return this.set("time",this-r*60000);}return this;};i.defineParsers("%Y([-./]%m([-./]%d((T| )%X)?)?)?","%Y%m%d(T%H(%M%S?)?)?","%x( %X)?","%d%o( %b( %Y)?)?( %X)?","%b( %d%o)?( %Y)?( %X)?","%Y %b( %d%o( %X)?)?","%o %b %d %X %T %Y"); |
|||
MooTools.lang.addEvent("langChange",function(p){if(MooTools.lang.get("Date")){b(p);}}).fireEvent("langChange",MooTools.lang.getCurrentLanguage());})(); |
|||
Date.implement({timeDiffInWords:function(a){return Date.distanceOfTimeInWords(this,a||new Date);},timeDiff:function(g,b){if(g==null){g=new Date;}var f=((g-this)/1000).toInt(); |
|||
if(!f){return"0s";}var a={s:60,m:60,h:24,d:365,y:0};var e,d=[];for(var c in a){if(!f){break;}if((e=a[c])){d.unshift((f%e)+c);f=(f/e).toInt();}else{d.unshift(f+c); |
|||
}}return d.join(b||":");}});Date.alias("timeDiffInWords","timeAgoInWords");Date.extend({distanceOfTimeInWords:function(b,a){return Date.getTimePhrase(((a-b)/1000).toInt()); |
|||
},getTimePhrase:function(f){var d=(f<0)?"Until":"Ago";if(f<0){f*=-1;}var b={minute:60,hour:60,day:24,week:7,month:52/12,year:12,eon:Infinity};var e="lessThanMinute"; |
|||
for(var c in b){var a=b[c];if(f<1.5*a){if(f>0.75*a){e=c;}break;}f/=a;e=c+"s";}return Date.getMsg(e+d).substitute({delta:f.round()});}});Date.defineParsers({re:/^(?:tod|tom|yes)/i,handler:function(a){var b=new Date().clearTime(); |
|||
switch(a[0]){case"tom":return b.increment();case"yes":return b.decrement();default:return b;}}},{re:/^(next|last) ([a-z]+)$/i,handler:function(e){var f=new Date().clearTime(); |
|||
var b=f.getDay();var c=Date.parseDay(e[2],true);var a=c-b;if(c<=b){a+=7;}if(e[1]=="last"){a-=7;}return f.set("date",f.getDate()+a);}});Element.implement({measure:function(e){var g=function(h){return !!(!h||h.offsetHeight||h.offsetWidth); |
|||
};if(g(this)){return e.apply(this);}var d=this.getParent(),f=[],b=[];while(!g(d)&&d!=document.body){b.push(d.expose());d=d.getParent();}var c=this.expose(); |
|||
var a=e.apply(this);c();b.each(function(h){h();});return a;},expose:function(){if(this.getStyle("display")!="none"){return $empty;}var a=this.style.cssText; |
|||
this.setStyles({display:"block",position:"absolute",visibility:"hidden"});return function(){this.style.cssText=a;}.bind(this);},getDimensions:function(a){a=$merge({computeSize:false},a); |
|||
var f={};var d=function(g,e){return(e.computeSize)?g.getComputedSize(e):g.getSize();};var b=this.getParent("body");if(b&&this.getStyle("display")=="none"){f=this.measure(function(){return d(this,a); |
|||
});}else{if(b){try{f=d(this,a);}catch(c){}}else{f={x:0,y:0};}}return $chk(f.x)?$extend(f,{width:f.x,height:f.y}):$extend(f,{x:f.width,y:f.height});},getComputedSize:function(a){a=$merge({styles:["padding","border"],plains:{height:["top","bottom"],width:["left","right"]},mode:"both"},a); |
|||
var c={width:0,height:0};switch(a.mode){case"vertical":delete c.width;delete a.plains.width;break;case"horizontal":delete c.height;delete a.plains.height; |
|||
break;}var b=[];$each(a.plains,function(g,f){g.each(function(h){a.styles.each(function(i){b.push((i=="border")?i+"-"+h+"-width":i+"-"+h);});});});var e={}; |
|||
b.each(function(f){e[f]=this.getComputedStyle(f);},this);var d=[];$each(a.plains,function(g,f){var h=f.capitalize();c["total"+h]=c["computed"+h]=0;g.each(function(i){c["computed"+i.capitalize()]=0; |
|||
b.each(function(k,j){if(k.test(i)){e[k]=e[k].toInt()||0;c["total"+h]=c["total"+h]+e[k];c["computed"+i.capitalize()]=c["computed"+i.capitalize()]+e[k];}if(k.test(i)&&f!=k&&(k.test("border")||k.test("padding"))&&!d.contains(k)){d.push(k); |
|||
c["computed"+h]=c["computed"+h]-e[k];}});});});["Width","Height"].each(function(g){var f=g.toLowerCase();if(!$chk(c[f])){return;}c[f]=c[f]+this["offset"+g]+c["computed"+g]; |
|||
c["total"+g]=c[f]+c["total"+g];delete c["computed"+g];},this);return $extend(e,c);}});Element.implement({isDisplayed:function(){return this.getStyle("display")!="none"; |
|||
},isVisible:function(){var a=this.offsetWidth,b=this.offsetHeight;return(a==0&&b==0)?false:(a>0&&b>0)?true:this.isDisplayed();},toggle:function(){return this[this.isDisplayed()?"hide":"show"](); |
|||
},hide:function(){var b;try{if((b=this.getStyle("display"))=="none"){b=null;}}catch(a){}return this.store("originalDisplay",b||"block").setStyle("display","none"); |
|||
},show:function(a){return this.setStyle("display",a||this.retrieve("originalDisplay")||"block");},swapClass:function(a,b){return this.removeClass(a).addClass(b); |
|||
}});Fx.Reveal=new Class({Extends:Fx.Morph,options:{link:"cancel",styles:["padding","border","margin"],transitionOpacity:!Browser.Engine.trident4,mode:"vertical",display:"block",hideInputs:Browser.Engine.trident?"select, input, textarea, object, embed":false},dissolve:function(){try{if(!this.hiding&&!this.showing){if(this.element.getStyle("display")!="none"){this.hiding=true; |
|||
this.showing=false;this.hidden=true;this.cssText=this.element.style.cssText;var d=this.element.getComputedSize({styles:this.options.styles,mode:this.options.mode}); |
|||
this.element.setStyle("display","block");if(this.options.transitionOpacity){d.opacity=1;}var b={};$each(d,function(f,e){b[e]=[f,0];},this);this.element.setStyle("overflow","hidden"); |
|||
var a=this.options.hideInputs?this.element.getElements(this.options.hideInputs):null;this.$chain.unshift(function(){if(this.hidden){this.hiding=false;$each(d,function(f,e){d[e]=f; |
|||
},this);this.element.style.cssText=this.cssText;this.element.setStyle("display","none");if(a){a.setStyle("visibility","visible");}}this.fireEvent("hide",this.element); |
|||
this.callChain();}.bind(this));if(a){a.setStyle("visibility","hidden");}this.start(b);}else{this.callChain.delay(10,this);this.fireEvent("complete",this.element); |
|||
this.fireEvent("hide",this.element);}}else{if(this.options.link=="chain"){this.chain(this.dissolve.bind(this));}else{if(this.options.link=="cancel"&&!this.hiding){this.cancel(); |
|||
this.dissolve();}}}}catch(c){this.hiding=false;this.element.setStyle("display","none");this.callChain.delay(10,this);this.fireEvent("complete",this.element); |
|||
this.fireEvent("hide",this.element);}return this;},reveal:function(){try{if(!this.showing&&!this.hiding){if(this.element.getStyle("display")=="none"||this.element.getStyle("visiblity")=="hidden"||this.element.getStyle("opacity")==0){this.showing=true; |
|||
this.hiding=this.hidden=false;var d;this.cssText=this.element.style.cssText;this.element.measure(function(){d=this.element.getComputedSize({styles:this.options.styles,mode:this.options.mode}); |
|||
}.bind(this));$each(d,function(f,e){d[e]=f;});if($chk(this.options.heightOverride)){d.height=this.options.heightOverride.toInt();}if($chk(this.options.widthOverride)){d.width=this.options.widthOverride.toInt(); |
|||
}if(this.options.transitionOpacity){this.element.setStyle("opacity",0);d.opacity=1;}var b={height:0,display:this.options.display};$each(d,function(f,e){b[e]=0; |
|||
});this.element.setStyles($merge(b,{overflow:"hidden"}));var a=this.options.hideInputs?this.element.getElements(this.options.hideInputs):null;if(a){a.setStyle("visibility","hidden"); |
|||
}this.start(d);this.$chain.unshift(function(){this.element.style.cssText=this.cssText;this.element.setStyle("display",this.options.display);if(!this.hidden){this.showing=false; |
|||
}if(a){a.setStyle("visibility","visible");}this.callChain();this.fireEvent("show",this.element);}.bind(this));}else{this.callChain();this.fireEvent("complete",this.element); |
|||
this.fireEvent("show",this.element);}}else{if(this.options.link=="chain"){this.chain(this.reveal.bind(this));}else{if(this.options.link=="cancel"&&!this.showing){this.cancel(); |
|||
this.reveal();}}}}catch(c){this.element.setStyles({display:this.options.display,visiblity:"visible",opacity:1});this.showing=false;this.callChain.delay(10,this); |
|||
this.fireEvent("complete",this.element);this.fireEvent("show",this.element);}return this;},toggle:function(){if(this.element.getStyle("display")=="none"||this.element.getStyle("visiblity")=="hidden"||this.element.getStyle("opacity")==0){this.reveal(); |
|||
}else{this.dissolve();}return this;},cancel:function(){this.parent.apply(this,arguments);this.element.style.cssText=this.cssText;this.hidding=false;this.showing=false; |
|||
}});Element.Properties.reveal={set:function(a){var b=this.retrieve("reveal");if(b){b.cancel();}return this.eliminate("reveal").store("reveal:options",a); |
|||
},get:function(a){if(a||!this.retrieve("reveal")){if(a||!this.retrieve("reveal:options")){this.set("reveal",a);}this.store("reveal",new Fx.Reveal(this,this.retrieve("reveal:options"))); |
|||
}return this.retrieve("reveal");}};Element.Properties.dissolve=Element.Properties.reveal;Element.implement({reveal:function(a){this.get("reveal",a).reveal(); |
|||
return this;},dissolve:function(a){this.get("reveal",a).dissolve();return this;},nix:function(){var a=Array.link(arguments,{destroy:Boolean.type,options:Object.type}); |
|||
this.get("reveal",a.options).dissolve().chain(function(){this[a.destroy?"destroy":"dispose"]();}.bind(this));return this;},wink:function(){var b=Array.link(arguments,{duration:Number.type,options:Object.type}); |
|||
var a=this.get("reveal",b.options);a.reveal().chain(function(){(function(){a.dissolve();}).delay(b.duration||2000);});}});MooTools.lang.set("en-US","Date",{months:["January","February","March","April","May","June","July","August","September","October","November","December"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dateOrder:["month","date","year"],shortDate:"%m/%d/%Y",shortTime:"%I:%M%p",AM:"AM",PM:"PM",ordinal:function(a){return(a>3&&a<21)?"th":["th","st","nd","rd","th"][Math.min(a%10,4)]; |
|||
},lessThanMinuteAgo:"less than a minute ago",minuteAgo:"about a minute ago",minutesAgo:"{delta} minutes ago",hourAgo:"about an hour ago",hoursAgo:"about {delta} hours ago",dayAgo:"1 day ago",daysAgo:"{delta} days ago",weekAgo:"1 week ago",weeksAgo:"{delta} weeks ago",monthAgo:"1 month ago",monthsAgo:"{delta} months ago",yearAgo:"1 year ago",yearsAgo:"{delta} years ago",lessThanMinuteUntil:"less than a minute from now",minuteUntil:"about a minute from now",minutesUntil:"{delta} minutes from now",hourUntil:"about an hour from now",hoursUntil:"about {delta} hours from now",dayUntil:"1 day from now",daysUntil:"{delta} days from now",weekUntil:"1 week from now",weeksUntil:"{delta} weeks from now",monthUntil:"1 month from now",monthsUntil:"{delta} months from now",yearUntil:"1 year from now",yearsUntil:"{delta} years from now"}); |
@ -1,76 +0,0 @@ |
|||
window.addEvent('domready', function() { |
|||
codeblocks = $$('div.highlight'); |
|||
codeblocks.each(addExpander); |
|||
}); |
|||
|
|||
window.addEvents({ |
|||
domready: function(){ |
|||
if(twitter_user){ |
|||
new Request.Twitter(twitter_user, { |
|||
include_replies: false, |
|||
data: { count: 3 }, |
|||
onSuccess: function(tweets){ |
|||
$('tweets').empty(); |
|||
for (var i = tweets.length; i--; ){ |
|||
new Element('li', { |
|||
'class': 'tweet' |
|||
}).adopt( |
|||
new Element('p', { 'html': tweets[i].text+' ' }).adopt( |
|||
new Element('a', { |
|||
'href': 'http://twitter.com/'+twitter_user+'/status/'+tweets[i].id_str, |
|||
'text': new Date(tweets[i].created_at).timeDiffInWords() |
|||
})) |
|||
).inject('tweets', 'top'); |
|||
} |
|||
} |
|||
}).send(); |
|||
} |
|||
$$('#recent_posts time').each(function(date){ |
|||
date.set('text', new Date(date.get('text')).timeDiffInWords()); |
|||
}); |
|||
}, |
|||
}); |
|||
|
|||
|
|||
function addExpander(div){ |
|||
new Element('span',{ |
|||
html: 'expand »', |
|||
'class': 'pre_expander', |
|||
'events': { |
|||
'click': function(){ |
|||
toggleExpander(this); |
|||
} |
|||
} |
|||
}).inject(div, 'top'); |
|||
} |
|||
function toggleExpander(expander){ |
|||
var html = ''; |
|||
var expanderPos = expander.getPosition().y; |
|||
if($('page').toggleClass('expanded').hasClass('expanded')) |
|||
html = '« contract'; |
|||
else |
|||
html = 'expand »'; |
|||
$$('div.highlight span.pre_expander').each(function(span){ |
|||
span.set('html',html); |
|||
}); |
|||
fixScroll(expander, expanderPos); |
|||
} |
|||
function fixScroll(el, position){ |
|||
pos = el.getPosition().y - position; |
|||
window.scrollTo(window.getScroll().x ,window.getScroll().y + pos); |
|||
} |
|||
function enableCompressedLayout(codeblocks){ |
|||
if(!codeblocks.length) return; |
|||
new Element('span',{ |
|||
html: 'Collapse layout', |
|||
'id': 'collapser', |
|||
'events': { |
|||
'click': function(){ |
|||
if($('page').toggleClass('collapsed').hasClass('collapsed')) |
|||
this.set('html','Expand layout'); |
|||
else |
|||
this.set('html','Collapse layout'); |
|||
} |
|||
} |
|||
}).inject($('main'), 'top'); |
|||
} |
@ -1,52 +1,70 @@ |
|||
Request.Twitter = new Class({ |
|||
/* http://www.JSON.org/json2.js 2009-09-29 Public Domain. NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. See http://www.JSON.org/js.html */ |
|||
if(!this.JSON){this.JSON={}}(function(){function l(c){return c<10?'0'+c:c}if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(c){return isFinite(this.valueOf())?this.getUTCFullYear()+'-'+l(this.getUTCMonth()+1)+'-'+l(this.getUTCDate())+'T'+l(this.getUTCHours())+':'+l(this.getUTCMinutes())+':'+l(this.getUTCSeconds())+'Z':null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(c){return this.valueOf()}}var o=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,p=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,h,m,r={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},j;function q(a){p.lastIndex=0;return p.test(a)?'"'+a.replace(p,function(c){var f=r[c];return typeof f==='string'?f:'\\u'+('0000'+c.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+a+'"'}function n(c,f){var a,e,d,i,k=h,g,b=f[c];if(b&&typeof b==='object'&&typeof b.toJSON==='function'){b=b.toJSON(c)}if(typeof j==='function'){b=j.call(f,c,b)}switch(typeof b){case'string':return q(b);case'number':return isFinite(b)?String(b):'null';case'boolean':case'null':return String(b);case'object':if(!b){return'null'}h+=m;g=[];if(Object.prototype.toString.apply(b)==='[object Array]'){i=b.length;for(a=0;a<i;a+=1){g[a]=n(a,b)||'null'}d=g.length===0?'[]':h?'[\n'+h+g.join(',\n'+h)+'\n'+k+']':'['+g.join(',')+']';h=k;return d}if(j&&typeof j==='object'){i=j.length;for(a=0;a<i;a+=1){e=j[a];if(typeof e==='string'){d=n(e,b);if(d){g.push(q(e)+(h?': ':':')+d)}}}}else{for(e in b){if(Object.hasOwnProperty.call(b,e)){d=n(e,b);if(d){g.push(q(e)+(h?': ':':')+d)}}}}d=g.length===0?'{}':h?'{\n'+h+g.join(',\n'+h)+'\n'+k+'}':'{'+g.join(',')+'}';h=k;return d}}if(typeof JSON.stringify!=='function'){JSON.stringify=function(c,f,a){var e;h='';m='';if(typeof a==='number'){for(e=0;e<a;e+=1){m+=' '}}else if(typeof a==='string'){m=a}j=f;if(f&&typeof f!=='function'&&(typeof f!=='object'||typeof f.length!=='number')){throw new Error('JSON.stringify');}return n('',{'':c})}}if(typeof JSON.parse!=='function'){JSON.parse=function(i,k){var g;function b(c,f){var a,e,d=c[f];if(d&&typeof d==='object'){for(a in d){if(Object.hasOwnProperty.call(d,a)){e=b(d,a);if(e!==undefined){d[a]=e}else{delete d[a]}}}}return k.call(c,f,d)}o.lastIndex=0;if(o.test(i)){i=i.replace(o,function(c){return'\\u'+('0000'+c.charCodeAt(0).toString(16)).slice(-4)})}if(/^[\],:{}\s]*$/.test(i.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){g=eval('('+i+')');return typeof k==='function'?b({'':g},''):g}throw new SyntaxError('JSON.parse');}}}()); |
|||
|
|||
Extends: Request.JSONP, |
|||
// jXHR.js (JSON-P XHR) | v0.1 (c) Kyle Simpson | MIT License
|
|||
(function(c){var b=c.setTimeout,d=c.document,a=0;c.jXHR=function(){var e,g,n,h,m=null;function l(){try{h.parentNode.removeChild(h)}catch(o){}}function k(){g=false;e="";l();h=null;i(0)}function f(p){try{m.onerror.call(m,p,e)}catch(o){throw new Error(p)}}function j(){if((this.readyState&&this.readyState!=="complete"&&this.readyState!=="loaded")||g){return}this.onload=this.onreadystatechange=null;g=true;if(m.readyState!==4){f("Script failed to load ["+e+"].")}l()}function i(o,p){p=p||[];m.readyState=o;if(typeof m.onreadystatechange==="function"){m.onreadystatechange.apply(m,p)}}m={onerror:null,onreadystatechange:null,readyState:0,open:function(p,o){k();internal_callback="cb"+(a++);(function(q){c.jXHR[q]=function(){try{i.call(m,4,arguments)}catch(r){m.readyState=-1;f("Script failed to run ["+e+"].")}c.jXHR[q]=null}})(internal_callback);e=o.replace(/=\?/,"=jXHR."+internal_callback);i(1)},send:function(){b(function(){h=d.createElement("script");h.setAttribute("type","text/javascript");h.onload=h.onreadystatechange=function(){j.call(h)};h.setAttribute("src",e);d.getElementsByTagName("head")[0].appendChild(h)},0);i(2)},setRequestHeader:function(){},getResponseHeader:function(){return""},getAllResponseHeaders:function(){return[]}};k();return m}})(window); |
|||
|
|||
options: { |
|||
linkify: true, |
|||
url: 'http://twitter.com/statuses/user_timeline/{term}.json', |
|||
include_replies: true, |
|||
data: { |
|||
count: 5, |
|||
trim_user: true |
|||
function getTwitterFeed(success, user, count, replies) { |
|||
feed = new jXHR(); |
|||
feed.onerror = function (msg,url) { alert(msg); } |
|||
feed.onreadystatechange = function(data){ |
|||
if (feed.readyState === 4) { |
|||
var tweets = new Array(); |
|||
for (i in data){ |
|||
if(tweets.length < count){ |
|||
if(replies || data[i].in_reply_to_user_id == null){ |
|||
tweets.push(data[i]); |
|||
} |
|||
} |
|||
} |
|||
success(tweets); |
|||
} |
|||
}, |
|||
}; |
|||
feed.open("GET","http://twitter.com/statuses/user_timeline/"+user+".json?trim_user=true&count="+parseInt(count)+25+"&callback=?"); |
|||
feed.send(); |
|||
} |
|||
|
|||
initialize: function(term, options){ |
|||
this.parent(options); |
|||
if(this.options.include_replies == false){ |
|||
this.options.count = this.options.data.count |
|||
this.options.data.count += 30; // adds 30 tweets to request for filtering
|
|||
} |
|||
this.options.url = this.options.url.substitute({term: term}); |
|||
console.log(this.options.url); |
|||
}, |
|||
|
|||
success: function(args, index){ |
|||
if(!this.options.include_replies){ |
|||
args[0] = args[0].filter(function(item, index, array){ |
|||
return item.in_reply_to_screen_name == null; |
|||
}); |
|||
if(args[0].length > this.options.count){ args[0].length = this.options.count; } |
|||
} |
|||
var data = args[0]; |
|||
|
|||
if (this.options.linkify) data.each(function(tweet){ |
|||
tweet.text = this.linkify(tweet.text); |
|||
}, this); |
|||
|
|||
if (data[0]) this.options.data.since_id = data[0].id; // keep subsequent calls newer
|
|||
|
|||
this.parent(args, index); |
|||
}, |
|||
getTwitterFeed(showTwitterFeed, twitter_user, tweet_count, show_replies); |
|||
|
|||
linkify: function(text){ |
|||
// modified from TwitterGitter by David Walsh (davidwalsh.name)
|
|||
// courtesy of Jeremy Parrish (rrish.org)
|
|||
return text.replace(/(https?:\/\/[\w\-:;?&=+.%#\/]+)/gi, '<a href="$1">$1</a>') |
|||
.replace(/(^|\W)@(\w+)/g, '$1<a href="http://twitter.com/$2">@$2</a>') |
|||
.replace(/(^|\W)#(\w+)/g, '$1#<a href="http://search.twitter.com/search?q=%23$2">$2</a>'); |
|||
function showTwitterFeed(tweets){ |
|||
var timeline = document.getElementById('tweets'); |
|||
timeline.innerHTML=''; |
|||
for (t in tweets){ |
|||
timeline.innerHTML+='<li>'+'<p>'+linkifyTweet(tweets[t].text)+'<a href="http://twitter.com/'+twitter_user+'/status/'+tweets[t].id_str+'">'+prettyDate(tweets[t].created_at)+'</a></p>'+'</li>'; |
|||
} |
|||
} |
|||
function linkifyTweet(text){ |
|||
return text.replace(/(https?:\/\/[\w\-:;?&=+.%#\/]+)/gi, '<a href="$1">$1</a>') |
|||
.replace(/(^|\W)@(\w+)/g, '$1<a href="http://twitter.com/$2">@$2</a>') |
|||
.replace(/(^|\W)#(\w+)/g, '$1#<a href="http://search.twitter.com/search?q=%23$2">$2</a>'); |
|||
} |
|||
|
|||
}); |
|||
|
|||
function prettyDate(date_str){ |
|||
var time_formats = [ |
|||
[60, 'just now', 1], // 60
|
|||
[120, '1 min', '1 minute from now'], // 60*2
|
|||
[3600, 'mins', 60], // 60*60, 60
|
|||
[7200, '1 hour', '1 hour from now'], // 60*60*2
|
|||
[86400, 'hours', 3600], // 60*60*24, 60*60
|
|||
[172800, '1 day', 'tomorrow'], // 60*60*24*2
|
|||
[2903040000, 'days', 86400], // 60*60*24*7, 60*60*24
|
|||
]; |
|||
var time = ('' + date_str).replace(/-/g,"/").replace(/[TZ]/g," ").replace(/^\s\s*/, '').replace(/\s\s*$/, ''); |
|||
if(time.substr(time.length-4,1)==".") time =time.substr(0,time.length-4); |
|||
var seconds = (new Date - new Date(time)) / 1000; |
|||
var token = 'ago', list_choice = 1; |
|||
if (seconds < 0) { |
|||
seconds = Math.abs(seconds); |
|||
token = 'from now'; |
|||
list_choice = 2; |
|||
} |
|||
var i = 0, format; |
|||
while (format = time_formats[i++]) |
|||
if (seconds < format[0]) { |
|||
if (typeof format[2] == 'string') |
|||
return format[list_choice]; |
|||
else |
|||
return Math.floor(seconds / format[2]) + ' ' + format[1]; |
|||
} |
|||
return time; |
|||
}; |
|||
|
@ -1,91 +0,0 @@ |
|||
$page-pad: 40px; |
|||
$min-width: 320px; |
|||
$max-width: 1440px; |
|||
$sidebar-width: 320px; |
|||
$sidebar-pad: 30px; |
|||
$default-border-radius: 4px; |
|||
|
|||
//html { background-color: $body_bg; } |
|||
|
|||
//body { color: $body_color; } |
|||
|
|||
//a { |
|||
//color: $link_color; |
|||
//&:hover, &:focus { |
|||
//color: saturate(darken($link_color, 15), 20); } |
|||
//&:visited { |
|||
//color: darken(adjust_hue($link_color, 70), 10); } } |
|||
|
|||
.group { @include pie-clearfix; } |
|||
|
|||
.inner-wrap { |
|||
position: relative; |
|||
margin: 0 auto; |
|||
padding: 0 $page_pad; |
|||
max-width: $max-width; |
|||
@extend .group; |
|||
} |
|||
|
|||
.core-layout { > div { @extend .inner-wrap; } } |
|||
|
|||
body { > header, > nav, > footer { |
|||
@extend .core-layout; |
|||
min-width: $min-width; |
|||
} |
|||
} |
|||
|
|||
#page { |
|||
@extend .group; |
|||
padding: 0; |
|||
max-width: $max-width + $page-pad*2; |
|||
margin: 0 auto; |
|||
> div { |
|||
@extend .group; |
|||
//min-width: 480px; |
|||
margin-right: $sidebar-width; |
|||
> aside { |
|||
float: left; |
|||
width: $sidebar-width - $sidebar-pad*2; |
|||
margin: 0 -100% 0 0; |
|||
padding: $sidebar-pad; |
|||
} |
|||
} |
|||
} |
|||
|
|||
#main { |
|||
float: left; |
|||
width: 100%; |
|||
padding-top: 25px; |
|||
padding-bottom: 25px; |
|||
> * { |
|||
padding-right: $page-pad; |
|||
padding-left: $page-pad; |
|||
} |
|||
} |
|||
|
|||
@media (min-device-width:1024px) and (max-width:800px), |
|||
screen and (max-device-width:480px), (max-device-width:480px) and (orientation:landscape), |
|||
(min-device-width:481px) and (max-device-width:1024px) and (orientation:portrait) { |
|||
#page > div { margin-right: 0; |
|||
#main { float: none; } |
|||
> aside { margin: 0; float: none; } |
|||
} |
|||
page > div > aside { float: none; } |
|||
body { > header, > nav, > footer { > div { padding: 0 15px; }}} |
|||
#main > * { padding-left: 15px; padding-right: 15px; } |
|||
} |
|||
|
|||
@media only screen and (min-device-width: 320px) and (max-device-width: 480px) { |
|||
body { > header, > nav, > footer { > div { padding: 0 10px; }}} |
|||
#main > * { padding-left: 10px; padding-right: 10px; } |
|||
#page > div { margin: none; > aside { float: none; }} |
|||
} |
|||
|
|||
//*{ |
|||
//transition: width .5s; |
|||
//-moz-transition: width .5s; |
|||
//-webkit-transition: margin .5s; |
|||
//} |
|||
|
|||
|
|||
//#search { left: $page-width + $sidebar-margin - $sidebar-width; } |
@ -1,30 +0,0 @@ |
|||
#nav { |
|||
@extend .group; |
|||
position: relative; |
|||
z-index: 1; |
|||
background-color: $nav-bg; |
|||
@include background-image(linear-gradient(#fcfcfc, #f4f4f4 0.3, #dddddd)); |
|||
border: { |
|||
top: 1px solid $nav-border-top; |
|||
bottom: 1px solid $nav-border-bottom; }; |
|||
ul { |
|||
position: relative; |
|||
@include horizontal-list; |
|||
margin: 0 auto; |
|||
padding: 6px 0; |
|||
li { |
|||
padding: 0 15px; |
|||
border-left: 1px solid $nav-border-left; |
|||
border-right: 1px solid $nav-border-right; |
|||
&:first-child { |
|||
border-left: none; |
|||
padding-left: 0; } |
|||
&:last-child { |
|||
border-right: 0; } |
|||
a { |
|||
display: inline-block; |
|||
color: $nav-color; |
|||
line-height: 150%; |
|||
text-decoration: none; |
|||
&:hover { |
|||
color: $nav-color-hover; } } } } } |
@ -1,19 +0,0 @@ |
|||
#search { |
|||
position: absolute; |
|||
top: 30%; |
|||
form { |
|||
background: image-url("search_bg.png") no-repeat; |
|||
padding: 0; |
|||
height: 28px; |
|||
width: 218px; } |
|||
#q { |
|||
background: none; |
|||
position: relative; |
|||
top: 1px; |
|||
width: 160px; |
|||
margin-left: 30px; |
|||
font-size: 15px; |
|||
border: none; |
|||
color: #aaaaaa; |
|||
&:focus { |
|||
outline: none; } } } |
@ -1,38 +0,0 @@ |
|||
.subscribe a { |
|||
display: inline-block; |
|||
padding-left: 28px; |
|||
background: image-url("rss.png") left top no-repeat; } |
|||
#sidebar { |
|||
line-height: 1.45em; |
|||
font-size: 90%; |
|||
h3 { |
|||
margin: 20px -15px 10px; |
|||
padding: 12px 15px; |
|||
background: white; |
|||
border-bottom: 1px solid #e5e5e5; |
|||
border-top: 1px solid #e5e5e5; |
|||
&:first-child { |
|||
margin-top: 0; } } } |
|||
|
|||
#twitter, #delicious { |
|||
@include border-radius; |
|||
background: #f8f8f8; |
|||
border: 1px solid #eeeeee; |
|||
padding: 5px 0; |
|||
ul { |
|||
list-style-type: none; |
|||
margin: 0; } |
|||
li { |
|||
margin: 0 15px; |
|||
padding: 10px 0 0; |
|||
border-bottom: #dddddd 1px dashed; |
|||
&:last-child { |
|||
border-bottom: 0; } } } |
|||
|
|||
#delicious { |
|||
p { |
|||
font-style: italic; } |
|||
li { |
|||
color: #666666; |
|||
font-style: normal; |
|||
padding-bottom: 8px; } } |