Skip to content

Commit

Permalink
Formatted templates so that the final HTML is properly indented (yes,…
Browse files Browse the repository at this point in the history
… I care about those things :)
  • Loading branch information
bomberstudios committed Dec 29, 2008
1 parent 8032260 commit 1e1deb7
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 36 deletions.
2 changes: 1 addition & 1 deletion models/content.rb
Expand Up @@ -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}/"
Expand Down
30 changes: 14 additions & 16 deletions themes/default/archive.erb
@@ -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>
39 changes: 20 additions & 19 deletions themes/default/home.erb
@@ -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>
2 changes: 2 additions & 0 deletions themes/default/layout.erb
Expand Up @@ -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>
Expand Down

0 comments on commit 1e1deb7

Please sign in to comment.