1
0
mirror of https://github.com/kremalicious/blog.git synced 2025-02-01 04:19:33 +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 .photo-link
display: block display: block;
img
@extend .media-frame
&, &,
&:hover, &:hover,
@ -75,9 +78,11 @@
&:active &:active
box-shadow: none box-shadow: none
&:hover &:hover,
&:focus
img img
border-color: $link-color border-color: $link-color-hover
border-radius: $border-radius-base
&:active &:active
background: none background: none

View File

@ -48,14 +48,3 @@
@extend .divider-top @extend .divider-top
margin-top: $spacer margin-top: $spacer
padding-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 layout: base
--- ---
<section role="main" id="main" class="grid"> <section role="main" id="main">
{% if page.type == 'category' %} {% if page.type == 'category' %}
<h1 class="page-title">{{ page.title }}</h1> <h1 class="page-title">{{ page.title }}</h1>
@ -12,9 +12,17 @@ layout: base
<h1 class="page-title">{{ page.type }} archive for {{ page.title }}</h1> <h1 class="page-title">{{ page.type }} archive for {{ page.title }}</h1>
{% endif %} {% endif %}
{% if page.path contains "photos" %}<div class="grid grid--gutters grid--half grid-medium--third">{% endif %}
{% for post in page.posts %} {% for post in page.posts %}
{% if post.layout == "photo" %}
{% include photos.html %}
{% else %}
{% include articles.html %} {% include articles.html %}
{% endif %}
{% endfor %} {% endfor %}
{% if page.path contains "photos" %}</div>{% endif %}
</section> </section>