~animesh/anmsh.net

9c07ea930766f752b850acfdab5a70a995d755d0 — Animesh Bulusu 5 months ago 2fd7fff
Fix drafts structure
3 files changed, 8 insertions(+), 3 deletions(-)

M content/drafts/contents.lr
M models/drafts.ini
M templates/drafts.html
M content/drafts/contents.lr => content/drafts/contents.lr +3 -1
@@ 4,4 4,6 @@ title: Drafts
---
_slug: _d
---
_discoverable: no
\ No newline at end of file
_discoverable: no
---
description: work-in-progress posts
\ No newline at end of file

M models/drafts.ini => models/drafts.ini +4 -1
@@ 14,4 14,7 @@ order_by = -pub_date, title
[pagination]
enabled = yes
per_page = 50
items = this.parent.children.filter((F._model == 'post').and(F._discoverable == False))
\ No newline at end of file
items = this.parent.children.filter((F._model == 'post').and(F._discoverable == False))

[fields.description]
type = string
\ No newline at end of file

M templates/drafts.html => templates/drafts.html +1 -1
@@ 3,6 3,6 @@
{% from "macros/posts.html" import render_posts %}
{% block head%}<style>.post{margin-top:25px}.post ul li{margin-bottom:10px}</style>{%endblock%}
{% block body %}
{{ render_header("Drafts","work-in-progress posts") }}
{{ render_header(this.title, this.description) }}
{{ render_posts(this.pagination.items.include_undiscoverable(True)) }}
{% endblock %}
\ No newline at end of file