forked from Mostafa-Samir/Mostafa-Samir.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
categories.html
36 lines (34 loc) · 1.19 KB
/
categories.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
---
layout: minimal
title: "Browse by Categories"
permalink: /categories/index.html
description: Find posts in categories that interests you...
---
<div class="tags">
{% assign cats_list = site.categories %}
{% if cats_list.first[0] == null %}
{% for cat in cats_list %}
<a data-scroll href="#{{ cat }}">{{ cat }}</a>
{% endfor %}
{% else %}
{% for cat in cats_list %}
<a data-scroll href="#{{ cat[0] }}">{{ cat[0] }}</a>
{% endfor %}
{% endif %}
{% assign cats_list = nil %}
</div>
{% for cat in site.categories %}
<span class="tag-title" id="{{ cat[0] }}">{{ cat[0] }}</span>
<ul class="post-list">
{% assign pages_list = cat[1] %}
{% for post in pages_list reversed %}
{% if post.title != null %}
{% if group == null or group == post.group %}
<li><a href="{{ site.url }}{{ post.url }}">{{ post.title }}<span class="entry-date"><time datetime="{{ post.date | date_to_xmlschema }}" itemprop="datePublished">{{ post.date | date: "%B %d, %Y" }}</time></a></li>
{% endif %}
{% endif %}
{% endfor %}
{% assign pages_list = nil %}
{% assign group = nil %}
</ul>
{% endfor %}