-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·123 lines (123 loc) · 7.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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
---
layout: home
title: Blog
description: "The personal blog of Hossain Mohd. Faysal, a doctoral candidate in Electrical Engineering at University of Pennsylvania."
headline: An Engineer's Diary
tags: [Hossain, Mohd, Faysal, electrical, engineering, blog, university, pennsylvania, doha, Qatar]
---
{% if site.paginate %}
{% for post in paginator.posts %}
{% if site.wpm %}
{% assign readtime = post.content | strip_html | number_of_words | append: '.0' | divided_by:site.wpm %}
{% else %}
{% assign readtime = post.content | strip_html | number_of_words | append: '.0' | divided_by:180 %}
{% endif %}
{% if post.modified %}{% assign modifiedtime = post.modified | date: "%Y%m%d" %}
{% assign posttime = post.date | date: "%Y%m%d" %}{% endif %}
<article class="animated-post notepad-index-post post row">
<div class="small-12 medium-3 large-2 columns datetime">
<span class="notepad-post-meta">
<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>
{% if post.modified %}{% if modifiedtime != posttime %}
<span class="month-year">
<br>Updated on
</span>
<time datetime="{{ post.modified | date_to_xmlschema }}">
<span class="month-year">
{{ post.modified | date: "%d %B %Y" }}
</span>
{% endif %}{% endif %}
</time>
</span>
</div>
<div class="small-12 medium-9 large-10 columns">
<header class="notepad-post-header">
<h3 class="notepad-post-title">
<a href="{{ site.url }}{{ post.url }}">
{{ post.title }}
</a>
</h3>
</header>
<section class="notepad-post-excerpt">
<p>{{ post.content | strip_html | truncatewords:30 }}</p>
</section>
<div class="notepad-index-post-tags">
{% for tag in post.categories %}<a href="{{ site.url }}/categories/index.html#{{ tag | cgi_encode }}" title="Other posts from the {{ tag | capitalize }} category">{{ tag | capitalize }}</a>{% unless forloop.last %} {% endunless %}{% endfor %}{% if site.readtime %} <a><i class="fa fa-clock-o"></i> {% if readtime > 60 %}{% assign readtime_hours = readtime | divided_by: 60 %}{% assign readtime_minutes = readtime | modulo:60 %}{% if readtime_hours > 1 and readtime_hours < 2 %}1 hour{% else %}<span class="hour">{{ readtime_hours }}</span> hours{% endif %}{% if readtime_minutes < 1 %}{% elsif readtime_minutes > 1 and readtime_minutes < 1.5 %} and 1 minute {% elsif readtime_minutes > 1.5 %} and <span class="time">{{ readtime_minutes }}</span> minutes{% endif %}{% else %}{% if readtime < 1 %}Less than 1 minute {% elsif readtime > 1 and readtime < 1.5 %}1 minute {% elsif readtime > 1.5 %}<span class="time">{{ readtime }}</span> minutes {% endif %}{% endif %} read</a>{% endif %}{% if post.featured %} <a href="{{ site.url }}/featured"><i class="fa fa-star-half-o fa-spin"></i> Featured</a>{% endif %}{% if post.video %} <a><i class="fa fa-youtube-play"></i> Video</a>{% endif %}{% if post.location %} <a href="https://www.google.com/maps/place/{% if post.locationgps %}{{ post.locationgps }}{% else %}{{ post.location}}{% endif %}" target="_blank"><i class="fa fa-map-marker"></i> {{ post.location }}</a>{% endif %}
</div>
</div>
</article>
{% endfor %}
{% if paginator.total_pages > 1 %}
<nav class="pagination" role="navigation">
{% if paginator.previous_page %}
{% if paginator.previous_page == 1 %}
<a class="newer-posts" href="{{ site.url }}"><i class="fa fa-chevron-left"></i> Newer</a>
{% else %}
<a class="newer-posts" href="{{ site.url }}/page{{ paginator.previous_page }}"><i class="fa fa-chevron-left"></i> Newer</a>
{% endif %}
{% else %}
<span class="newer-posts faded"><i class="fa fa-chevron-left"></i> Newer</span>
{% endif %}
<span class="page-number">Page {{ paginator.page }} of {{ paginator.total_pages }}</span>
{% if paginator.next_page %}
<a class="older-posts" href="{{ site.url }}/page{{ paginator.next_page }}/">Older <i class="fa fa-chevron-right"></i></a>
{% else %}
<span class="older-posts faded">Older <i class="fa fa-chevron-right"></i></span>
{% endif %}
</nav>
{% endif %}
{% else %}
{% for post in site.posts %}
{% if site.wpm %}
{% assign readtime = post.content | strip_html | number_of_words | append: '.0' | divided_by:site.wpm %}
{% else %}
{% assign readtime = post.content | strip_html | number_of_words | append: '.0' | divided_by:180 %}
{% endif %}
{% if post.modified %}{% assign modifiedtime = post.modified | date: "%Y%m%d" %}
{% assign posttime = post.date | date: "%Y%m%d" %}{% endif %}
<article class="animated-post notepad-index-post post row">
<div class="small-12 medium-3 large-2 columns datetime">
<span class="notepad-post-meta">
<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>
{% if post.modified %}{% if modifiedtime != posttime %}
<span class="month-year">
<br>Updated on
</span>
<time datetime="{{ post.modified | date_to_xmlschema }}">
<span class="month-year">
{{ post.modified | date: "%d %B %Y" }}
</span>
{% endif %}{% endif %}
</time>
</span>
</div>
<div class="small-12 medium-9 large-10 columns">
<header class="notepad-post-header">
<h3 class="notepad-post-title">
<a href="{{ site.url }}{{ post.url }}">
{{ post.title }}
</a>
</h3>
</header>
<section class="notepad-post-excerpt">
<p>{{ post.content | strip_html | truncatewords:30 }}</p>
</section>
<div class="notepad-index-post-tags">
{% for tag in post.categories %}<a href="{{ site.url }}/categories/index.html#{{ tag | cgi_encode }}" title="Other posts from the {{ tag | capitalize }} category">{{ tag | capitalize }}</a>{% unless forloop.last %} {% endunless %}{% endfor %}{% if site.readtime %} <a><i class="fa fa-clock-o"></i> {% if readtime > 1 and readtime < 1.5 %}1 minute read{% endif %}{% if readtime > 1.5 %}<span class="time">{{ readtime }}</span> minutes read{% endif %}{% if readtime < 1 %}Less than 1 minute read{% endif %}</a>{% endif %}{% if post.featured %} <a href="{{ site.url }}/featured"><i class="fa fa-star-half-o fa-spin"></i> Featured</a>{% endif %}{% if post.video %} <a><i class="fa fa-youtube-play"></i> Video</a>{% endif %}{% if post.location %} <a href="https://www.google.com/maps/place/{% if post.locationgps %}{{ post.locationgps }}{% else %}{{ post.location}}{% endif %}" target="_blank"><i class="fa fa-map-marker"></i> {{ post.location }}</a>{% endif %}
</div>
</div>
</article>
{% endfor %}
{% endif %}