post.html 3.86 KB
Newer Older
D Sal's avatar
D Sal committed
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
---
layout: base
---

{% assign post = page %}
{% if post.tags.size > 0 %}
    {% capture tags_content %}Post tags {% if post.tags.size == 1 %}<i class="fa fa-tag"></i>{% else %}<i class="fa fa-tags"></i>{% endif %}: {% endcapture %}
    {% for post_tag in post.tags %}
        {% for data_tag in site.data.tags %}
            {% if data_tag.slug == post_tag %}
                {% assign tag = data_tag %}
            {% endif %}
        {% endfor %}
        {% if tag %}
            {% capture tags_content_temp %}{{ tags_content }}<a href="/blog/tags/{{ tag.slug }}.html">{{ tag.name }}</a>{% if forloop.last == false %}, {% endif %}{% endcapture %}
            {% assign tags_content = tags_content_temp %}
        {% endif %}
    {% endfor %}
{% else %}
    {% assign tags_content = '' %}
{% endif %}
<div class="site-wrap post">
    
    <section class="container">
            <div class="row">
                <!-- left two-thirds block-->
                <div class="left two-thirds col-lg-8 col-md-8 col-sm-12 col-xs-12">
                    <div class="info-block">
                        <div class="row">
30
31
32
33
34
35
36
37
38
39
40
41
42
43
                            <div class="col">
                               <h2>{{ page.title }}</h2> 
                            </div>
                        </div>
                        <div class="row">
                            <div class="col">
                                <p class="author">{% t blog.author %}: {% if page.author %}{{page.author}}{% else %}{{site.author}}{% endif%}</p>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col">
                                <p>{{ page.date | date: '%B %d, %Y' }}</p>
                            </div>
                        </div>
D Sal's avatar
D Sal committed
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
                    <div>
                        {{content}}
                    </div>
                    <hr>
                    <p id="post-meta">{{ tags_content }}</p>
                    </div>
                </div>
                <!-- end left two-thirds block-->
                
                <!-- right one-third block-->
                <div class="right one-third col-lg-4 col-md-4 col-sm-12 col-xs-12">
                        <div class="sidebar col-sm-12 col-xs-12">   
                            <div class="info-block">
                                <div class="row center-xs">
                                    <div class="col"><h2>Recent Posts</h2></div>
                                </div>
                                {% for post in site.posts limit:4 %}
                                <div class="row start-xs info-block-row">
                                    <div class="col">
                                         <p><a href="{{ post.url }}">{{ post.title }}</a></p>
                                     </div>
                                </div>
                                {% endfor %}
                            </div>
                            <div class="info-block">
                                <div class="row center-xs">
                                    <div class="col">
                                        <h2>Popular Tags</h2>
                                    </div>
                                </div>
                                    {% for tag in site.data.tags limit:4 %}
                                    <div class="row start-xs">
                                        <div class="col">
                                             <p><a href="/blog/tags/{{ tag.slug }}.html">{{ tag.name }}</a></p>
                                         </div>
                                     </div>
                                     {% endfor %}


                            </div>
                        </div> 
                </div>
                <!-- end right one-third block-->
            </div>
        </section>
89
    </div>