Browse files

rewrite blog.html and index.html

  • Loading branch information...
1 parent 1e25972 commit dd834a9cafbf08504c9d12d2f242377a7eae2fca @flyerhzm committed Jan 17, 2011
Showing with 33 additions and 44 deletions.
  1. +20 −42 blog.html
  2. +13 −2 index.html
View
62 blog.html
@@ -2,48 +2,26 @@
layout: default
title: Richard Huang's Website
---
-{% for post in paginator.posts %}
- <div class="full">
- <h1 class="entry-title">
- <a href="{{ post.url }}" title="{{ post.title }}" rel="bookmark">{{ post.title }}</a>
- </h1>
- <div class="entry-content full-content">
- {{ post.content }}
- <div class="clear"></div>
- </div>
- <p class="alt-font tight">
- Posted in&nbsp;
- {% for category in post.categories %}
- <a href="/categories/{{ category }}" title="{{ category }}" rel="category tag">{{ category }}</a>
- {% endfor %}
- </p>
- <p class="comments-link">
- <a href='{{post.url}}#disqus_thread'>Comments</a>
- </p>
- <p class="by-line">
- <span class="date full-date">
+<ol class="archive">
+{% for post in site.posts %}
+ <li>
+ <div class="excerpt">
+ <strong class="entry-title">
+ <a href="{{ post.url }}" title="{{ post.title }}" rel="bookmark">{{ post.title }}</a>
+ </strong>
+ <span class="date small">
<abbr class="published" title="{{ post.date }}">{{ post.date | date_to_string }}</abbr>
</span>
- </p>
- <div class="clear"></div>
- </div>
- <div class="rule"><hr/></div>
+ <p class="alt-font">
+ Posted in&nbsp;
+ {% for category in post.categories %}
+ <a href="/categories/{{ category }}" title="{{ category }}" rel="category tag">{{ category }}</a>
+ {% endfor %}
+ </p>
+ <p class="comments-link">
+ <a href='{{post.url}}#disqus_thread'>Comments</a>
+ </p>
+ </div>
+ </li>
{% endfor %}
-
-<div class="pagination">
- <span class="previous">
- {% if paginator.previous_page %}
- {% if paginator.previous_page == 1 %}
- <a href="/blog.html" title="Previous Page">&laquo; Previous</a>
- {% else %}
- <a href="/page{{ paginator.previous_page }}/" title="Previous Page">&laquo; Previous</a>
- {% endif %}
- {% endif %}
- </span>
- <span class="next">
- {% if paginator.next_page %}
- <a href="/page{{ paginator.next_page }}/" title="Next Page">Next &raquo;</a>
- {% endif %}
- </span>
-</div>
-
+</ol>
View
15 index.html
@@ -2,7 +2,7 @@
layout: default
title: Richard Huang's Website
---
-{% for post in site.posts limit:1 %}
+{% for post in paginator.posts %}
<div class="full">
<h1 class="entry-title">
<a href="{{ post.url }}" title="{{ post.title }}" rel="bookmark">{{ post.title }}</a>
@@ -31,8 +31,19 @@ <h1 class="entry-title">
{% endfor %}
<div class="pagination">
+ <span class="previous">
+ {% if paginator.previous_page %}
+ {% if paginator.previous_page == 1 %}
+ <a href="/blog.html" title="Previous Page">&laquo; Previous</a>
+ {% else %}
+ <a href="/page{{ paginator.previous_page }}/" title="Previous Page">&laquo; Previous</a>
+ {% endif %}
+ {% endif %}
+ </span>
<span class="next">
- <a href="/blog.html" title="more posts">more →</a>
+ {% if paginator.next_page %}
+ <a href="/page{{ paginator.next_page }}/" title="Next Page">Next &raquo;</a>
+ {% endif %}
</span>
</div>

0 comments on commit dd834a9

Please sign in to comment.