forked from wowthemesnet/mediumish-theme-jekyll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
53 lines (47 loc) · 1.53 KB
/
index.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
---
layout: default
title: Home
---
{% assign today_unix = 'now' | date: '%s' | plus: 0 %}
{% if page.url == "/" %}
{% assign filtered_posts = "" | split: ',' %}
{% for post in site.posts %}
{% if post.event %}
{% assign event_unix = post.event | date: '%s' | plus: 0 %}
{% if event_unix >= today_unix or post.featured %}
{% assign filtered_posts = filtered_posts | push: post %}
{% endif %}
{% endif %}
{% endfor %}
{% assign filtered_posts = filtered_posts | sort: 'event' %}
{% for post in site.posts %}
{% if post.event %}
{% assign event_unix = post.event | date: '%s' | plus: 0 %}
{% if event_unix < today_unix and post.featured == nil %}
{% assign filtered_posts = filtered_posts | push: post %}
{% endif %}
{% else %}
{% assign filtered_posts = filtered_posts | push: post %}
{% endif %}
{% endfor %}
{% endif %}
<section class="recent-posts">
<div class="section-title">
<h2><span>{{ site.static.featured }}</span></h2>
</div>
<div class="row listrecent">
{% for post in filtered_posts limit: 12 %}
{% if post.hidden != true %}
{% include postbox.html %}
{% endif %}
{% endfor %}
</div>
</section>
<div class="bottompagination">
<div class="pointerup"><i class="fa fa-caret-up"></i></div>
<span class="navigation" role="navigation">
{{ site.static.older_articles }}
<a href="{{ site.baseurl }}/archive">{{ site.static.archive }}</a>
({{ site.posts.size }})
</span>
</div>