Browse Source

add drafts area...

main
John-Mark Gurney 2 years ago
parent
commit
4faa270786
3 changed files with 33 additions and 0 deletions
  1. +6
    -0
      content/drafts/index.html
  2. +3
    -0
      content/drafts/meta.yaml
  3. +24
    -0
      layout/drafts.j2

+ 6
- 0
content/drafts/index.html View File

@@ -0,0 +1,6 @@
---
title: Drafts
description: Blog posts in progress
extends: drafts.j2
listable: false
---

+ 3
- 0
content/drafts/meta.yaml View File

@@ -0,0 +1,3 @@
extends: blog.j2
default_block: post
listable: false

+ 24
- 0
layout/drafts.j2 View File

@@ -0,0 +1,24 @@
{% from "macros.j2" import itemurl %}
{% extends "base.j2" %}

{% block main %}
<!--
{% block page_title %}<h1 class="title">{{ resource.meta.title }}</h1>{% endblock %}
-->

{% set posts = resource.node.walk_resources() | list %}
{% for res in posts[0:3] %}
{% if res.source.kind == "html" and res.meta.title != 'Drafts' %}
<a title="{{ res.meta.title }}"
href="{{ itemurl(res) }}">
{{ res.meta.title }}
</a>

{% endif %}
{% endfor %}

{% endblock %}

{% block copyright %}
Copyright © {{ time_now|date_format("%Y") }} John-Mark Gurney
{% endblock %}

Loading…
Cancel
Save