mirror of
https://github.com/kremalicious/blog.git
synced 2024-11-13 16:45:14 +01:00
add a body class based on page url
This commit is contained in:
parent
c869b5560f
commit
2c658ab325
@ -1,7 +1,9 @@
|
||||
|
||||
{% include head.html %}
|
||||
|
||||
<body>
|
||||
{% capture id %}{{ page.url | replace:'/','-' | replace_first:'-','' | replace:'.html','' | replace:'-index','' }}{% endcapture %}
|
||||
|
||||
<body class="page-{{ id }}">
|
||||
|
||||
{% include header.html %}
|
||||
|
||||
|
@ -2,46 +2,50 @@
|
||||
layout: base
|
||||
---
|
||||
|
||||
<h1 class="page-title"><a class="home" href="/" title="Back to Home">/</a>{{ page.category }}</h1>
|
||||
|
||||
{% for post in site.categories[page.category] %}
|
||||
<section role="main" id="main" class="row">
|
||||
|
||||
{% if post.categories contains "goodies" %}
|
||||
<h1 class="page-title"><a class="home" href="/" title="Back to Home">/</a>{{ page.category }}</h1>
|
||||
|
||||
<article class="hentry goodie">
|
||||
<header>
|
||||
<h1 class="entry-title"><a href="{{ post.url }}">{{ post.title }}</a></h1>
|
||||
</header>
|
||||
{% for post in site.categories[page.category] %}
|
||||
|
||||
{% if post.categories contains "goodies" %}
|
||||
|
||||
<section class="entry-content">
|
||||
<article class="hentry goodie">
|
||||
<header>
|
||||
<h1 class="entry-title"><a href="{{ post.url }}">{{ post.title }}</a></h1>
|
||||
</header>
|
||||
|
||||
{% if post.image %}
|
||||
<a href="{{ post.url }}">
|
||||
{% picture {{ post.image }} class="teaser" %}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ post.excerpt }}
|
||||
{% endif %}
|
||||
|
||||
<footer class="goodie-actions">
|
||||
|
||||
<p class="info col3">
|
||||
<a class="btn icon-info" href="{{ post.url }}">Release Post</a>
|
||||
</p>
|
||||
|
||||
{% if post.download %}
|
||||
<p class="download col3">
|
||||
<a class="btn icon-arrow-down" href="/media/{{ post.download }}">Download <span>zip</span></a>
|
||||
</p>
|
||||
<section class="entry-content">
|
||||
|
||||
{% if post.image %}
|
||||
<a href="{{ post.url }}">
|
||||
{% picture {{ post.image }} class="teaser" %}
|
||||
</a>
|
||||
{% else %}
|
||||
{{ post.excerpt }}
|
||||
{% endif %}
|
||||
|
||||
<footer class="goodie-actions">
|
||||
|
||||
</footer>
|
||||
<p class="info col3">
|
||||
<a class="btn icon-info" href="{{ post.url }}">Release Post</a>
|
||||
</p>
|
||||
|
||||
{% if post.download %}
|
||||
<p class="download col3">
|
||||
<a class="btn icon-arrow-down" href="/media/{{ post.download }}">Download <span>zip</span></a>
|
||||
</p>
|
||||
{% endif %}
|
||||
|
||||
</footer>
|
||||
|
||||
</section>
|
||||
</article>
|
||||
</section>
|
||||
</article>
|
||||
|
||||
{% else %}
|
||||
{% include index.html %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% include index.html %}
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
|
||||
</section>
|
@ -235,6 +235,8 @@
|
||||
//
|
||||
.goodie-actions {
|
||||
.clearfix;
|
||||
max-width: 640px;
|
||||
margin: 0 auto;
|
||||
|
||||
p,
|
||||
.btn { margin-bottom: 0 }
|
||||
|
@ -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,
|
||||
|
@ -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>
|
Loading…
Reference in New Issue
Block a user