-
Notifications
You must be signed in to change notification settings - Fork 0
/
year-archive.html
82 lines (82 loc) · 5.02 KB
/
year-archive.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
layout: category_list
title: Year Archives
add_to_menu: false
description: "Meta description for Support page"
keywords: "responsive,jekyll,minimal template"
---
<div class="topics-area bg-color1">
<div class="topics-wrapper section-spacing bminus-30">
<div class="container">
<div class="col">
{%- assign posts = site.posts | where: 'draft' ,'false' -%}
{%- assign groupedByYear = posts | group_by_exp:"post","post.date | date:'%Y' " -%}
{%- for yearitem in groupedByYear -%}
<!--CONTATORE POST-->
{% assign posts_number = 0 %}
{%- for item in yearitem.items -%}
<!--CAPISCO SE LA CATEGORIA E' DRAFT-->
{% capture category_post %}{{ item.categories[0]}}{% endcapture %}
{% if category_post != nil %}
{% assign category = site.data.category.category | where: 'key' ,category_post | where: 'type' , '(categoria)' | first%}
{% capture category_draft %}{{ category.draft}}{% endcapture %}
{% if category_draft == "false" %}
<!--CAPISCO SE LA SEZIONE E' DRAFT-->
{% capture section_post %}{{ item.categories[1]}}{% endcapture %}
{% if section_post != nil %}
{% assign section = site.data.category.category | where: 'key' ,section_post | where: 'type' , '(sezione)' | first%}
{% capture section_draft %}{{ section.draft}}{% endcapture %}
{% if section_draft == "false" or section_draft == "" %}
<!--CAPISCO SE IL POST E' DRAFT-->
{% capture post_draft %}{{ item.draft}}{% endcapture %}
{% if post_draft == "false" %}
{% assign posts_number = posts_number | plus: 1 %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
<!--FINE CONTATORE POST-->
<div class="row">
<article class="topics-service bg-color3 wow fadeIn" data-wow-duration="3s">
<header class="topics-title">
<h4 class="heading-4 text-capitalize">{{ yearitem.name }} ({{posts_number}})</h4>
</header>
<ul class="topics-list list-inline">
{%- for item in yearitem.items -%}
<!--CAPISCO SE LA CATEGORIA E' DRAFT-->
{% capture category_post %}{{ item.categories[0]}}{% endcapture %}
{% if category_post != nil %}
{% assign category = site.data.category.category | where: 'key' ,category_post | where: 'type' , '(categoria)' | first%}
{% capture category_draft %}{{ category.draft}}{% endcapture %}
{% if category_draft == "false" %}
<!--CAPISCO SE LA SEZIONE E' DRAFT-->
{% capture section_post %}{{ item.categories[1]}}{% endcapture %}
{% if section_post != nil %}
{% assign section = site.data.category.category | where: 'key' ,section_post | where: 'type' , '(sezione)' | first%}
{% capture section_draft %}{{ section.draft}}{% endcapture %}
{% if section_draft == "false" or section_draft == "" %}
<!--CAPISCO SE IL POST E' DRAFT-->
{% capture post_draft %}{{ item.draft}}{% endcapture %}
{% if post_draft == "false" %}
<li>
<date>{{ item.date | date:'%B %e'}}</date>
<span><a href="{{ item.url | relative_url}}">{{ item.title }}</a></span>
</li>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
</ul>
</article>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</section>
<!-- End Topics Area -->