mirror of
https://github.com/ahoneybun/ahoneybun.net.git
synced 2025-05-12 11:14:01 -06:00
start work moving to serene theme
This commit is contained in:
parent
e112d63d51
commit
06ec754229
78 changed files with 1552 additions and 140 deletions
43
templates/blog.html
Normal file
43
templates/blog.html
Normal file
|
@ -0,0 +1,43 @@
|
|||
{% extends "_base.html" %}
|
||||
|
||||
{% block page %}blog{% endblock page%}
|
||||
{% block lang %}{% if section.extra.lang %}{{ section.extra.lang }}{% else %}{{ section.lang }}{% endif %}{% endblock lang %}
|
||||
{% block title %}{{ section.title }}{% endblock title %}
|
||||
{% block desc %}
|
||||
<meta name="description" content="{{ section.description }}">
|
||||
{% endblock desc %}
|
||||
|
||||
{% block content %}
|
||||
{% include "_header.html" %}
|
||||
<div id="wrapper">
|
||||
<main class="layout-list">
|
||||
{% if config.extra.blog_categorized %}
|
||||
{% for category,posts in section.pages | sort(attribute="taxonomies.categories.0") | group_by(attribute="taxonomies.categories.0") %}
|
||||
{% set category_name = category %}
|
||||
{% if category is matching("^__[0-9]{2}__") %}
|
||||
{% set category_name = category | split(pat="") | slice(start=7) | join(sep="") %}
|
||||
{% endif %}
|
||||
<div class="category">{{ category_name }}</div>
|
||||
<div class="post-list categorized">
|
||||
{% for post in posts %}
|
||||
<a class="post instant {% if post.extra.featured %}featured{% endif %}" href="{{ post.permalink }}">
|
||||
<span>{{ post.title }}</span>
|
||||
<span class="date">{{ post.date | date}}</span>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="post-list">
|
||||
{% for post in section.pages %}
|
||||
<a class="post instant {% if post.extra.featured %}featured{% endif %}" href="{{ post.permalink }}">
|
||||
<span>{{ post.title }}</span>
|
||||
<span class="date">{{ post.date | date}}</span>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</main>
|
||||
{% include "_footer.html" %}
|
||||
</div>
|
||||
{% endblock content %}
|
Loading…
Add table
Add a link
Reference in a new issue