1
0
mirror of https://github.com/kremalicious/blog.git synced 2025-02-14 21:10:25 +01:00

add a body class based on page url

This commit is contained in:
Matthias Kretschmann 2013-11-28 22:45:29 +01:00
parent c869b5560f
commit 2c658ab325
5 changed files with 46 additions and 76 deletions

View File

@ -1,7 +1,9 @@
{% include head.html %} {% include head.html %}
<body> {% capture id %}{{ page.url | replace:'/','-' | replace_first:'-','' | replace:'.html','' | replace:'-index','' }}{% endcapture %}
<body class="page-{{ id }}">
{% include header.html %} {% include header.html %}

View File

@ -2,6 +2,8 @@
layout: base layout: base
--- ---
<section role="main" id="main" class="row">
<h1 class="page-title"><a class="home" href="/" title="Back to Home">/</a>{{ page.category }}</h1> <h1 class="page-title"><a class="home" href="/" title="Back to Home">/</a>{{ page.category }}</h1>
{% for post in site.categories[page.category] %} {% for post in site.categories[page.category] %}
@ -45,3 +47,5 @@ layout: base
{% endif %} {% endif %}
{% endfor %} {% endfor %}
</section>

View File

@ -235,6 +235,8 @@
// //
.goodie-actions { .goodie-actions {
.clearfix; .clearfix;
max-width: 640px;
margin: 0 auto;
p, p,
.btn { margin-bottom: 0 } .btn { margin-bottom: 0 }

View File

@ -13,10 +13,11 @@
font-style: normal; font-style: normal;
} }
[class*="icon-"] { #main [class*="icon-"] {
&,
&:before { &:before {
color: @text-color-light;
font-size: 20px;
font-family: 'entypo'; font-family: 'entypo';
speak: none; speak: none;
font-style: normal; font-style: normal;
@ -26,17 +27,6 @@
line-height: 1; line-height: 1;
-webkit-font-smoothing: antialiased; -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, .btn.icon-info:before,

View File

@ -1,28 +0,0 @@
---
layout: base
title: Photos kremalicious
---
<section role="main" id="main photos" class="row">
<div class="masonry">
{% for post in site.categories.photos %}
<article class="hentry format-image">
<a class="photoPost" href="{{ post.url }}">
<figure class="hmedia">
<figcaption class="entry-title fn">{{ post.title }}</figcaption>
exif
</figure>
</a>
</article>
{% endfor %}
</div>
</section>