-
Notifications
You must be signed in to change notification settings - Fork 54
/
index.html
102 lines (91 loc) · 5 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
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
---
layout: default
title: "Blog"
use_math: true
---
<!-- <main id="scroll" class="home" role="main" itemprop="mainContentOfPage" itemscope="itemscope" itemtype="http://schema.org/Blog">
{% for post in paginator.posts %}
<div class="row animate-box">
<div class="col-md-8 col-md-offset-2 text-center">
<article role="article" class="post-item" itemscope="itemscope" itemtype="http://schema.org/BlogPosting" itemprop="blogPost">
<a class="datetime" href="{{ post.url | prepend: site.baseurl }}">
<meta itemprop="datePublished" content="{{post.date}}">
<time datetime="{{ post.date | date_to_xmlschema }}">
<span class="day">
{{ post.date | date: "%d" }}
</span>
<span class="month-year">
{{ post.date | date: "%B %Y" }}
</span>
</time>
</a>
<div class="content">
<a href="{{ post.url | prepend: site.baseurl }}"><h2 class="post-title" itemprop="name"><strong>{{ post.title }}</strong></h2></a>
<p class="description">
{{ post.content | strip_html | truncatewords:35 }}
</p>
<a href="{{ post.url | prepend: site.baseurl }}" class="btn btn-primary btn-outline with-arrow">Read more<i class="fa fa-arrow-right"></i></a>
<div class="tags">
{% for tag in post.tags %}
<a href="{{ site.baseurl }}/tags/#{{tag | slugify }}">{{ tag }}</a>
{% endfor %}
</div>
</div>
</article>
</div>
</div>
{% endfor %}
</main> -->
<main id="scroll" class="container" role="main" itemprop="mainContentOfPage" itemscope="itemscope" itemtype="http://schema.org/Blog">
{% for post in paginator.posts %}
{% assign ind = forloop.index0 | modulo: 2 %}
{% if ind == 0 %}
<div class="card-deck">
{% endif %}
<div class="animate-box card">
<article role="article" itemscope="itemscope" itemtype="http://schema.org/BlogPosting" itemprop="blogPost">
<!-- <a class="datetime" href="{{ post.url | prepend: site.baseurl }}">
<meta itemprop="datePublished" content="{{post.date}}">
<time datetime="{{ post.date | date_to_xmlschema }}">
<span class="day">
{{ post.date | date: "%d" }}
</span>
<span class="month-year">
{{ post.date | date: "%B %Y" }}
</span>
</time>
</a> -->
<h2>
<a href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
<!-- {% capture nowunix %}{{'now' | date: '%s'}}{% endcapture %}
{% capture posttime %}{{post.date | date: '%s'}}{% endcapture %}
{% assign week = 7 | times: 24 | times: 60 | times: 60 %}
{% assign one_week_ago = nowunix | minus: week | date: '%s' %}
{% if posttime >= one_week_ago %}
<span style="background-color: green;float: right;font-size: small !important;padding: 8px 15px!important;color: white !important;border-radius: 4px;">NEW</span>
{% endif %} -->
</h2>
<p class="author-wrap">
<span class="author-img" style="background-image: url({{site.baseurl}}/assets/img/authors/{{site.data.authors[post.github_username].author_image}});"></span>
<span class="author">by {{site.data.authors[post.github_username].name}}</span>
|
<span class="admin"><span>{{ post.date | date: "%B %d, %Y" }}</span></span>
</p>
<p>
{{ post.content | strip_html | truncatewords:40 }}
</p>
<!-- <a href="{{ post.url | prepend: site.baseurl }}" class="btn btn-primary btn-outline with-arrow">Read more<i class="fa fa-arrow-right"></i></a> -->
<div class="tags">
{% for tag in post.tags %}
<a href="{{ site.baseurl }}/tags/#{{tag | slugify }}">{{ tag }}</a>
{% endfor %}
</div>
</article>
</div>
{% if ind == 1 %}
</div>
{% endif %}
{% endfor %}
</main>