Skip to content
This repository has been archived by the owner on Mar 22, 2019. It is now read-only.

Commit

Permalink
blog got some love
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanpenner committed Jan 23, 2013
1 parent c7bab49 commit 358c03f
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 18 deletions.
1 change: 1 addition & 0 deletions config.rb
Expand Up @@ -28,6 +28,7 @@
blog.prefix = 'blog'
blog.layout = 'layouts/blog'
blog.summary_separator = %r{(<p>READMORE</p>)} # Markdown adds the <p>
blog.taglink = "categories/:tag.html"
end

page '/blog/feed.xml', layout: false
Expand Down
15 changes: 10 additions & 5 deletions source/_blog_sidebar.html.erb
@@ -1,13 +1,18 @@
<ol id='toc-list'>
<li class='level-1'>
<a href="/blog/feed.xml">
Recent Posts
<img src="/images/feed-icon-14x14.png">
</a>
<a href="#">Recent Post</a>
<ol style="display:block">
<% blog.articles.each_with_index do |article, i| %>
<% blog.tags['Recent Posts'].sort_by(&:date).reverse.each_with_index do |article, i| %>
<li class='level-3'><%= link_to article.title, article %></li>
<% end %>
</ol>
</li>
<li class='level-1'>
<a href="#">This Week in Ember</a>
<ol style="display:block">
<% blog.tags['This Week in Ember'].sort_by(&:date).reverse.each_with_index do |article, i| %>
<li class='level-3'><%= link_to article.date.strftime('%B %d, %Y'), article %></li>
<% end %>
</ol>
</li>
</ol>
1 change: 1 addition & 0 deletions source/blog/2012-08-03-ember-1-0-prerelease.html.markdown
@@ -1,5 +1,6 @@
---
title: Ember 1.0 Prerelease
tags: Recent Posts
---

We're pleased to announce the Ember 1.0 Prerelease. It's been a couple
Expand Down
1 change: 1 addition & 0 deletions source/blog/2012-10-25-ember-1-0-pre2.html.markdown
@@ -1,5 +1,6 @@
---
title: Ember 1.0 Prerelease 2
tags: Recent Posts
---

Ember 1.0 Prerelease 2 is out now. This is mainly a bug fix release
Expand Down
4 changes: 3 additions & 1 deletion source/blog/2012-11-02-this-week-in-ember-js.markdown
@@ -1,5 +1,7 @@
---
title: This Week in Ember.js (Nov 11, 2012)
title: This Week in Ember.js
date: 2012/11/02
tags: This Week in Ember
---

There's a lot of work happening on Ember.js and sometimes it's hard to keep track of what's going on. Here's what me and Yehuda got done this week.
Expand Down
4 changes: 3 additions & 1 deletion source/blog/2012-12-02-this-week-in-ember-js-2.markdown
@@ -1,5 +1,7 @@
---
title: This Week in Ember.js (Dec 12, 2012)
title: This Week in Ember.js
date: 2012/12/02
tags: This Week in Ember
---

There's been a lot of exciting changes going in the Ember.js community, here's a recap of some of the biggest updates.
Expand Down
4 changes: 3 additions & 1 deletion source/blog/2012-12-22-this-week-in-ember-js-3.markdown
@@ -1,5 +1,7 @@
---
title: This Week in Ember.js (Dec 22, 2012)
title: This Week in Ember.js
date: 2012/12/22
tags: This Week in Ember
---

Only a few more days left, I hope everyone's had a great 2012,
Expand Down
4 changes: 3 additions & 1 deletion source/blog/2013-01-18-this-week-in-ember-js-4.markdown
@@ -1,5 +1,7 @@
---
title: This Week in Ember.js (Jan 18, 2013)
title: This Week in Ember
date: 2013/01/18
tags: This Week in Ember
---

It's been a big month for Ember.js, and we're excited about the progress
Expand Down
26 changes: 26 additions & 0 deletions source/blog/_post.html.erb
@@ -0,0 +1,26 @@
<%= partial :post_header, :locals => { :article => article } %>
<%= article.body %>
<% if show_comments %>
<hr>

<div id="disqus_thread"></div>
<script type="text/javascript">
<% if ENV['RACK_ENV'] != 'production' %>
var disqus_developer = 1;
<% end %>

/* * * CONFIGURATION VARIABLES * * */
var disqus_shortname = 'emberjsdotcom'; // required

/* * * DON'T EDIT BELOW THIS LINE * * */
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
<% end %>
4 changes: 4 additions & 0 deletions source/blog/_post_header.html.erb
@@ -0,0 +1,4 @@
<h2>
<a href="<%= article.url %>"><%= article.title %></a>
<time><%= article.date.strftime('%b %e %Y') %></time>
</h2>
2 changes: 1 addition & 1 deletion source/blog/index.html.erb
Expand Up @@ -7,7 +7,7 @@ title: "Blog"
<% blog.articles.each_with_index do |article, i| %>
<article class="blog-post-summary">
<h2><%= link_to article.title, article %></span></h2>
<h2><%= link_to article.title, article %> &ndash; <time><%= article.date.strftime('%b %d, %Y') %></time></span></h2>
<%= article.summary %>
<%= link_to "Read more...", article %>
</article>
Expand Down
11 changes: 3 additions & 8 deletions source/stylesheets/site.css.scss
Expand Up @@ -214,7 +214,7 @@ ol {

#back-to-top {
text-align: center;
opacity: 0;
display: none;
@include transition(opacity 0.05s linear);
}

Expand Down Expand Up @@ -309,6 +309,7 @@ ol {

&:last-of-type ol {
border-bottom: 1px solid #d5ccc8;
padding-bottom: 0.5em;
}
}

Expand Down Expand Up @@ -920,16 +921,10 @@ ol {
}

/**
Blogs
Blog
**/
.blog {

#sidebar ol#toc-list li.level-2 a, #sidebar ol#toc-list li.level-3 a {
width: 143px;
overflow: hidden;
white-space: nowrap;
}

article {
margin: 0 0 3em 0;
padding: 0 0 3em 0;
Expand Down

0 comments on commit 358c03f

Please sign in to comment.