Permalink
Browse files

overall improvement to the templates

  • Loading branch information...
1 parent f0c2bd8 commit 7d052995ec0d015fb05b54334f0acde245c7cdf1 cloudhead committed Jan 25, 2010
Showing with 45 additions and 12 deletions.
  1. +25 −2 public/css/main.css
  2. +9 −9 templates/pages/archives.rhtml
  3. +11 −1 templates/pages/index.rhtml
View
27 public/css/main.css
@@ -28,11 +28,20 @@ header, footer, section, article {
}
.date {
font-style: italic;
- margin-left: 5px;
+ float: right;
+ line-height: 43px;
+ margin-right: 30px;
}
a {
color: #b83000;
}
+h1 a {
+ color: black;
+ text-decoration: none;
+}
+a:hover {
+ text-decoration: underline;
+}
body > header > h1 {
border-left: 30px solid black;
padding-left: 30px;
@@ -58,6 +67,16 @@ body > header > h1 {
.post p {
margin: 10px 0;
}
+.post .more {
+ margin-top: -10px;
+ margin-right: 30px;
+ font-style: italic;
+ text-align: right;
+}
+.more a {
+ text-decoration: none;
+}
+.more a:hover { text-decoration: underline }
body > header {
display: block;
padding-top: 30px;
@@ -69,6 +88,9 @@ h1, h2, h3, h4 {
margin: 0;
font-weight: 600;
}
+ul, li {
+ list-style-type: none;
+}
code {
font-family: 'Anonymous Pro', 'Bitstream Vera Sans', 'Monaco', Courier, mono;
}
@@ -80,7 +102,8 @@ blockquote {
}
body > footer {
- text-align: right;
+ text-align: left;
+ margin-left: 10px;
font-style: italic;
font-size: 18px;
color: #888;
View
18 templates/pages/archives.rhtml
@@ -1,13 +1,13 @@
+<h1><%= @path %></h1>
<ul>
- <% for entry in archives %>
- <li>
- <header>
- <%= entry.title %>
- </header>
- <span class="date">
- <%= entry.date %>
- </span>
- </li>
+ <% if archives.length > 0 %>
+ <% for entry in archives %>
+ <li>
+ <a href="<%= entry.url %>"><%= entry.title %></a>
+ </li>
+ <% end %>
+ <% else %>
+ There are no articles for this date.
<% end %>
</ul>
View
12 templates/pages/index.rhtml
@@ -1,6 +1,16 @@
<section id="articles">
<% for article in articles[0...3] %>
- <%= article %>
+ <article class="post">
+ <header>
+ <h1><a href="<%= article.url %>"><%= article.title %></a></h1>
+ <span class="date"><%= article.date %></span>
+ </header>
+
+ <section class="content">
+ <%= article.summary %>
+ </section>
+ <div class="more"><a href="<%= article.url %>">read on &raquo;</a></div>
+ </article>
<% end %>
</section>

0 comments on commit 7d05299

Please sign in to comment.