-
Notifications
You must be signed in to change notification settings - Fork 427
/
post.html
123 lines (110 loc) · 4.04 KB
/
post.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<div class="page-header">
<h1>{{ page.title }} {% if page.tagline %}<small>{{page.tagline}}</small>{% endif %}</h1>
</div>
<article>
<div class="col-sm-10">
<span class="post-date">
{% assign d = page.date | date: "%d" | plus:'0' %}
{{ page.date | date: "%B" }}
{% case d %}
{% when 1 or 21 or 31 %}{{ d }}st,
{% when 2 or 22 %}{{ d }}nd,
{% when 3 or 23 %}{{ d }}rd,
{% else %}{{ d }}th,
{% endcase %}
{{ page.date | date: "%Y" }}
</span>
<div class="article_body">
{{ content }}
</div>
{% unless page.categories == empty %}
<ul class="tag_box list-unstyled list-inline">
<li><i class="fa fa-folder-open"></i></li>
{% assign categories_list = page.categories %}
{% if categories_list.first[0] == null %}
{% for category in categories_list %}
<li><a href="{{ site.BASE_PATH }}/{{ site.categories_path }}#{{ category }}-ref">
{{ category | join: "/" }} <span>({{ site.categories[category].size }})</span>
{% unless forloop.last %},{% endunless %}
</a></li>
{% endfor %}
{% else %}
{% for category in categories_list %}
<li><a href="{{ site.BASE_PATH }}/{{ site.categories_path }}#{{ category[0] }}-ref">
{{ category[0] | join: "/" }} <span>/{{ category[1].size }})</span>
</a></li>
{% endfor %}
{% endif %}
</ul>
{% endunless %}
{% unless page.tags == empty %}
<ul class="list-inline">
<li><i class="fa fa-tags"></i></li>
{% assign tags_list = page.tags %}
{% if tags_list.first[0] == null %}
{% for tag in tags_list %}
<li>
<a href="{{ site.BASE_PATH }}/{{ site.tags_path }}#{{ tag }}-ref">
{{ tag }} <span>({{ site.tags[tag].size }})</span>
{% unless forloop.last %},{% endunless %}
</a>
</li>
{% endfor %}
{% else %}
{% for tag in tags_list %}
<li>
<a href="{{ site.BASE_PATH }}/{{ site.tags_path }}#{{ tag[0] }}-ref">
{{ tag[0] }} <span>({{ tag[1].size }})</span>
{% unless forloop.last %},{% endunless %}
</a>
</li>
{% endfor %}
{% endif %}
{% assign tags_list = nil %}
</ul>
{% endunless %}
<hr>
<div>
<section class="share col-sm-6">
<h4 class="section-title">Share Post</h4>
<a class="btn btn-default btn-sm twitter" href="http://twitter.com/share?text={{page.title | encode}}{% if site.author.twitter%}&via={{site.author.twitter}}{% endif %}"
onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;">
<i class="fa fa-twitter fa-lg"></i>
Twitter
</a>
<a class="btn btn-default btn-sm facebook" href="https://www.facebook.com/sharer/sharer.php"
onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;">
<i class="fa fa-facebook fa-lg"></i>
Facebook
</a>
<a class="btn btn-default btn-sm gplus"
onclick="window.open('https://plus.google.com/share?url='+window.location.href, 'google-plus-share', 'width=490,height=530');return false;">
<i class="fa fa-google-plus fa-lg"></i>
Google+
</a>
</section>
<section class="col-sm-6 author">
<img src="//www.gravatar.com/avatar/{{site.author.email_md5}}" class="img-rounded author-image" />
<h4 class="section-title author-name">{{site.author.name}}</h4>
<p class="author-bio">{{site.author.bio}}</p>
</section>
</div>
<div class="clearfix"></div>
<ul class="pager">
{% if page.previous %}
<li class="previous"><a href="{{ site.BASE_PATH }}{{ page.previous.url }}" title="{{ page.previous.title }}">← Previous</a></li>
{% else %}
<li class="previous disabled"><a>← Previous</a></li>
{% endif %}
{% if page.next %}
<li class="next"><a href="{{ site.BASE_PATH }}{{ page.next.url }}" title="{{ page.next.title }}">Next →</a></li>
{% else %}
<li class="next disabled"><a>Next →</a>
{% endif %}
</ul>
<hr>
</div>
<div class="col-sm-2 sidebar-2">
</div>
</article>
<div class="clearfix"></div>