aboutsummaryrefslogtreecommitdiffstats
path: root/site/_layouts/post.html
blob: 083fac02e463a15a85b7660c20e73fa2057e9fa8 (plain)
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
---
layout: blog
---

<h1 class="blogHeader">
    Blog
    <span class="rss">
        <img src="{{ site.baseurl }}/static/img/subscribe.png"><a href="{{ site.baseurl }}{{ site.rss_path }}">RSS Feed</a>
    </span>
</h1>

<div class="post">
    <header>
        <div class="title">{{ page.title }}</div>
        <div class="author">By:
            {% if page.author.url %}
              <a href="{{ page.author.url }}">{{ page.author.name }}</a>
            {% else %}
              {{ page.author.name }}
            {% endif %}
        </div>
        <div class="date">{{ page.date | date_to_string }}</div>
    </header>
    <section>
        <div>
            {{ content }}
        </div>
    </section>
    <footer>
        <div class="row">
            <div class="col-sm-6">
                {% if page.previous %}
                    <a href="{{ site.baseurl }}{{ page.previous.url }}">Previous</a>
                    <br>
                    <br>
                    <a class="title" href="{{ site.baseurl }}{{ page.previous.url }}">{{ page.previous.title }}</a>
                    <div class="date"> {{ page.previous.date | date_to_string }} - By {{ page.previous.author.name }} </div>
                    <p class="content">
                        {{ page.previous.excerpt | strip_html | truncatewords:12 }}
                    </p>
                {% endif %}
            </div>
            <div class="col-sm-6">
                {% if page.next %}
                    <a href="{{ site.baseurl }}{{ page.next.url }}">Next</a>
                    <br>
                    <br>
                    <a class="title" href="{{ site.baseurl }}{{ page.next.url }}">{{ page.next.title }}</a>
                    <div class="date"> {{ page.next.date | date_to_string }} - By {{ page.next.author.name}} </div>
                    <p class="content">
                        <!--
                            NOTE:
                                the markdownify filter is used here
                                because posts are rendered in sequence;
                                that is, the next post's content isn't
                                yet rendered at the time that this post
                                is being rendered, so page.next.excerpt
                                is still in Markdown and not HTML

                            Reference: https://github.com/jekyll/jekyll/issues/2860
                        -->
                        {{ page.next.excerpt | markdownify | strip_html | truncatewords:12 }}
                    </p>
                {% endif %}
            </div>
        </div>
    </footer>
    <div class="disqus">
        {% include disqus.html %}
    </div>
</div>