Add sorting for reciepts
This commit is contained in:
parent
1a40fd15b8
commit
2ede7862b4
5 changed files with 32 additions and 26 deletions
11
content/rezept/normal/contents.lr
Normal file
11
content/rezept/normal/contents.lr
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
title: normaler Waffelteig
|
||||||
|
---
|
||||||
|
author: L3D
|
||||||
|
---
|
||||||
|
body: bar
|
||||||
|
---
|
||||||
|
icon: fas fa-heart
|
||||||
|
---
|
||||||
|
number: 100
|
||||||
|
---
|
||||||
|
teaser: Foo
|
11
content/rezept/vegan/contents.lr
Normal file
11
content/rezept/vegan/contents.lr
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
title: vegane Waffeln
|
||||||
|
---
|
||||||
|
author: L3D
|
||||||
|
---
|
||||||
|
body: Vegan
|
||||||
|
---
|
||||||
|
icon: fas fa-heart
|
||||||
|
---
|
||||||
|
number: 10
|
||||||
|
---
|
||||||
|
teaser: Yoo
|
|
@ -13,13 +13,13 @@ label = Font-Awesome Icon [fas fa-heart]
|
||||||
type = string
|
type = string
|
||||||
|
|
||||||
[fields.author]
|
[fields.author]
|
||||||
label = Author
|
label = Author [für den Feed]
|
||||||
type = string
|
type = string
|
||||||
width = 1/2
|
width = 1/2
|
||||||
|
|
||||||
[fields.pub_date]
|
[fields.number]
|
||||||
label = Wann ist das Projekt entstanden?
|
label = Priorität [benötigt zum sortieren]
|
||||||
type = date
|
type = integer
|
||||||
width = 1/4
|
width = 1/4
|
||||||
|
|
||||||
[fields.teaser]
|
[fields.teaser]
|
||||||
|
|
|
@ -2,17 +2,8 @@
|
||||||
{% if from_index %}
|
{% if from_index %}
|
||||||
<section class="4u 6u(medium) 12u(xsmall) project">
|
<section class="4u 6u(medium) 12u(xsmall) project">
|
||||||
<span class="icon alt major">
|
<span class="icon alt major">
|
||||||
<a href="{{ post|url }}" class="project-creator" title="{%
|
<a href="{{ post|url }}" class="project-creator" title="">
|
||||||
if bag('translate', post.alt, 'projekt_von')
|
<i class="{{ post.icon }} fa-3x iconshiftdown"></i></a>
|
||||||
%}{{ bag('translate', post.alt, 'projekt_von') }}{% else
|
|
||||||
%}Von{% endif
|
|
||||||
%} {{ post.author }} {% if post.pub_date %} {%
|
|
||||||
if bag('translate', post.alt, 'projekt_am')
|
|
||||||
%}{{ bag('translate', post.alt, 'projekt_am') }}{% else
|
|
||||||
%}am{% endif %} {{ post.pub_date.strftime('%d.%m.%Y') }} {%
|
|
||||||
endif %} {% if bag('translate', post.alt, 'projekt_start')
|
|
||||||
%}{{ bag('translate', post.alt, 'projekt_start') }}{% else
|
|
||||||
%}gestarted{% endif %}"><i class="{{ post.icon }} fa-3x iconshiftdown"></i></a>
|
|
||||||
</span>
|
</span>
|
||||||
<a href="{{ post|url }}"><h3>{{ post.title }}</h3></a>
|
<a href="{{ post|url }}"><h3>{{ post.title }}</h3></a>
|
||||||
<article class="teaser">
|
<article class="teaser">
|
||||||
|
@ -23,15 +14,8 @@
|
||||||
<div id="main" class="wrapper style1">
|
<div id="main" class="wrapper style1">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<header class="major">
|
<header class="major">
|
||||||
<h2>{{ post.title }}</h2><p>{% if bag('translate', post.alt, 'projekt_launch')
|
<h2>{{ post.title }}</h2>
|
||||||
%}{{ bag('translate', post.alt, 'projekt_launch') }}{% else
|
<p></p>
|
||||||
%}Das Projekt wurde vom{% endif %} {{ post.author }} {% if post.pub_date %}{%
|
|
||||||
if bag('translate', post.alt, 'projekt_am')
|
|
||||||
%}{{ bag('translate', post.alt, 'projekt_am') }}{% else
|
|
||||||
%}am{% endif %} {{ post.pub_date.strftime('%d.%m.%Y') }} {% endif %}{%
|
|
||||||
if bag('translate', post.alt, 'projekt_start')
|
|
||||||
%}{{ bag('translate', post.alt, 'projekt_start') }}{% else
|
|
||||||
%}gestarted{% endif %}</p>
|
|
||||||
</header>
|
</header>
|
||||||
<section id="content">
|
<section id="content">
|
||||||
{{ post.body }}
|
{{ post.body }}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
</section>
|
</section>
|
||||||
<div class="row uniform">
|
<div class="row uniform">
|
||||||
<div class="box alt">
|
<div class="box alt">
|
||||||
{% for child in this.pagination.items %}
|
{% for child in this.pagination.items|sort(attribute='number', reverse = True)%}
|
||||||
{{ render_blog_post(child, from_index=true) }}
|
{{ render_blog_post(child, from_index=true) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue