Permalink
Browse files

Formatted templates so that the final HTML is properly indented (yes,…

… I care about those things :)
  • Loading branch information...
bomberstudios committed Dec 29, 2008
1 parent 8032260 commit 1e1deb7693b10809296c2a3e00b55673470eeb82
Showing with 37 additions and 36 deletions.
  1. +1 −1 models/content.rb
  2. +14 −16 themes/default/archive.erb
  3. +20 −19 themes/default/home.erb
  4. +2 −0 themes/default/layout.erb
View
@@ -21,7 +21,7 @@ def content
self.methods.sort.each do |m|
content_plugins = self.send(m, content_plugins) if m =~ /^plugin_/
end
- RDiscount.new(content_plugins).to_html
+ RDiscount.new(content_plugins).to_html.chomp
end
def link
"/#{self.year}/#{self.month}/#{self.day}/#{self.nicetitle}/"
View
@@ -1,16 +1,14 @@
-<h2>Everything tagged with ‘<%= @tag %>’ on <%= Sinatra.options.name %>:</h2>
-<div class="group">
-<% @posts.each do |post| %>
- <h2 class="title"><%= link_to post.title, post.link %></h2>
- <small>A <%= post.class.to_s.downcase %> published on <%= post.date %>, filed under <%= tag_list post.tags %></small>
-<% end %>
-</div>
-
-<% if !@archives.nil? %>
-<div class="group">
- <h2>More...</h2>
- <% @archives.each do |post| %><h3><%= link_to post.title, post.link %> (<%= post.date %>)</h3><% end %>
-</div>
-<% end %>
-
-<div class="admin"><a href="/new" accesskey="n">new</a></div>
+ <h2>Everything tagged with ‘<%= @tag %>’ on <%= Sinatra.options.name %>:</h2>
+ <div class="group">
+ <% @posts.each do |post| %>
+ <h2 class="title"><%= link_to post.title, post.link %></h2>
+ <small>A <%= post.class.to_s.downcase %> published on <%= post.date %>, filed under <%= tag_list post.tags %></small>
+ <% end %>
+ </div>
+ <% if !@archives.nil? %>
+ <div class="group">
+ <h2>More...</h2>
+ <% @archives.each do |post| %><h3><%= link_to post.title, post.link %> (<%= post.date %>)</h3><% end %>
+ </div>
+ <% end %>
+ <div class="admin"><a href="/new" accesskey="n">new</a></div>
View
@@ -1,23 +1,24 @@
-<div class="group">
+ <div class="group">
<% @posts.each do |post| %>
- <div class="<%= post.class.to_s.downcase %>">
- <h2 class="title"><%= link_to post.title, post.link %></h2>
- <small>posted on <%= post.date %>, filed under <%= tag_list post.tags %></small>
- <div class="body">
- <%= post.content %>
- </div>
- <%= "<p><a href='#{post.link}#disqus_thread'>View Comments</a></p>" if Sinatra.options.use_comments %>
- </div>
+ <div class="<%= post.class.to_s.downcase %>">
+ <h2 class="title"><%= link_to post.title, post.link %></h2>
+ <small>posted on <%= post.date %>, filed under <%= tag_list post.tags %></small>
+ <div class="body">
+ <%= post.content %>
+ </div>
+ <%= "<p><a href='#{post.link}#disqus_thread'>View Comments</a></p>" if Sinatra.options.use_comments %>
+ </div>
+ <!-- .post -->
<% end %>
-</div>
-
+ </div>
+ <!-- .group -->
<% if !@archives.nil? %>
-<div class="group">
- <h2>archives...</h2>
- <% @archives.each do |post| %>
- <h3><%= link_to post.title, post.link %> (<%= post.date %>)</h3>
- <% end %>
-</div>
+ <div class="group">
+ <h2>archives...</h2>
+ <% @archives.each do |post| %>
+ <h3><%= link_to post.title, post.link %> (<%= post.date %>)</h3>
+ <% end %>
+ </div>
+ <!-- .group -->
<% end %>
-
-<div class="admin"><a href="/new" accesskey="n">new</a></div>
+ <div class="admin"><a href="/new" accesskey="n">new</a></div>
@@ -13,11 +13,13 @@
<div id="content">
<%= yield %>
</div>
+ <!-- #content -->
<div id="about">
<h4>about</h4>
<p>this is the home of <%= Sinatra.options.author_name %>.</p>
<h4>i talk about <%= tag_list @tags %></h4>
</div>
+ <!-- #about -->
<div id="footer">powered by <%= link_to "bliki", "http://github.com/bomberstudios/bliki" %></div>
<%= reinvigorate unless development? %>
</body>

0 comments on commit 1e1deb7

Please sign in to comment.