From 2c658ab325facb70a93934011b6e324f7c839a41 Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 28 Nov 2013 22:45:29 +0100 Subject: [PATCH] add a body class based on page url --- _src/_layouts/base.html | 4 +- _src/_layouts/category_index.html | 72 ++++++++++++++++--------------- _src/assets/less/content.less | 2 + _src/assets/less/icons.less | 16 ++----- _src/photos.html | 28 ------------ 5 files changed, 46 insertions(+), 76 deletions(-) delete mode 100644 _src/photos.html diff --git a/_src/_layouts/base.html b/_src/_layouts/base.html index 2fdba8a9..2c0368e0 100644 --- a/_src/_layouts/base.html +++ b/_src/_layouts/base.html @@ -1,7 +1,9 @@ {% include head.html %} - +{% capture id %}{{ page.url | replace:'/','-' | replace_first:'-','' | replace:'.html','' | replace:'-index','' }}{% endcapture %} + + {% include header.html %} diff --git a/_src/_layouts/category_index.html b/_src/_layouts/category_index.html index efb446a1..35803e21 100644 --- a/_src/_layouts/category_index.html +++ b/_src/_layouts/category_index.html @@ -2,46 +2,50 @@ layout: base --- -

/{{ page.category }}

- -{% for post in site.categories[page.category] %} +
- {% if post.categories contains "goodies" %} +

/{{ page.category }}

-
-
-

{{ post.title }}

-
+ {% for post in site.categories[page.category] %} + + {% if post.categories contains "goodies" %} -
+
-
+
+ - {% else %} - {% include index.html %} - {% endif %} + {% else %} + {% include index.html %} + {% endif %} -{% endfor %} \ No newline at end of file + {% endfor %} + + \ No newline at end of file diff --git a/_src/assets/less/content.less b/_src/assets/less/content.less index 001b89ef..46ce979b 100644 --- a/_src/assets/less/content.less +++ b/_src/assets/less/content.less @@ -235,6 +235,8 @@ // .goodie-actions { .clearfix; + max-width: 640px; + margin: 0 auto; p, .btn { margin-bottom: 0 } diff --git a/_src/assets/less/icons.less b/_src/assets/less/icons.less index dfcc846b..8a040678 100644 --- a/_src/assets/less/icons.less +++ b/_src/assets/less/icons.less @@ -13,10 +13,11 @@ font-style: normal; } -[class*="icon-"] { +#main [class*="icon-"] { - &, &:before { + color: @text-color-light; + font-size: 20px; font-family: 'entypo'; speak: none; font-style: normal; @@ -26,17 +27,6 @@ line-height: 1; -webkit-font-smoothing: antialiased; } - - &:beforeĀ { - color: @text-color-light; - font-size: 20px; - } - - .btn &:before, - .more-link &:before { - font-size: 16px; - margin: 0 .3em; - } } .btn.icon-info:before, diff --git a/_src/photos.html b/_src/photos.html deleted file mode 100644 index 99b397de..00000000 --- a/_src/photos.html +++ /dev/null @@ -1,28 +0,0 @@ ---- -layout: base -title: Photos kremalicious ---- - -
-
- - {% for post in site.categories.photos %} - - - - {% endfor %} - -
-
\ No newline at end of file