Change blog to articles
This commit is contained in:
parent
5bc9e89704
commit
35fb4aa607
2 changed files with 15 additions and 1 deletions
24
source/articles/archive.html.twig
Normal file
24
source/articles/archive.html.twig
Normal file
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
layout: default
|
||||
title: Archive
|
||||
use: [posts]
|
||||
---
|
||||
{% block page_title_wrapper %}
|
||||
<h1 class="leading-tight mb-8">
|
||||
{% block page_title %}{{ page.title }}{% endblock %}
|
||||
</h1>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<ul class="list-reset -mt-4 -mx-4">
|
||||
{% for post in data.posts %}
|
||||
<li class="p-4 mb-6 {{ post.draft ? 'bg-blue-lighter' }}">
|
||||
{% include 'blog/post-summary' %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
{% endblock %}
|
14
source/articles/index.html.twig
Normal file
14
source/articles/index.html.twig
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
layout: default
|
||||
title: Articles
|
||||
use: [posts]
|
||||
---
|
||||
{% for post in data.posts if post.favourite %}
|
||||
<div class="mb-10">
|
||||
{% include 'blog/post-summary' %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<div class="markup">
|
||||
<a href="/articles/archive">Archive</a>
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue