forked from wowthemesnet/mediumish-theme-jekyll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
50 lines (46 loc) · 2.01 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
---
layout: default
title: Home
---
{% assign today_unix = 'now' | date: '%s' | plus: 0 %} {% if page.url == "/" %}
<!-- Featured ================================================== -->
{% 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' %} {% if filtered_posts.size > 0
%}
<section class="featured-posts">
<div class="section-title">
<h2><span>{{ site.static.featured }}</span></h2>
</div>
<div class="row listfeaturedtag">
{% for post in filtered_posts limit: 9 %} {% if post.hidden != true %} {%
include postbox.html %} {% endif %} {% endfor %}
</div>
</section>
{% endif %} {% endif %}
<!-- Posts Index ================================================== -->
<section class="recent-posts">
<div class="section-title">
<h2><span>{{ site.static.all }} ({{ paginator.total_posts }})</span></h2>
</div>
<div class="row listrecent">
{% 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 and post.featured == nil %} {% assign
filtered_posts = filtered_posts | push: post %} {% endif %} {% else %} {%
assign filtered_posts = filtered_posts | push: post %} {% endif %} {% endfor
%} {% for post in filtered_posts limit: 9 %} {% if post.hidden != true %} {%
include postbox.html %} {% endif %} {% endfor %}
</div>
</section>
<!-- Pagination
================================================== -->
<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>
</span>
</div>