1
0
mirror of https://github.com/kremalicious/blog.git synced 2025-01-03 18:35:07 +01:00

nicer photo index view

This commit is contained in:
Matthias Kretschmann 2017-02-17 18:39:38 +01:00
parent f51c391399
commit 16295d8967
Signed by: m
GPG Key ID: BD3C1F3EDD7831FC
4 changed files with 29 additions and 20 deletions

View File

@ -67,7 +67,10 @@
.photo-link
display: block
display: block;
img
@extend .media-frame
&,
&:hover,
@ -75,14 +78,16 @@
&:active
box-shadow: none
&:hover
&:hover,
&:focus
img
border-color: $link-color
border-color: $link-color-hover
border-radius: $border-radius-base
&:active
background: none
//
// Photo background change adjustment
//

View File

@ -48,14 +48,3 @@
@extend .divider-top
margin-top: $spacer
padding-top: $spacer
.photo-link
display: block
img
@extend .media-frame
&:hover,
&:focus
img
border-color: $link-color-hover
border-radius: $border-radius-base

View File

@ -0,0 +1,7 @@
<article class="grid__col">
<a class="photo-link" href="{{ post.url }}" title="{{ post.title }}">
{% picture photothumb {{ post.image }} %}
</a>
</article>

View File

@ -2,7 +2,7 @@
layout: base
---
<section role="main" id="main" class="grid">
<section role="main" id="main">
{% if page.type == 'category' %}
<h1 class="page-title">{{ page.title }}</h1>
@ -11,10 +11,18 @@ layout: base
{% else %}
<h1 class="page-title">{{ page.type }} archive for {{ page.title }}</h1>
{% endif %}
{% for post in page.posts %}
{% include articles.html %}
{% endfor %}
{% if page.path contains "photos" %}<div class="grid grid--gutters grid--half grid-medium--third">{% endif %}
{% for post in page.posts %}
{% if post.layout == "photo" %}
{% include photos.html %}
{% else %}
{% include articles.html %}
{% endif %}
{% endfor %}
{% if page.path contains "photos" %}</div>{% endif %}
</section>