1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-11-26 11:49:04 +01:00

display recent photos under each photo post

This commit is contained in:
Matthias Kretschmann 2015-06-13 23:21:40 +02:00
parent 06956d3e00
commit 0061f61b5c
4 changed files with 55 additions and 11 deletions

View File

@ -98,3 +98,11 @@ picture:
itemprop: "image"
source_default:
width: "190"
photothumb:
ppi: [1, 2]
attr:
class: "related-image"
itemprop: "image"
source_default:
width: "190"
height: "190"

View File

@ -33,4 +33,21 @@
transition: none
.post-title-link
display: block
display: block
//
// Related Photos
//
.related-photos
@extend .divider-top
margin-top: $line-height-computed*2
.photo-link
display: block
margin-bottom: 15%
border: 2px solid transparent
&:hover,
&:focus
border-color: $link-color-hover
border-radius: $border-radius-base

View File

@ -0,0 +1,17 @@
<aside class="related-photos">
<div class="row">
{% for post in site.categories['photos'] limit:6 %}
<article class="related-photo col2">
<a class="photo-link" href="{{ post.url }}">
{% picture photothumb {{ post.image }} %}
</a>
</article>
{% endfor %}
</div>
</aside>

View File

@ -3,25 +3,27 @@ layout: base
---
<section role="main" id="main" class="page-single row">
<article class="hentry format-photo">
<figure class="hmedia">
{% picture {{ page.image }} %}
<figcaption class="entry-title fn">{{ page.title | titlecase }}</figcaption>
</figure>
<section class="entry-content">
{{ content }}
</section>
{% include entry_meta.html %}
{% include comments.html %}
{% include relatedphotos.html %}
</article>
</section>
</section>