From 5bae43b46cd5dd399836f8e326ee128373c1a855 Mon Sep 17 00:00:00 2001 From: Tommy Chen Date: Sun, 3 Jun 2012 11:24:21 +0800 Subject: simplify post --- sass/parts/_article.scss | 3 ++- sass/parts/_post.scss | 2 +- sass/parts/_syntax.scss | 2 +- source/_includes/article.html | 40 +++++++++++++++-------------------- source/_includes/post/categories.html | 12 +++++------ source/javascripts/slash.js | 2 +- 6 files changed, 27 insertions(+), 34 deletions(-) diff --git a/sass/parts/_article.scss b/sass/parts/_article.scss index 52151ef..91f6273 100644 --- a/sass/parts/_article.scss +++ b/sass/parts/_article.scss @@ -17,7 +17,7 @@ article{ color: $color-gray01; } } - .entry{ + .entry-content{ line-height: 2; text-align: justify; a{ @@ -114,6 +114,7 @@ article{ left: 0; width: 100%; height: 100%; + margin-top: 0; } } } diff --git a/sass/parts/_post.scss b/sass/parts/_post.scss index 1730fb8..fc4bf6d 100644 --- a/sass/parts/_post.scss +++ b/sass/parts/_post.scss @@ -1,5 +1,5 @@ .post{ - h1.title, .entry{ + h1.title, .entry-content{ margin-left: 200px; @media screen and (max-width: 800px){ margin-left: 0; diff --git a/sass/parts/_syntax.scss b/sass/parts/_syntax.scss index 5ad2b14..0a95988 100644 --- a/sass/parts/_syntax.scss +++ b/sass/parts/_syntax.scss @@ -124,7 +124,7 @@ figure.code{ overflow-x: auto; } } -.entry .gist{ +.entry-content .gist{ background: $pre-bg; color: $color-gray01; padding: 30px 15px 5px; diff --git a/source/_includes/article.html b/source/_includes/article.html index a766bb7..1e1c835 100644 --- a/source/_includes/article.html +++ b/source/_includes/article.html @@ -1,25 +1,19 @@ {% if index %} -

{% if site.titlecase %}{{ post.title | titlecase }}{% else %}{{ post.title }}{% endif %}

-
- {{ content | excerpt }} - {% capture excerpted %}{{ content | has_excerpt }}{% endcapture %} - {% if excerpted == 'true' %}{{ site.excerpt_link }}{% endif %} -
-
-
{% include post/date.html %}{{ time }}
-
{% include post/categories.html %}
- {% if site.disqus_short_name and post.comments == true and site.disqus_show_comment_count == true %} - Comments - {% endif %} -
+

{% if site.titlecase %}{{ post.title | titlecase }}{% else %}{{ post.title }}{% endif %}

+
+ {{ content | excerpt }} + {% capture excerpted %}{{ content | has_excerpt }}{% endcapture %} + {% if excerpted == 'true' %}{{ site.excerpt_link }}{% endif %} +
{% else %} -

{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}

-
{{ content }}
-
-
{% include post/date.html %}{{ time }}
-
{% include post/categories.html %}
- {% if site.disqus_short_name and page.comments == true and site.disqus_show_comment_count == true %} - Comments - {% endif %} -
-{% endif %} \ No newline at end of file +

{% if site.titlecase %}{{ page.title | titlecase }}{% else %}{{ page.title }}{% endif %}

+
{{ content }}
+{% endif %} + +
+
{% include post/date.html %}{{ time }}
+
{% include post/categories.html %}
+ {% if site.disqus_short_name and site.disqus_show_comment_count == true %} + Comments + {% endif %} +
\ No newline at end of file diff --git a/source/_includes/post/categories.html b/source/_includes/post/categories.html index 2ec7896..8c1c81f 100644 --- a/source/_includes/post/categories.html +++ b/source/_includes/post/categories.html @@ -1,10 +1,8 @@ {% capture category %}{% if post %}{{ post.categories | category_links | size }}{% else %}{{ page.categories | category_links | size }}{% endif %}{% endcapture %} {% unless category == '0' %} -
- {% if post %} - {{ post.categories | category_links }} - {% else %} - {{ page.categories | category_links }} - {% endif %} -
+{% if post %} + {{ post.categories | category_links }} +{% else %} + {{ page.categories | category_links }} +{% endif %} {% endunless %} diff --git a/source/javascripts/slash.js b/source/javascripts/slash.js index 1e2649d..6433ba0 100644 --- a/source/javascripts/slash.js +++ b/source/javascripts/slash.js @@ -51,7 +51,7 @@ // Append caption after pictures var appendCaption = function(){ - $('.entry').each(function(i){ + $('.entry-content').each(function(i){ var _i = i; $(this).find('img').each(function(){ var alt = this.alt; -- cgit v1.1-2-g2b99