added date to title in home, added catégories and cat class in block in home
This commit is contained in:
@@ -1,3 +1,16 @@
|
||||
{# build taxo tags (categories) ids array #}
|
||||
{% set taxlist = taxonomylist.get() %}
|
||||
{% if taxlist %}
|
||||
{% set catlist = {} %}
|
||||
{% set id = 1 %}
|
||||
{% for tax,value in taxlist['tag'] %}
|
||||
{% set catlist = catlist|merge({ (tax|e('url')) : (id) }) %}
|
||||
{% set id = id + 1 %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="en">
|
||||
<head>
|
||||
|
||||
@@ -5,9 +5,26 @@
|
||||
{% set image = page.media.images|first %}
|
||||
{% endif %}
|
||||
|
||||
<a href="{{ page.url }}">{{ image.resize(500).html }}</a>
|
||||
{% if page.taxonomy.tag %}
|
||||
{{ dump(catlist) }}
|
||||
<nav class="categories">
|
||||
<ul>
|
||||
{% for tag in page.taxonomy.tag %}
|
||||
<li>
|
||||
<a class="tag-{{ catlist[(tag|e('url'))] }}" href="/categories/tag{{ config.system.param_sep }}{{ tag|e('url') }}">{{ tag }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% endif %}
|
||||
|
||||
<a class="image-link" href="{{ page.url }}">{{ image.resize(500).html }}</a>
|
||||
|
||||
<header>
|
||||
<h1><a href="{{ page.url }}">{{page.title}}</a></h1>
|
||||
<h1>
|
||||
<a class="title" href="{{ page.url }}">{{page.title}}</a>
|
||||
<span class="date">{{page.date|date("Y")}}</span>
|
||||
</h1>
|
||||
<h2><a href="{{ page.url }}">{{page.header.subtitle}}</a></h2>
|
||||
</header>
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user