From 353ccfd4ebec153a46b12faffff8ab2bba36efc8 Mon Sep 17 00:00:00 2001 From: Brandon Mathis Date: Mon, 27 Jun 2011 15:59:21 -0400 Subject: 1. Added Category support 2. Designed blog archives pages 3. Restructured Sass 4. Added Categories to rake post metadata 5. Some general style improvements --- themes/classic/source/_includes/article.html | 7 ++++--- themes/classic/source/_includes/navigation.html | 4 ++-- themes/classic/source/_includes/post_author.html | 4 ++-- themes/classic/source/_includes/post_date.html | 12 ++++++++---- themes/classic/source/_layouts/post.html | 3 +++ themes/classic/source/archive.html | 24 ------------------------ themes/classic/source/index.html | 4 ++-- 7 files changed, 21 insertions(+), 37 deletions(-) delete mode 100644 themes/classic/source/archive.html (limited to 'themes/classic/source') diff --git a/themes/classic/source/_includes/article.html b/themes/classic/source/_includes/article.html index 7ed6430f..b458d732 100644 --- a/themes/classic/source/_includes/article.html +++ b/themes/classic/source/_includes/article.html @@ -1,7 +1,7 @@ {% unless page.no_header %}
{% if index %} -

{{ page.title | titlecase }}

+

{{ post.title | titlecase }}

{% else %}

{{ page.title | titlecase }}

{% endif %} @@ -10,12 +10,13 @@ {% endunless %} {% if index %}
{{ content | exerpt | smart_quotes }}
-

Read on →

+

Read on →

{% include post_author.html %} {% include post_date.html %} - Add a comment + {% include post_categories.html %} + Comments {% include sharing.html %}

diff --git a/themes/classic/source/_includes/navigation.html b/themes/classic/source/_includes/navigation.html index f941f1f1..e2827983 100644 --- a/themes/classic/source/_includes/navigation.html +++ b/themes/classic/source/_includes/navigation.html @@ -11,6 +11,6 @@ diff --git a/themes/classic/source/_includes/post_author.html b/themes/classic/source/_includes/post_author.html index a62a68a8..b2db9043 100644 --- a/themes/classic/source/_includes/post_author.html +++ b/themes/classic/source/_includes/post_author.html @@ -1,5 +1,5 @@ -{% if page.author %} - {% assign author = page.author %} +{% if post.author %} + {% assign author = post.author %} {% else %} {% assign author = site.author %} {% endif %} diff --git a/themes/classic/source/_includes/post_date.html b/themes/classic/source/_includes/post_date.html index e8455a60..f1ed4815 100644 --- a/themes/classic/source/_includes/post_date.html +++ b/themes/classic/source/_includes/post_date.html @@ -1,6 +1,10 @@ -{% if page.date %} - +{% capture date %}{{ page.date }}{{ post.date }}{% endcapture %} +{% capture has_date %}{{ date | size }}{% endcapture %} +{% capture updated %}{{ page.updated }}{{ post.updated }}{% endcapture %} +{% capture was_updated %}{{ updated | size }}{% endcapture %} +{% if has_date != '0' %} + {% endif %} -{% if page.updated %} - +{% if was_updated != '0' %} + {% endif %} diff --git a/themes/classic/source/_layouts/post.html b/themes/classic/source/_layouts/post.html index 196bb4dd..5f55e89f 100644 --- a/themes/classic/source/_layouts/post.html +++ b/themes/classic/source/_layouts/post.html @@ -5,13 +5,16 @@ single: true
{% include article.html %} + {% unless page.no_meta %}

{% include post_author.html %} {% include post_date.html %} + {% include post_categories.html %} {% include sharing.html %}

+ {% endunless %} {% if site.disqus_short_name %}

Comments

diff --git a/themes/classic/source/archive.html b/themes/classic/source/archive.html deleted file mode 100644 index e49c6b67..00000000 --- a/themes/classic/source/archive.html +++ /dev/null @@ -1,24 +0,0 @@ ---- -layout: post -title: Blog Archive -no_meta: true ---- -{% for post in site.posts reverse %} - {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} - {% capture this_month %}{{ post.date | date: "%B" }}{% endcapture %} - {% unless year == this_year %} - {% unless forloop.first %}{% endunless %} - {% assign year = this_year %} -

{{ year }}

-
    - {% endunless %} - {% unless month == this_month %} - {% assign month = this_month %} -
  • {{ month }}

  • - {% endunless %} -
  • - - {{post.title}} -
  • - {% if forloop.last %}
{% endif %} -{% endfor %} diff --git a/themes/classic/source/index.html b/themes/classic/source/index.html index d6ff868e..47d848e3 100644 --- a/themes/classic/source/index.html +++ b/themes/classic/source/index.html @@ -3,8 +3,8 @@ layout: default blog_index: true --- {% assign index = true %} -{% for page in paginator.posts %} -{% assign content = page.content %} +{% for post in paginator.posts %} +{% assign content = post.content %}
{% include article.html %}
-- cgit v1.2.1