Skip to content
This repository has been archived by the owner on Apr 23, 2021. It is now read-only.

Commit

Permalink
Merge pull request #754 from johnjohndoe/projects-reverse-sorting
Browse files Browse the repository at this point in the history
Projects reverse sorting
  • Loading branch information
k-nut authored Dec 3, 2017
2 parents 0fa4cb4 + 8d62b36 commit fbdc2ff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion _layouts/lab.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ <h3 id="events">Termine</h3>

<!-- Projekte -->
{% assign sorted_projects = site.pages | where_exp:"sitepage","sitepage.lab contains meta.lab" | where:"layout","project" | sort: 'date' %}
{% if meta.projectsorder == 'reverse' %}
{% if meta.projectsorder != 'reverse' %}
{% assign sorted_projects = sorted_projects | reverse %}
{% endif %}

Expand Down
3 changes: 2 additions & 1 deletion projekte/alle/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ <h3 class="pull-left">Alle Projekte</h3>
<span class="h4 pull-right"><a href="/projekte">Projekt Showcase …</a></span>
</div>

{% for sitepage in site.pages %}
{% assign sorted_site_pages = site.pages | sort: 'date' | reverse %}
{% for sitepage in sorted_site_pages %}
{% if sitepage.layout == 'project' %}
{% include project-teaser-slim.html %}
{% endif %}
Expand Down
3 changes: 2 additions & 1 deletion projekte/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ <h3 class="pull-left">Projekt Showcase</h3>


<div class="packery-item-gutter"></div>
{% for sitepage in site.pages %}
{% assign sorted_site_pages = site.pages | sort: 'date' | reverse %}
{% for sitepage in sorted_site_pages %}
{% if sitepage.showcase and sitepage.layout == 'project' %}
<div class="packery-item" >
{% include project-teaser.html %}
Expand Down

0 comments on commit fbdc2ff

Please sign in to comment.