forked from samesies/barber-jekyll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpost.html
85 lines (76 loc) · 2.64 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
---
layout: default
---
<div class="post">
<article itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<div class="post__header section-padding--double">
<div class="grid-small">
<h2 itemprop="name headline">{{ page.title }}</h2>
<time class="post__date" datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%-d %b %Y" }}</time>
</div>
</div>
{% if page.image %}
<div class="post__img">
<div>
<figure class="absolute-bg" style="background-image: url('{{ page.image }}');"></figure>
</div>
</div>
{% endif %}
<div class="post__content section-padding">
<div class="grid">
<div id="markdown" itemprop="articleBody">
{{content}}
</div>
{% include share.html %}
</div>
</div>
<!-- Everything inside the #author tags pulls data from the author -->
{% if page.author %}
<div class="section-padding--none">
<div class="grid">
<hr class="sep"/>
</div>
</div>
<div class="section-padding">
<div class="grid-small">
{% for author in page.author %}
{% assign authorDetails = site.author | where: "name", author %}
{% if forloop.first == true %}
<span class="post__author">Posted by
{% else %}
<span class="post__author">&
{% endif %}
{% if authorDetails[0]["url"] %}<a href="{{ authorDetails[0]['url'] }}" title="More By {{ author }}">{% endif %}{{ author }}{% if authorDetails[0]["url"] %}</a>{% endif %}</span>
<p class="post__bio">{{ authorDetails[0]["bio"] }}</p>
{% endfor %}
</div>
</div>
{% endif %}
{% include disqus.html %}
</article>
</div>
<!-- Links to Previous/Next posts -->
{% assign relatedTag = page.tags | first %}
{% if relatedTag %}
<section class="related section-padding">
<div class="grid-xlarge">
<h2 class="related__title">Related</h2>
<div class="related__container">
{% for post in site.tags[relatedTag] limit: 3 %}
<article class="related__post">
<a class="related__link" href="{{ post.url | absolute_url }}">
{% if post.image %}
<figure class="related__img">
<img src="{{ post.image }}" alt="{{ post.title }}"/>
</figure>
{% endif %}
<div>
<h2 class="related__text">{{ post.title }}</h2>
</div>
</a>
</article>
{% endfor %}
</div>
</div>
</section>
{% endif %}