Skip to content
Browse files

scroll to tag and cat title

  • Loading branch information...
1 parent 7c4dff8 commit 988c01ae63d7e0f3ece68f0c00aa30bffa713a81 @benbalter committed
Showing with 11 additions and 5 deletions.
  1. +7 −1 _cs/application.coffee
  2. +1 −1 _includes/js/application.js
  3. +1 −1 _includes/js/templates.js
  4. +1 −1 _templates/category._
  5. +1 −1 _templates/tag._
View
8 _cs/application.coffee
@@ -273,6 +273,9 @@ class Application.Views.Tag extends Backbone.View
render: ->
jQuery('#content').infinitescroll 'destory'
@$el.html @template({ tag: @model.toJSON() })
+ $.smoothScroll
+ scrollTarget: ".title"
+ offset: -60
class Application.Views.Category extends Backbone.View
el: "#content"
@@ -281,7 +284,10 @@ class Application.Views.Category extends Backbone.View
render: ->
jQuery('#content').infinitescroll 'destory'
@$el.html @template({ category: @model.toJSON() })
-
+ $.smoothScroll
+ scrollTarget: ".title"
+ offset: -60
+
# Router
class Router extends Backbone.Router
View
2 _includes/js/application.js
@@ -1 +1 @@
-(function(){var t,e,n={}.hasOwnProperty,o=function(t,e){function o(){this.constructor=t}for(var i in e)n.call(e,i)&&(t[i]=e[i]);return o.prototype=e.prototype,t.prototype=new o,t.__super__=e.prototype,t},i=function(t,e){return function(){return t.apply(e,arguments)}};window.Application={Models:{},Collections:{},Views:{},router:{},tags:{},categories:{},url:"{{ site.url }}",name:"{{ site.name }}",disqus:{name:"{{ site.disqus.shortname }}",api_key:"{{ site.disqus.api_key }}",count:"{{ site.disqus.count }}"},twitter:{count:"{{ site.twitter.count }}",username:"{{ site.twitter.username }}"}},Application.Models.Post=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.url=function(){return Application.url+"/"+this.id+".json"},e.prototype.defaults={author:"Benjamin J. Balter",title:"",url:"",content:"",tags:[],category:"",date:""},e}(Backbone.Model),Application.Models.Page=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.url=function(){return Application.url+"/"+this.id+".json"},e}(Backbone.Model),Application.Models.Thread=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.url=function(){var t;return t="https://disqus.com/api/3.0/threads/details.json?",t+="thread="+this.id,t+="&api_key="+Application.disqus.api_key,t+="&callback=?"},e.prototype.parse=function(t){return t.response},e}(Backbone.Model),Application.Models.Comment=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(){var t=this;return this.set("thread",new Application.Models.Thread({id:this.get("thread")})),this.get("thread").fetch({success:function(){return t.collection.trigger("change")}})},e}(Backbone.Model),Application.Models.Tweet=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e}(Backbone.Model),Application.Models.Tag=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e}(Backbone.Model),Application.Models.Category=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e}(Backbone.Model),Application.Collections.Comments=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.model=Application.Models.Comment,e.prototype.url=function(){var t;return t="https://disqus.com/api/3.0/posts/list.json?",t+="forum="+Application.disqus.name,t+="&limit="+Application.disqus.count,t+="&api_key="+Application.disqus.api_key,t+="&callback=?"},e.prototype.parse=function(t){return t.response},e}(Backbone.Collection),Application.Collections.Tweets=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.model=Application.Models.Tweet,e.prototype.url=function(){var t;return t="https://api.twitter.com/1/statuses/user_timeline.json?include_rts=true",t+="&screen_name="+Application.twitter.username,t+="&count="+Application.twitter.count,t+="&callback=?"},e}(Backbone.Collection),Application.Collections.Posts=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.model=Application.Models.Post,e.prototype.url=function(){return Application.url+"/"+"pages.json"},e.prototype.comparator=function(t,e){var n;return t=t.get("date"),e=e.get("date"),t===e?n=1:t>e?n=-1:e>t&&(n=1),n},e}(Backbone.Collection),Application.Collections.Pages=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.model=Application.Models.Page,e.prototype.url=function(){return Application.url+"/"+"pages.json"},e}(Backbone.Collection),Application.Collections.Tags=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.model=Application.Models.Tag,e.prototype.url=function(){return Application.url+"/tags.json"},e.prototype.initialize=function(){return this.fetch()},e.prototype.parse=function(t){var e,n,o;for(n=0,o=t.length;o>n;n++)e=t[n],e.posts=new Application.Collections.Posts(e.posts);return t},e}(Backbone.Collection),Application.Collections.Categories=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.model=Application.Models.Category,e.prototype.url=function(){return Application.url+"/categories.json"},e.prototype.initialize=function(){return this.fetch()},e.prototype.parse=function(t){var e,n,o;for(n=0,o=t.length;o>n;n++)e=t[n],e.posts=new Application.Collections.Posts(e.posts);return t},e}(Backbone.Collection),Application.Views.Post=function(t){function e(){return this.render=i(this.render,this),e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.el="#main",e.prototype.tagName="article",e.prototype["class"]="post",e.prototype.template=JST.post,e.prototype.render=function(){return this.$el.append(this.template(this.model.toJSON())),this.model.get("comments")?this.loadDisqus():void 0},e.prototype.loadDisqus=function(){var t;return jQuery("#content").infinitescroll("destory"),window.disqus_shortname=Application.disqus.name,window.disqus_identifier=this.model.get("id"),window.disqus_url=Application.url+"/"+this.model.get("id"),window.disqus_title=this.model.get("title")+" » "+Application.name,"undefined"!=typeof DISQUS&&null!==DISQUS?DISQUS.reset({reload:!0,config:function(){return this.page.identifier=disqus_identifier,this.page.url=disqus_url,this.page.title=disqus_title}}):(t=document.createElement("script"),t.type="text/javascript",t.async=!0,t.src="http://"+disqus_shortname+".disqus.com/embed.js",(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(t))},e}(Backbone.View),Application.Views.PostExcerpt=function(t){function e(){return this.render=i(this.render,this),e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.el=".posts",e.prototype.tagName="article",e.prototype["class"]="post",e.prototype.template=JST.post_excerpt,e.prototype.initialize=function(){return this.model.on("change",this.render)},e.prototype.render=function(){var t;return t=this.getExcerpted(),this.$el.append(this.template(t.toJSON()))},e.prototype.getExcerpted=function(){var t;return t=this.model.clone(),t.set("content",this.model.get("content").split("<!-- more -->")[0]),t},e}(Backbone.View),Application.Views.Page=function(t){function e(){return this.render=i(this.render,this),e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.el="#main",e.prototype.tagName="article",e.prototype["class"]="page",e.prototype.template=JST.page,e.prototype.render=function(){return jQuery("#content").infinitescroll("destory"),this.$el.html(this.template(this.model.toJSON())),"undefined"!=typeof DISQUS&&null!==DISQUS&&DISQUS.reset(),this.resume_resize()},e.prototype.resume_resize=function(){return $(".page-resume .bar").height($(".content").height()-15)},e}(Backbone.View),Application.Views.Single=function(t){function e(){return this.render=i(this.render,this),e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.el="#content",e.prototype.template=JST.single,e.prototype.initialize=function(){return this.model.on("change",this.render)},e.prototype.render=function(){var t;return jQuery("#content").infinitescroll("destory"),this.$el.html(this.template(this.model.toJSON())),"post"===this.model.get("layout")?t=new Application.Views.Post({model:this.model}):"page"===this.model.get("layout")&&(t=new Application.Views.Page({model:this.model})),document.title=this.model.get("title")+" » "+Application.name,t.render(),$.smoothScroll({scrollTarget:".title",offset:-60})},e}(Backbone.View),Application.Views.Index=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.el="#content",e.prototype.template=$("#index_layout").html(),e.prototype.render=function(){var t,e,n;return this.$el.html(this.template),this.collection.sort(),this.collection.slice(0,10).forEach(function(t){var e;return t.fetch(),e=new Application.Views.PostExcerpt({model:t})}),t=new Application.Collections.Comments,n=new Application.Views.CommentView({collection:t}),t.fetch(),e=new Application.Collections.Tweets,n=new Application.Views.TweetView({collection:e}),e.fetch(),jQuery("#content").infinitescroll({navSelector:"nav.pagination",nextSelector:"nav.pagination #next",itemSelector:"article.post"})},e}(Backbone.View),Application.Views.CommentView=function(t){function e(){return this.render=i(this.render,this),this.initialize=i(this.initialize,this),e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.el="#recentcomments",e.prototype.template=JST.recent_comments,e.prototype.initialize=function(){return this.collection.on("change",this.render)},e.prototype.render=function(){return this.$el.html(this.template({comments:this.collection.toJSON()}))},e}(Backbone.View),Application.Views.TweetView=function(t){function e(){return this.render=i(this.render,this),this.initialize=i(this.initialize,this),e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.el="#tweets",e.prototype.template=JST.recent_tweets,e.prototype.initialize=function(){return this.collection.on("all",this.render)},e.prototype.render=function(){return this.$el.html(this.template({tweets:this.collection.toJSON()}))},e}(Backbone.View),Application.Views.Tag=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.el="#content",e.prototype.template=JST.tag,e.prototype.render=function(){return jQuery("#content").infinitescroll("destory"),this.$el.html(this.template({tag:this.model.toJSON()}))},e}(Backbone.View),Application.Views.Category=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.el="#content",e.prototype.template=JST.category,e.prototype.render=function(){return jQuery("#content").infinitescroll("destory"),this.$el.html(this.template({category:this.model.toJSON()}))},e}(Backbone.View),t=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.routes={":year/:month/:day/:slug/":"post","tags/:tag/":"tag","categories/:category/":"category",":slug/":"page","":"index"},e.prototype.post=function(t,e,n,o){var i,r;return i=new Application.Models.Post({id:t+"/"+e+"/"+n+"/"+o}),Application.posts.add(i),r=new Application.Views.Single({model:i}),i.fetch({error:this.redirect}),this.setNav("")},e.prototype.page=function(t){var e,n;return e=new Application.Models.Page({id:t}),Application.pages.add(e),n=new Application.Views.Single({model:e}),e.fetch({error:this.redirect}),this.setNav(t.replace("/",""))},e.prototype.index=function(){var t;return t=new Application.Views.Index({collection:Application.posts}),Application.posts.fetch({error:this.redirect,success:function(){return t.render()}}),this.setNav("home")},e.prototype.tag=function(t){return Application.tags=new Application.Collections.Tags,Application.tags.on("reset",function(){return new Application.Views.Tag({model:Application.tags.get(t)}).render()})},e.prototype.category=function(t){return Application.categories=new Application.Collections.Categories,Application.categories.on("reset",function(){return new Application.Views.Category({model:Application.categories.get(t)}).render()})},e.prototype.redirect=function(){return document.location=Application.url+"/"+Backbone.history.fragment},e.prototype.setNav=function(t){return $(".nav .active").removeClass("active"),t.length?$(".nav #"+t).addClass("active"):void 0},e}(Backbone.Router),Application.posts=new Application.Collections.Posts,Application.pages=new Application.Collections.Pages,Application.router=new t,Backbone.history.start({pushState:!0,silent:!0}),e!==void 0&&null!==e&&(e=null,Application.router.navigate(document.location.pathname.replace("/",""),{trigger:!0})),jQuery(document).ready(function(){return window.resume_resize=function(){return $(".page-resume .bar").height($(".content").height()-15)},$(window).resize(resume_resize),resume_resize(),$('a[href^="{{ site.url }}/"]').live("click",function(t){return t.preventDefault(),Application.router.navigate($(this).attr("href").replace("{{ site.url }}/",""),{trigger:!0}),!1}),""===Backbone.history.fragment?jQuery("#content").infinitescroll({navSelector:"nav.pagination",nextSelector:"nav.pagination #next",itemSelector:"article.post"}):void 0})}).call(this);
+(function(){var t,e,n={}.hasOwnProperty,o=function(t,e){function o(){this.constructor=t}for(var i in e)n.call(e,i)&&(t[i]=e[i]);return o.prototype=e.prototype,t.prototype=new o,t.__super__=e.prototype,t},i=function(t,e){return function(){return t.apply(e,arguments)}};window.Application={Models:{},Collections:{},Views:{},router:{},tags:{},categories:{},url:"{{ site.url }}",name:"{{ site.name }}",disqus:{name:"{{ site.disqus.shortname }}",api_key:"{{ site.disqus.api_key }}",count:"{{ site.disqus.count }}"},twitter:{count:"{{ site.twitter.count }}",username:"{{ site.twitter.username }}"}},Application.Models.Post=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.url=function(){return Application.url+"/"+this.id+".json"},e.prototype.defaults={author:"Benjamin J. Balter",title:"",url:"",content:"",tags:[],category:"",date:""},e}(Backbone.Model),Application.Models.Page=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.url=function(){return Application.url+"/"+this.id+".json"},e}(Backbone.Model),Application.Models.Thread=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.url=function(){var t;return t="https://disqus.com/api/3.0/threads/details.json?",t+="thread="+this.id,t+="&api_key="+Application.disqus.api_key,t+="&callback=?"},e.prototype.parse=function(t){return t.response},e}(Backbone.Model),Application.Models.Comment=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.initialize=function(){var t=this;return this.set("thread",new Application.Models.Thread({id:this.get("thread")})),this.get("thread").fetch({success:function(){return t.collection.trigger("change")}})},e}(Backbone.Model),Application.Models.Tweet=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e}(Backbone.Model),Application.Models.Tag=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e}(Backbone.Model),Application.Models.Category=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e}(Backbone.Model),Application.Collections.Comments=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.model=Application.Models.Comment,e.prototype.url=function(){var t;return t="https://disqus.com/api/3.0/posts/list.json?",t+="forum="+Application.disqus.name,t+="&limit="+Application.disqus.count,t+="&api_key="+Application.disqus.api_key,t+="&callback=?"},e.prototype.parse=function(t){return t.response},e}(Backbone.Collection),Application.Collections.Tweets=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.model=Application.Models.Tweet,e.prototype.url=function(){var t;return t="https://api.twitter.com/1/statuses/user_timeline.json?include_rts=true",t+="&screen_name="+Application.twitter.username,t+="&count="+Application.twitter.count,t+="&callback=?"},e}(Backbone.Collection),Application.Collections.Posts=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.model=Application.Models.Post,e.prototype.url=function(){return Application.url+"/"+"pages.json"},e.prototype.comparator=function(t,e){var n;return t=t.get("date"),e=e.get("date"),t===e?n=1:t>e?n=-1:e>t&&(n=1),n},e}(Backbone.Collection),Application.Collections.Pages=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.model=Application.Models.Page,e.prototype.url=function(){return Application.url+"/"+"pages.json"},e}(Backbone.Collection),Application.Collections.Tags=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.model=Application.Models.Tag,e.prototype.url=function(){return Application.url+"/tags.json"},e.prototype.initialize=function(){return this.fetch()},e.prototype.parse=function(t){var e,n,o;for(n=0,o=t.length;o>n;n++)e=t[n],e.posts=new Application.Collections.Posts(e.posts);return t},e}(Backbone.Collection),Application.Collections.Categories=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.model=Application.Models.Category,e.prototype.url=function(){return Application.url+"/categories.json"},e.prototype.initialize=function(){return this.fetch()},e.prototype.parse=function(t){var e,n,o;for(n=0,o=t.length;o>n;n++)e=t[n],e.posts=new Application.Collections.Posts(e.posts);return t},e}(Backbone.Collection),Application.Views.Post=function(t){function e(){return this.render=i(this.render,this),e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.el="#main",e.prototype.tagName="article",e.prototype["class"]="post",e.prototype.template=JST.post,e.prototype.render=function(){return this.$el.append(this.template(this.model.toJSON())),this.model.get("comments")?this.loadDisqus():void 0},e.prototype.loadDisqus=function(){var t;return jQuery("#content").infinitescroll("destory"),window.disqus_shortname=Application.disqus.name,window.disqus_identifier=this.model.get("id"),window.disqus_url=Application.url+"/"+this.model.get("id"),window.disqus_title=this.model.get("title")+" » "+Application.name,"undefined"!=typeof DISQUS&&null!==DISQUS?DISQUS.reset({reload:!0,config:function(){return this.page.identifier=disqus_identifier,this.page.url=disqus_url,this.page.title=disqus_title}}):(t=document.createElement("script"),t.type="text/javascript",t.async=!0,t.src="http://"+disqus_shortname+".disqus.com/embed.js",(document.getElementsByTagName("head")[0]||document.getElementsByTagName("body")[0]).appendChild(t))},e}(Backbone.View),Application.Views.PostExcerpt=function(t){function e(){return this.render=i(this.render,this),e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.el=".posts",e.prototype.tagName="article",e.prototype["class"]="post",e.prototype.template=JST.post_excerpt,e.prototype.initialize=function(){return this.model.on("change",this.render)},e.prototype.render=function(){var t;return t=this.getExcerpted(),this.$el.append(this.template(t.toJSON()))},e.prototype.getExcerpted=function(){var t;return t=this.model.clone(),t.set("content",this.model.get("content").split("<!-- more -->")[0]),t},e}(Backbone.View),Application.Views.Page=function(t){function e(){return this.render=i(this.render,this),e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.el="#main",e.prototype.tagName="article",e.prototype["class"]="page",e.prototype.template=JST.page,e.prototype.render=function(){return jQuery("#content").infinitescroll("destory"),this.$el.html(this.template(this.model.toJSON())),"undefined"!=typeof DISQUS&&null!==DISQUS&&DISQUS.reset(),this.resume_resize()},e.prototype.resume_resize=function(){return $(".page-resume .bar").height($(".content").height()-15)},e}(Backbone.View),Application.Views.Single=function(t){function e(){return this.render=i(this.render,this),e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.el="#content",e.prototype.template=JST.single,e.prototype.initialize=function(){return this.model.on("change",this.render)},e.prototype.render=function(){var t;return jQuery("#content").infinitescroll("destory"),this.$el.html(this.template(this.model.toJSON())),"post"===this.model.get("layout")?t=new Application.Views.Post({model:this.model}):"page"===this.model.get("layout")&&(t=new Application.Views.Page({model:this.model})),document.title=this.model.get("title")+" » "+Application.name,t.render(),$.smoothScroll({scrollTarget:".title",offset:-60})},e}(Backbone.View),Application.Views.Index=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.el="#content",e.prototype.template=$("#index_layout").html(),e.prototype.render=function(){var t,e,n;return this.$el.html(this.template),this.collection.sort(),this.collection.slice(0,10).forEach(function(t){var e;return t.fetch(),e=new Application.Views.PostExcerpt({model:t})}),t=new Application.Collections.Comments,n=new Application.Views.CommentView({collection:t}),t.fetch(),e=new Application.Collections.Tweets,n=new Application.Views.TweetView({collection:e}),e.fetch(),jQuery("#content").infinitescroll({navSelector:"nav.pagination",nextSelector:"nav.pagination #next",itemSelector:"article.post"})},e}(Backbone.View),Application.Views.CommentView=function(t){function e(){return this.render=i(this.render,this),this.initialize=i(this.initialize,this),e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.el="#recentcomments",e.prototype.template=JST.recent_comments,e.prototype.initialize=function(){return this.collection.on("change",this.render)},e.prototype.render=function(){return this.$el.html(this.template({comments:this.collection.toJSON()}))},e}(Backbone.View),Application.Views.TweetView=function(t){function e(){return this.render=i(this.render,this),this.initialize=i(this.initialize,this),e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.el="#tweets",e.prototype.template=JST.recent_tweets,e.prototype.initialize=function(){return this.collection.on("all",this.render)},e.prototype.render=function(){return this.$el.html(this.template({tweets:this.collection.toJSON()}))},e}(Backbone.View),Application.Views.Tag=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.el="#content",e.prototype.template=JST.tag,e.prototype.render=function(){return jQuery("#content").infinitescroll("destory"),this.$el.html(this.template({tag:this.model.toJSON()})),$.smoothScroll({scrollTarget:".title",offset:-60})},e}(Backbone.View),Application.Views.Category=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.el="#content",e.prototype.template=JST.category,e.prototype.render=function(){return jQuery("#content").infinitescroll("destory"),this.$el.html(this.template({category:this.model.toJSON()})),$.smoothScroll({scrollTarget:".title",offset:-60})},e}(Backbone.View),t=function(t){function e(){return e.__super__.constructor.apply(this,arguments)}return o(e,t),e.prototype.routes={":year/:month/:day/:slug/":"post","tags/:tag/":"tag","categories/:category/":"category",":slug/":"page","":"index"},e.prototype.post=function(t,e,n,o){var i,r;return i=new Application.Models.Post({id:t+"/"+e+"/"+n+"/"+o}),Application.posts.add(i),r=new Application.Views.Single({model:i}),i.fetch({error:this.redirect}),this.setNav("")},e.prototype.page=function(t){var e,n;return e=new Application.Models.Page({id:t}),Application.pages.add(e),n=new Application.Views.Single({model:e}),e.fetch({error:this.redirect}),this.setNav(t.replace("/",""))},e.prototype.index=function(){var t;return t=new Application.Views.Index({collection:Application.posts}),Application.posts.fetch({error:this.redirect,success:function(){return t.render()}}),this.setNav("home")},e.prototype.tag=function(t){return Application.tags=new Application.Collections.Tags,Application.tags.on("reset",function(){return new Application.Views.Tag({model:Application.tags.get(t)}).render()})},e.prototype.category=function(t){return Application.categories=new Application.Collections.Categories,Application.categories.on("reset",function(){return new Application.Views.Category({model:Application.categories.get(t)}).render()})},e.prototype.redirect=function(){return document.location=Application.url+"/"+Backbone.history.fragment},e.prototype.setNav=function(t){return $(".nav .active").removeClass("active"),t.length?$(".nav #"+t).addClass("active"):void 0},e}(Backbone.Router),Application.posts=new Application.Collections.Posts,Application.pages=new Application.Collections.Pages,Application.router=new t,Backbone.history.start({pushState:!0,silent:!0}),e!==void 0&&null!==e&&(e=null,Application.router.navigate(document.location.pathname.replace("/",""),{trigger:!0})),jQuery(document).ready(function(){return window.resume_resize=function(){return $(".page-resume .bar").height($(".content").height()-15)},$(window).resize(resume_resize),resume_resize(),$('a[href^="{{ site.url }}/"]').live("click",function(t){return t.preventDefault(),Application.router.navigate($(this).attr("href").replace("{{ site.url }}/",""),{trigger:!0}),!1}),""===Backbone.history.fragment?jQuery("#content").infinitescroll({navSelector:"nav.pagination",nextSelector:"nav.pagination #next",itemSelector:"article.post"}):void 0})}).call(this);
View
2 _includes/js/templates.js
@@ -1 +1 @@
-this.JST=this.JST||{},this.JST.category=function(obj){var __p="";with(obj||{})__p+='<h1>Posts categorized "'+category.id+'"</h1>\n<ul>\n',category.posts.forEach(function(t){__p+='\n <li><a href="'+(Application.url+t.get("url"))+'">'+t.get("title")+"</a></li>\n"}),__p+="\n</ul>";return __p},this.JST.index=function(obj){var __p="";with(obj||{})__p+='<div class="row-fluid">\n\n <div class="span9">\n \n <div class="posts">\n \n </div><!-- posts -->\n \n </div><!-- span9 -->\n \n <div class="span3">\n \n <div class="well sidebar">\n \n <h4>About Ben</h4>\n Ben Balter is a gov 2.0 evangelist working to hack federal government from the inside out, an open-source developer passionate about the disruptive power of technology, and a J.D./M.B.A. candidate at the George Washington University. After graduation he hopes to stay in the nation\'s capital and bridge his life-long passions for law and technology. Check out his <a href="http://localhost:4000/resume/">resume</a> or <a href="http://localhost:4000/about/">read on</a>.\n \n <h4>Recent Tweets</h4>\n <ul id="tweets"></ul>\n \n <h4>Recent Posts</h4>\n <ul clas="posts" id="recent-posts">\n \n <li><a href="http://localhost:4000/2012/12/27/introducing-jekyllbot/">Introducing JekyllBot</a></li>\n \n <li><a href="http://localhost:4000/2012/12/26/securing-the-status-quo/">Securing the Status Quo</a></li>\n \n <li><a href="http://localhost:4000/2012/12/16/deprecate-management/">Deprecate Management</a></li>\n \n <li><a href="http://localhost:4000/2012/12/15/why-wordpress-next-version-should-just-give-it-a-rest-already/">Why WordPress\'s next version should just give it a REST already</a></li>\n \n <li><a href="http://localhost:4000/2012/10/19/we-ve-been-trained-to-make-paper/">We\'ve been trained to make paper</a></li>\n \n </ul>\n \n <h4>Subscribe</h4>\n <form style="text-align:center;" action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open(\'http://feedburner.google.com/fb/a/mailverify?uri=benbalter\', \'popupwindow\', \'scrollbars=yes,width=550,height=520\');return true"><p><input type="text" style="width:140px" name="email" placeholder="Email Address"/></p><input type="hidden" value="benbalter" name="uri"/><input type="hidden" name="loc" value="en_US"/><input type="submit" value="Subscribe" class="btn" /></form>\n \n <h4>Recent Comments</h4>\n <div id="recentcomments" class="dsq-widget"></div>\n \n <h4>Tags</h4>\n <ul id="tag-cloud"> <li class="tag" id="career"><a href="tags/#career" style="font-size: 6px;">career</a></li> <li class="tag" id="job"><a href="tags/#job" style="font-size: 4px;">job</a></li> <li class="tag" id="online reputation"><a href="tags/#online reputation" style="font-size: 6px;">online reputation</a></li> <li class="tag" id="open source"><a href="tags/#open source" style="font-size: 52px;">open source</a></li> <li class="tag" id="plugin"><a href="tags/#plugin" style="font-size: 22px;">plugin</a></li> <li class="tag" id="Resume"><a href="tags/#Resume" style="font-size: 4px;">Resume</a></li> <li class="tag" id="wordpress"><a href="tags/#wordpress" style="font-size: 42px;">wordpress</a></li> <li class="tag" id="generation gap"><a href="tags/#generation gap" style="font-size: 8px;">generation gap</a></li> <li class="tag" id="gw"><a href="tags/#gw" style="font-size: 4px;">gw</a></li> <li class="tag" id="pr"><a href="tags/#pr" style="font-size: 4px;">pr</a></li> <li class="tag" id="social media"><a href="tags/#social media" style="font-size: 6px;">social media</a></li> <li class="tag" id="twitter"><a href="tags/#twitter" style="font-size: 12px;">twitter</a></li> <li class="tag" id="cloud computing"><a href="tags/#cloud computing" style="font-size: 18px;">cloud computing</a></li> <li class="tag" id="digital due process"><a href="tags/#digital due process" style="font-size: 12px;">digital due process</a></li> <li class="tag" id="google"><a href="tags/#google" style="font-size: 14px;">google</a></li> <li class="tag" id="privacy"><a href="tags/#privacy" style="font-size: 10px;">privacy</a></li> <li class="tag" id="agile"><a href="tags/#agile" style="font-size: 10px;">agile</a></li> <li class="tag" id="federal"><a href="tags/#federal" style="font-size: 26px;">federal</a></li> <li class="tag" id="government"><a href="tags/#government" style="font-size: 38px;">government</a></li> <li class="tag" id="procurement"><a href="tags/#procurement" style="font-size: 24px;">procurement</a></li> <li class="tag" id="copyright"><a href="tags/#copyright" style="font-size: 10px;">copyright</a></li> <li class="tag" id="facebook"><a href="tags/#facebook" style="font-size: 10px;">facebook</a></li> <li class="tag" id="journalism"><a href="tags/#journalism" style="font-size: 14px;">journalism</a></li> <li class="tag" id="plagiarism"><a href="tags/#plagiarism" style="font-size: 4px;">plagiarism</a></li> <li class="tag" id="contracting"><a href="tags/#contracting" style="font-size: 18px;">contracting</a></li> <li class="tag" id="censorship"><a href="tags/#censorship" style="font-size: 6px;">censorship</a></li> <li class="tag" id="e-commerce"><a href="tags/#e-commerce" style="font-size: 4px;">e-commerce</a></li> <li class="tag" id="fcc"><a href="tags/#fcc" style="font-size: 8px;">fcc</a></li> <li class="tag" id="api"><a href="tags/#api" style="font-size: 4px;">api</a></li> <li class="tag" id="code"><a href="tags/#code" style="font-size: 26px;">code</a></li> <li class="tag" id="hack"><a href="tags/#hack" style="font-size: 6px;">hack</a></li> <li class="tag" id="presentation"><a href="tags/#presentation" style="font-size: 10px;">presentation</a></li> <li class="tag" id="document management"><a href="tags/#document management" style="font-size: 10px;">document management</a></li> <li class="tag" id="gsoc"><a href="tags/#gsoc" style="font-size: 8px;">gsoc</a></li> <li class="tag" id="analytics"><a href="tags/#analytics" style="font-size: 6px;">analytics</a></li> <li class="tag" id="collaboration"><a href="tags/#collaboration" style="font-size: 18px;">collaboration</a></li> <li class="tag" id="enterprise"><a href="tags/#enterprise" style="font-size: 32px;">enterprise</a></li> <li class="tag" id="sharepoint"><a href="tags/#sharepoint" style="font-size: 6px;">sharepoint</a></li> <li class="tag" id="workflow"><a href="tags/#workflow" style="font-size: 12px;">workflow</a></li> <li class="tag" id=".govs"><a href="tags/#.govs" style="font-size: 16px;">.govs</a></li> <li class="tag" id="drupal"><a href="tags/#drupal" style="font-size: 4px;">drupal</a></li> <li class="tag" id="gov 2.0"><a href="tags/#gov 2.0" style="font-size: 26px;">gov 2.0</a></li> <li class="tag" id="open government"><a href="tags/#open government" style="font-size: 12px;">open government</a></li> <li class="tag" id="development"><a href="tags/#development" style="font-size: 4px;">development</a></li> <li class="tag" id="IT"><a href="tags/#IT" style="font-size: 16px;">IT</a></li> <li class="tag" id="github"><a href="tags/#github" style="font-size: 8px;">github</a></li> <li class="tag" id="proprietary"><a href="tags/#proprietary" style="font-size: 6px;">proprietary</a></li> <li class="tag" id="cfpb"><a href="tags/#cfpb" style="font-size: 4px;">cfpb</a></li> <li class="tag" id="git"><a href="tags/#git" style="font-size: 4px;">git</a></li> <li class="tag" id="policy"><a href="tags/#policy" style="font-size: 4px;">policy</a></li> <li class="tag" id="REST"><a href="tags/#REST" style="font-size: 4px;">REST</a></li> <li class="tag" id="WordPress"><a href="tags/#WordPress" style="font-size: 4px;">WordPress</a></li> <li class="tag" id="Jekyll"><a href="tags/#Jekyll" style="font-size: 4px;">Jekyll</a></li> <li class="tag" id="GitHub"><a href="tags/#GitHub" style="font-size: 8px;">GitHub</a></li> <li class="tag" id="community building"><a href="tags/#community building" style="font-size: 4px;">community building</a></li> <li class="tag" id="API"><a href="tags/#API" style="font-size: 4px;">API</a></li> </ul>\n \n <h4>Meta</h4>\n <ul class="meta">\n <li id="fork"><a href="http://github.com/benbalter/benbalter.github.com/">Fork on GitHub</a></li>\n <li id="fine-print"><a href="http://localhost:4000/fine-print/">Fine Print</a></li>\n </ul> \n \n </div><!--/.well -->\n </div><!-- span3 -->\n \n</div><!-- row-fluid -->';return __p},this.JST.page=function(obj){var __p="";with(obj||{})__p+='<h2 class="title">'+title+"</h2>\n\n"+content+"\n\n";return __p},this.JST.post=function(obj){var __p="";with(obj||{})__p+='\n<article id="post'+id.replace(/\//g,"-")+'" class="post post'+id.replace(/\//g,"-")+'">\n \n <h2 class="title"><a href="{{ site.url }}'+url+'">'+title+'</a></h2> \n\n <div class="post-meta">\n <span class="entry-date">Posted on '+moment(date).format("MMMM D, YYYY")+'</span> \n <span class="entry-author">by '+author+'</span>\n </div>\n \n <div class="entrybody">\n '+content+'\n </div>\n \n <div class="related">\n <h4>Related Posts:</h4>\n <ol class="related-posts">\n ',_.each(related_posts.slice(0,5),function(t){__p+='\n <li><a href="'+t.url+'">'+t.title+"</a></li>\n "}),__p+='\n </ol>\n </div>\n\n <div class="post-taxonomies">\n Posted in <a href="{{ site.url }}/categories/'+category+'/">'+category+"</a> | Tagged ",_.each(tags,function(t){__p+=' <a href="{{ site.url }}/tags/'+t+'/">'+t+"</a>, "}),__p+='\n </div>\n \n</article>\n\n<div id="disqus_thread"></div>\n\n';return __p},this.JST.post_excerpt=function(obj){var __p="";with(obj||{})__p+='<article id="post'+id.replace(/\//g,"-")+'" class="post post-excerpt post'+id.replace(/\//g,"-")+'">\n \n <h2 class="title"><a href="{{ site.url }}'+url+'">'+title+'</a></h2> \n\n <div class="post-meta">\n <span class="entry-date">Posted on '+moment(date).format("MMMM D, YYYY")+'</span> \n <span class="entry-author">by '+author+'</span>\n </div>\n \n <div class="entrybody">\n '+content+'\n </div>\n\n <div class="post-taxonomies">\n Posted in <a href="{{ site.url }}/categories/'+category+'">'+category+"</a> | Tagged ",_.each(tags,function(t){__p+=' <a href="{{ site.url }}/tags/'+t+'">'+t+"</a>, "}),__p+="\n </div>\n \n</article>\n";return __p},this.JST.recent_comments=function(obj){var __p="";with(obj||{})__p+='<ul class="comments>\n',_.each(comments,function(t){__p+='\n <li class="comment">\n <div class="author">\n <img src="'+t.author.avatar.small.cache+'" alt="'+t.author.name+'"/>\n <a href="'+t.author.profileUrl+'">'+t.author.name+'</a>\n </div>\n <div class="commentBody">\n "\n '+t.raw_message.substring(0,200)+"\n ",t.raw_message.length>200&&(__p+="..."),__p+='\n "</div>\n <a class="commentTimeStamp" href="'+t.thread.attributes.link+"#comment-"+t.id+'">'+moment(t.createdAt).fromNow()+'</a> on\n <a class="commentPost" href="'+t.thread.attributes.link+'">'+t.thread.attributes.title+"</a>\n </li>\n"}),__p+="\n</ul>";return __p},this.JST.recent_tweets=function(obj){var __p="";with(obj||{})__p+='<ul class="tweets">\n ',_.each(tweets,function(t){__p+='\n <li class="tweet">'+t.text+' — <a href="http://twitter.com/'+t.user.screen_name+"/status/"+t.id+'">'+moment(t.created_at).fromNow()+"</a></li>\n "}),__p+="\n<ul>";return __p},this.JST.single=function(obj){var __p="";with(obj||{})__p+='<div class="'+layout+" "+layout+"-"+id.replace("/","")+'">\n <div class="row-fluid">\n <div class="span2">&nbsp;</div>\n <div class="span8">\n <div id="main">\n </div>\n \n <div class="improve-article-wrapper"> \n <div class="improve-article"> \n ',edit_url="http://edit.benbalter.com/#benbalter/benbalter.github.com/edit/master/","post"==layout&&(edit_url+="_posts/"),edit_url+=id.replace("/","").replace(/\//g,"-")+".md",__p+='\n \n <a class="button btn" href="'+edit_url+'">Edit</a> \n <p> This content is open source. Please help to improve it by <a href="'+edit_url+'">contributing</a>.</p>\n \n </div> \n </div>\n </div>\n </div>\n </div>\n</div>';return __p},this.JST.tag=function(obj){var __p="";with(obj||{})__p+='<h1>Posts tagged "'+tag.id+'"</h1>\n<ul>\n',tag.posts.forEach(function(t){__p+='\n <li><a href="'+(Application.url+t.get("url"))+'">'+t.get("title")+"</a></li>\n"}),__p+="\n</ul>";return __p};
+this.JST=this.JST||{},this.JST.category=function(obj){var __p="";with(obj||{})__p+='<h1 class="title">Posts categorized "'+category.id+'"</h1>\n<ul>\n',category.posts.forEach(function(t){__p+='\n <li><a href="'+(Application.url+t.get("url"))+'">'+t.get("title")+"</a></li>\n"}),__p+="\n</ul>";return __p},this.JST.index=function(obj){var __p="";with(obj||{})__p+='<div class="row-fluid">\n\n <div class="span9">\n \n <div class="posts">\n \n </div><!-- posts -->\n \n </div><!-- span9 -->\n \n <div class="span3">\n \n <div class="well sidebar">\n \n <h4>About Ben</h4>\n Ben Balter is a gov 2.0 evangelist working to hack federal government from the inside out, an open-source developer passionate about the disruptive power of technology, and a J.D./M.B.A. candidate at the George Washington University. After graduation he hopes to stay in the nation\'s capital and bridge his life-long passions for law and technology. Check out his <a href="http://localhost:4000/resume/">resume</a> or <a href="http://localhost:4000/about/">read on</a>.\n \n <h4>Recent Tweets</h4>\n <ul id="tweets"></ul>\n \n <h4>Recent Posts</h4>\n <ul clas="posts" id="recent-posts">\n \n <li><a href="http://localhost:4000/2012/12/27/introducing-jekyllbot/">Introducing JekyllBot</a></li>\n \n <li><a href="http://localhost:4000/2012/12/26/securing-the-status-quo/">Securing the Status Quo</a></li>\n \n <li><a href="http://localhost:4000/2012/12/16/deprecate-management/">Deprecate Management</a></li>\n \n <li><a href="http://localhost:4000/2012/12/15/why-wordpress-next-version-should-just-give-it-a-rest-already/">Why WordPress\'s next version should just give it a REST already</a></li>\n \n <li><a href="http://localhost:4000/2012/10/19/we-ve-been-trained-to-make-paper/">We\'ve been trained to make paper</a></li>\n \n </ul>\n \n <h4>Subscribe</h4>\n <form style="text-align:center;" action="http://feedburner.google.com/fb/a/mailverify" method="post" target="popupwindow" onsubmit="window.open(\'http://feedburner.google.com/fb/a/mailverify?uri=benbalter\', \'popupwindow\', \'scrollbars=yes,width=550,height=520\');return true"><p><input type="text" style="width:140px" name="email" placeholder="Email Address"/></p><input type="hidden" value="benbalter" name="uri"/><input type="hidden" name="loc" value="en_US"/><input type="submit" value="Subscribe" class="btn" /></form>\n \n <h4>Recent Comments</h4>\n <div id="recentcomments" class="dsq-widget"></div>\n \n <h4>Tags</h4>\n <ul id="tag-cloud"> <li class="tag" id="career"><a href="tags/#career" style="font-size: 6px;">career</a></li> <li class="tag" id="job"><a href="tags/#job" style="font-size: 4px;">job</a></li> <li class="tag" id="online reputation"><a href="tags/#online reputation" style="font-size: 6px;">online reputation</a></li> <li class="tag" id="open source"><a href="tags/#open source" style="font-size: 52px;">open source</a></li> <li class="tag" id="plugin"><a href="tags/#plugin" style="font-size: 22px;">plugin</a></li> <li class="tag" id="Resume"><a href="tags/#Resume" style="font-size: 4px;">Resume</a></li> <li class="tag" id="wordpress"><a href="tags/#wordpress" style="font-size: 42px;">wordpress</a></li> <li class="tag" id="generation gap"><a href="tags/#generation gap" style="font-size: 8px;">generation gap</a></li> <li class="tag" id="gw"><a href="tags/#gw" style="font-size: 4px;">gw</a></li> <li class="tag" id="pr"><a href="tags/#pr" style="font-size: 4px;">pr</a></li> <li class="tag" id="social media"><a href="tags/#social media" style="font-size: 6px;">social media</a></li> <li class="tag" id="twitter"><a href="tags/#twitter" style="font-size: 12px;">twitter</a></li> <li class="tag" id="cloud computing"><a href="tags/#cloud computing" style="font-size: 18px;">cloud computing</a></li> <li class="tag" id="digital due process"><a href="tags/#digital due process" style="font-size: 12px;">digital due process</a></li> <li class="tag" id="google"><a href="tags/#google" style="font-size: 14px;">google</a></li> <li class="tag" id="privacy"><a href="tags/#privacy" style="font-size: 10px;">privacy</a></li> <li class="tag" id="agile"><a href="tags/#agile" style="font-size: 10px;">agile</a></li> <li class="tag" id="federal"><a href="tags/#federal" style="font-size: 26px;">federal</a></li> <li class="tag" id="government"><a href="tags/#government" style="font-size: 38px;">government</a></li> <li class="tag" id="procurement"><a href="tags/#procurement" style="font-size: 24px;">procurement</a></li> <li class="tag" id="copyright"><a href="tags/#copyright" style="font-size: 10px;">copyright</a></li> <li class="tag" id="facebook"><a href="tags/#facebook" style="font-size: 10px;">facebook</a></li> <li class="tag" id="journalism"><a href="tags/#journalism" style="font-size: 14px;">journalism</a></li> <li class="tag" id="plagiarism"><a href="tags/#plagiarism" style="font-size: 4px;">plagiarism</a></li> <li class="tag" id="contracting"><a href="tags/#contracting" style="font-size: 18px;">contracting</a></li> <li class="tag" id="censorship"><a href="tags/#censorship" style="font-size: 6px;">censorship</a></li> <li class="tag" id="e-commerce"><a href="tags/#e-commerce" style="font-size: 4px;">e-commerce</a></li> <li class="tag" id="fcc"><a href="tags/#fcc" style="font-size: 8px;">fcc</a></li> <li class="tag" id="api"><a href="tags/#api" style="font-size: 4px;">api</a></li> <li class="tag" id="code"><a href="tags/#code" style="font-size: 26px;">code</a></li> <li class="tag" id="hack"><a href="tags/#hack" style="font-size: 6px;">hack</a></li> <li class="tag" id="presentation"><a href="tags/#presentation" style="font-size: 10px;">presentation</a></li> <li class="tag" id="document management"><a href="tags/#document management" style="font-size: 10px;">document management</a></li> <li class="tag" id="gsoc"><a href="tags/#gsoc" style="font-size: 8px;">gsoc</a></li> <li class="tag" id="analytics"><a href="tags/#analytics" style="font-size: 6px;">analytics</a></li> <li class="tag" id="collaboration"><a href="tags/#collaboration" style="font-size: 18px;">collaboration</a></li> <li class="tag" id="enterprise"><a href="tags/#enterprise" style="font-size: 32px;">enterprise</a></li> <li class="tag" id="sharepoint"><a href="tags/#sharepoint" style="font-size: 6px;">sharepoint</a></li> <li class="tag" id="workflow"><a href="tags/#workflow" style="font-size: 12px;">workflow</a></li> <li class="tag" id=".govs"><a href="tags/#.govs" style="font-size: 16px;">.govs</a></li> <li class="tag" id="drupal"><a href="tags/#drupal" style="font-size: 4px;">drupal</a></li> <li class="tag" id="gov 2.0"><a href="tags/#gov 2.0" style="font-size: 26px;">gov 2.0</a></li> <li class="tag" id="open government"><a href="tags/#open government" style="font-size: 12px;">open government</a></li> <li class="tag" id="development"><a href="tags/#development" style="font-size: 4px;">development</a></li> <li class="tag" id="IT"><a href="tags/#IT" style="font-size: 16px;">IT</a></li> <li class="tag" id="github"><a href="tags/#github" style="font-size: 8px;">github</a></li> <li class="tag" id="proprietary"><a href="tags/#proprietary" style="font-size: 6px;">proprietary</a></li> <li class="tag" id="cfpb"><a href="tags/#cfpb" style="font-size: 4px;">cfpb</a></li> <li class="tag" id="git"><a href="tags/#git" style="font-size: 4px;">git</a></li> <li class="tag" id="policy"><a href="tags/#policy" style="font-size: 4px;">policy</a></li> <li class="tag" id="REST"><a href="tags/#REST" style="font-size: 4px;">REST</a></li> <li class="tag" id="WordPress"><a href="tags/#WordPress" style="font-size: 4px;">WordPress</a></li> <li class="tag" id="Jekyll"><a href="tags/#Jekyll" style="font-size: 4px;">Jekyll</a></li> <li class="tag" id="GitHub"><a href="tags/#GitHub" style="font-size: 8px;">GitHub</a></li> <li class="tag" id="community building"><a href="tags/#community building" style="font-size: 4px;">community building</a></li> <li class="tag" id="API"><a href="tags/#API" style="font-size: 4px;">API</a></li> </ul>\n \n <h4>Meta</h4>\n <ul class="meta">\n <li id="fork"><a href="http://github.com/benbalter/benbalter.github.com/">Fork on GitHub</a></li>\n <li id="fine-print"><a href="http://localhost:4000/fine-print/">Fine Print</a></li>\n </ul> \n \n </div><!--/.well -->\n </div><!-- span3 -->\n \n</div><!-- row-fluid -->';return __p},this.JST.page=function(obj){var __p="";with(obj||{})__p+='<h2 class="title">'+title+"</h2>\n\n"+content+"\n\n";return __p},this.JST.post=function(obj){var __p="";with(obj||{})__p+='\n<article id="post'+id.replace(/\//g,"-")+'" class="post post'+id.replace(/\//g,"-")+'">\n \n <h2 class="title"><a href="{{ site.url }}'+url+'">'+title+'</a></h2> \n\n <div class="post-meta">\n <span class="entry-date">Posted on '+moment(date).format("MMMM D, YYYY")+'</span> \n <span class="entry-author">by '+author+'</span>\n </div>\n \n <div class="entrybody">\n '+content+'\n </div>\n \n <div class="related">\n <h4>Related Posts:</h4>\n <ol class="related-posts">\n ',_.each(related_posts.slice(0,5),function(t){__p+='\n <li><a href="'+t.url+'">'+t.title+"</a></li>\n "}),__p+='\n </ol>\n </div>\n\n <div class="post-taxonomies">\n Posted in <a href="{{ site.url }}/categories/'+category+'/">'+category+"</a> | Tagged ",_.each(tags,function(t){__p+=' <a href="{{ site.url }}/tags/'+t+'/">'+t+"</a>, "}),__p+='\n </div>\n \n</article>\n\n<div id="disqus_thread"></div>\n\n';return __p},this.JST.post_excerpt=function(obj){var __p="";with(obj||{})__p+='<article id="post'+id.replace(/\//g,"-")+'" class="post post-excerpt post'+id.replace(/\//g,"-")+'">\n \n <h2 class="title"><a href="{{ site.url }}'+url+'">'+title+'</a></h2> \n\n <div class="post-meta">\n <span class="entry-date">Posted on '+moment(date).format("MMMM D, YYYY")+'</span> \n <span class="entry-author">by '+author+'</span>\n </div>\n \n <div class="entrybody">\n '+content+'\n </div>\n\n <div class="post-taxonomies">\n Posted in <a href="{{ site.url }}/categories/'+category+'">'+category+"</a> | Tagged ",_.each(tags,function(t){__p+=' <a href="{{ site.url }}/tags/'+t+'">'+t+"</a>, "}),__p+="\n </div>\n \n</article>\n";return __p},this.JST.recent_comments=function(obj){var __p="";with(obj||{})__p+='<ul class="comments>\n',_.each(comments,function(t){__p+='\n <li class="comment">\n <div class="author">\n <img src="'+t.author.avatar.small.cache+'" alt="'+t.author.name+'"/>\n <a href="'+t.author.profileUrl+'">'+t.author.name+'</a>\n </div>\n <div class="commentBody">\n "\n '+t.raw_message.substring(0,200)+"\n ",t.raw_message.length>200&&(__p+="..."),__p+='\n "</div>\n <a class="commentTimeStamp" href="'+t.thread.attributes.link+"#comment-"+t.id+'">'+moment(t.createdAt).fromNow()+'</a> on\n <a class="commentPost" href="'+t.thread.attributes.link+'">'+t.thread.attributes.title+"</a>\n </li>\n"}),__p+="\n</ul>";return __p},this.JST.recent_tweets=function(obj){var __p="";with(obj||{})__p+='<ul class="tweets">\n ',_.each(tweets,function(t){__p+='\n <li class="tweet">'+t.text+' — <a href="http://twitter.com/'+t.user.screen_name+"/status/"+t.id+'">'+moment(t.created_at).fromNow()+"</a></li>\n "}),__p+="\n<ul>";return __p},this.JST.single=function(obj){var __p="";with(obj||{})__p+='<div class="'+layout+" "+layout+"-"+id.replace("/","")+'">\n <div class="row-fluid">\n <div class="span2">&nbsp;</div>\n <div class="span8">\n <div id="main">\n </div>\n \n <div class="improve-article-wrapper"> \n <div class="improve-article"> \n ',edit_url="http://edit.benbalter.com/#benbalter/benbalter.github.com/edit/master/","post"==layout&&(edit_url+="_posts/"),edit_url+=id.replace("/","").replace(/\//g,"-")+".md",__p+='\n \n <a class="button btn" href="'+edit_url+'">Edit</a> \n <p> This content is open source. Please help to improve it by <a href="'+edit_url+'">contributing</a>.</p>\n \n </div> \n </div>\n </div>\n </div>\n </div>\n</div>';return __p},this.JST.tag=function(obj){var __p="";with(obj||{})__p+='<h1 class="title">Posts tagged "'+tag.id+'"</h1>\n<ul>\n',tag.posts.forEach(function(t){__p+='\n <li><a href="'+(Application.url+t.get("url"))+'">'+t.get("title")+"</a></li>\n"}),__p+="\n</ul>";return __p};
View
2 _templates/category._
@@ -1,4 +1,4 @@
-<h1>Posts categorized "<%= category.id %>"</h1>
+<h1 class="title">Posts categorized "<%= category.id %>"</h1>
<ul>
<% category.posts.forEach( function( post ) { %>
<li><a href="<%= Application.url + post.get("url") %>"><%= post.get("title") %></a></li>
View
2 _templates/tag._
@@ -1,4 +1,4 @@
-<h1>Posts tagged "<%= tag.id %>"</h1>
+<h1 class="title">Posts tagged "<%= tag.id %>"</h1>
<ul>
<% tag.posts.forEach( function( post ) { %>
<li><a href="<%= Application.url + post.get("url") %>"><%= post.get("title") %></a></li>

0 comments on commit 988c01a

Please sign in to comment.
Something went wrong with that request. Please try again.