Skip to content

Commit

Permalink
Updated to the latest version of the hAtom specification
Browse files Browse the repository at this point in the history
  • Loading branch information
packagethief committed Nov 4, 2006
1 parent 552d50a commit e43e41a
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 65 deletions.
26 changes: 26 additions & 0 deletions layouts/default.haml
@@ -0,0 +1,26 @@
!!!
%html
%head
%title= page_title
= page_header
= stylesheet_link_tag '/stylesheets/theme/application.css', :media => 'all'

%body
#container
#header
%h1
%span= link_to this_blog.blog_name, this_blog.base_url
%h2= this_blog.blog_subtitle
#page
#content
= @content_for_layout
= javascript_tag 'show_dates_as_local_time()'
#sidebar
= render :partial => 'search'
= render_sidebars
%br{:style => 'clear:both'}/
#footer
%hr/
%p= link_to this_blog.blog_name, this_blog.base_url
%ul
%li= "powered by #{link_to('typo', 'http://typosphere.org')} / styled with #{link_to('scribbish', 'http://quotedprintable.com/pages/scribbish')}"
74 changes: 36 additions & 38 deletions stylesheets/content.css
Expand Up @@ -19,7 +19,7 @@
}

#header h1 {
font: bold 410% utopia, georgia, serif;
font: bold 410% georgia, serif;
letter-spacing: -1px;
margin: 0;
float: left;
Expand All @@ -42,7 +42,7 @@
#content h3,
#content h4,
#content h5 {
font-family: utopia, "lucidamac bold", "lucida grande", arial, sans-serif;
font-family: georgia, times; font-weight: normal;
font-weight: normal;
letter-spacing: -1px;
}
Expand All @@ -53,7 +53,7 @@
}

#content h2 {
font-size: 24px;
font-size: 26px;
margin: 0 0 0.3em;
}

Expand All @@ -76,7 +76,7 @@
}

#content p {
line-height: 15px;
line-height: 14px;
margin: 0 0 1.2em;
}

Expand Down Expand Up @@ -111,83 +111,81 @@
overflow: auto;
font: normal 12px "bitstream vera sans mono", monaco "lucida console", "courier new", courier, serif;
margin: 0.9em 0; padding: 8px;

/* http://longren.org/2006/09/27/wrapping-text-inside-pre-tags */
white-space: pre-wrap;
white-space: -moz-pre-wrap !important;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
}

/* Article Entries - class names based on http://microformats.org/wiki/hatom] */
#content .atomentry {
#content .hentry {
margin: 0 0 3em 0;
}

#content .atomentry .title {
font-size: 32px;
#content .hentry .entry-title {
font-size: 34px;
line-height: 94%;
letter-spacing: -1.5px;
margin: 0;
margin: 0
}

#content .atomentry .title a:link,
#content .atomentry .title a:visited {
#content .hentry .entry-title a:link,
#content .hentry .engry-title a:visited {
color: #111;
text-decoration: none;
}

#content .atomentry .title a:hover,
#content .atomentry .title a:active {
#content .hentry .entry-title a:hover,
#content .hentry .entry-title a:active {
background: transparent;
text-decoration: underline;
text-decoration: underline;
}

#content .atomentry .title .comment_count { color: #eee; }
#content .hentry .entry-title .comment_count { color: #eee; }

#content .atomentry .author {
color: #bbb;
font: normal 16px/14px "lucidamac bold", "lucida grande", arial, verdana, sans-serif;
#content .hentry .vcard,
#content .hentry .published {
float: left;
color: #a9a9a9;
font: normal 16px/14px helvetica, arial, verdana, sans-serif;
letter-spacing: -1px;
margin: 0 0 1em;
margin: 0 0 0.6em 0;
}

#content .hentry .fn {
font-weight:bold;
margin-right: 5px;
}

#content .atomentry .author cite a,
#content .atomentry .author cite a:hover { /* author mailto: link (if any) */
#content .hentry .fn a,
#content .hentry .fn a:hover {
color: #aaa; background: transparent;
text-decoration: none;
}

#content .atomentry .author abbr { /* posted date */
font-weight: bold;
color: #aaa;
}

#content .atomentry .content {}
#content .hentry .clear { clear: both; }

#content .hentry .entry-content { }

#content .atomentry ul.meta {
#content .hentry ul.meta {
font-size: 10px;
background: #eee;
margin: 0; padding: 5px;
border: 1px solid #ddd;
list-style-type: none;
}

#content .atomentry ul.meta li {
#content .hentry ul.meta li {
line-height: 13px;
margin: 0; padding: 0;
}

#content .atomentry .meta a:link,
#content .atomentry .meta a:visited {
#content .hentry .meta a:link,
#content .hentry .meta a:visited {
color: #555;
text-decoration: none;
border-bottom: 1px dotted #aaa;
}

#content .atomentry .meta a:hover,
#content .atomentry .meta a:active {
#content .hentry .meta a:hover,
#content .hentry .meta a:active {
color: #fff;
}

Expand Down
6 changes: 3 additions & 3 deletions stylesheets/layout.css
Expand Up @@ -10,7 +10,7 @@
*/
body {
text-align: center;
margin: 0; padding: 1em;
margin: 0; padding: 0.6em 1em 1em 1em;
}

#container {
Expand All @@ -20,8 +20,8 @@ body {
}

#header {
height: 60px;
margin: 0 0 15px; padding: 0;
height: 62px;
margin: 0 -0.5px 12px 0; padding: 0;
}

#page {}
Expand Down
41 changes: 17 additions & 24 deletions views/articles/_article.rhtml
@@ -1,36 +1,29 @@
<div class="atomentry" id="article-<%= article.id %>">
<h2 class="title">
<div class="hentry" id="article-<%= article.id %>">
<h2 class="entry-title">
<%= (controller.action_name.include? 'permalink') ? article.title : link_to_permalink(article,article.title) %>
<%= content_tag(:span, article.published_comments.size, :class => 'comment_count') if article.published_comments.size > 0 %>
</h2>

<p class="author">
Posted by <cite><%= author_link(article) %></cite>
<abbr class="published" title="<%= article.published_at.xmlschema %>"><%= js_distance_of_time_in_words_to_now article.published_at %></abbr>
</p>

<div class="content">
<div class="vcard">
Posted by <span class="fn"><%= author_link(article) %></span>
</div>
<abbr class="published" title="<%= article.published_at.xmlschema %>"><%= js_distance_of_time_in_words_to_now article.published_at %></abbr>
<br class="clear" />
<div class="entry-content">
<%= article.html(:body) %>
<% if article.extended? -%>
<div class="extended">
<% if controller.action_name == 'index' -%>
<p><%= link_to_permalink article,"Continue reading..." %></p>
<% else -%>
<%= article.html(:extended) %>
<% end -%>
</div>
<div class="extended">
<% (controller.action_name == 'index') ? content_tag('p', link_to_permalink(article, 'Continue reading...')) : article.html(:extended) -%>
</div>
<% end -%>
</div>

<ul class="meta">
<%= content_tag(:li, category_links(article), :class => 'categories') unless article.categories.empty? %>
<%= content_tag(:li, tag_links(article), :class => 'tags') unless article.tags.empty? %>
<%= content_tag(:li, category_links(article).gsub(',', ' '), :class => 'categories') unless article.categories.empty? %>
<%= content_tag(:li, tag_links(article).gsub(',', ' '), :class => 'tags') unless article.tags.empty? %>
<li>Meta
<%= trackbacks_link(article) << ',' if article.allow_pings? %>
<%= comments_link(article) << ',' if article.allow_comments? %>
<a href="<%= article.permalink_url %>" rel="bookmark">permalink</a>,
<a href="<%= xml_url :action=>'feed', :type=>'article', :format => 'rss', :id => article %>">rss</a>,
<%= trackbacks_link(article) if article.allow_pings? %>
<%= comments_link(article) if article.allow_comments? %>
<a href="<%= article.permalink_url %>" rel="bookmark">permalink</a>
<a href="<%= xml_url :action=>'feed', :type=>'article', :format => 'rss', :id => article %>">rss</a>
<a href="<%= xml_url :action=>'feed', :type=>'article', :format => 'atom', :id => article %>">atom</a>
</li>
</ul>
Expand Down

0 comments on commit e43e41a

Please sign in to comment.