Skip to content

Commit

Permalink
Add date that got dropped
Browse files Browse the repository at this point in the history
  • Loading branch information
peterkeen committed Dec 15, 2011
1 parent aca2b41 commit 9e1af0a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions page.rb
Expand Up @@ -89,6 +89,10 @@ def date
end
end

def natural_date
date.strftime("%A, %e %B around %l o'clock %P")
end

def html_path
"/#{@name}.html"
end
Expand Down
3 changes: 2 additions & 1 deletion views/entry_page.erb
@@ -1,5 +1,6 @@
<div class="entry">
<h2><a href="<%= @page.html_path %>"><%= @page['title'] %></a></h2>
<p class="date"><%= @page.natural_date %></p>
<%= @page.render %>
</div>
<% if @page.is_blog_post? %>
Expand All @@ -13,4 +14,4 @@
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript=bugsplat">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 %>
<% end %>
1 change: 1 addition & 0 deletions views/index.erb
@@ -1,6 +1,7 @@
<% @index_pages.each do |page| %>
<div class="entry">
<h2><a href="<%= page.html_path %>"><%= page['title'] %></a></h2>
<p class="date"><%= page.natural_date %></p>
<%= page.render_before_fold %>
<a href="<%= page.html_path %>">Read More</a> - <a class="permalink" href="<%= page.html_path %>#disqus_thread">permalink</a>
<hr class="separator">
Expand Down

0 comments on commit 9e1af0a

Please sign in to comment.