/
post-content.html
102 lines (93 loc) · 3.73 KB
/
post-content.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
{% assign post = include.post %}
{% if post.mf-video != null %}
<div class="media">
{% for video in page.mf-video %}
<video class="u-video" src="{{video}}" controls loop>
<div lang="en">Looks like you can't see this video. <a href="{{video}}" download>Download it</a> instead.</div>
</video>
{% endfor %}
</div>
<div class="media">
{% for photo in page.mf-photo %}
<img class="u-photo" src="https://cdn.miklb.com/{{photo | remove: 'https://miklb.com/'}}" alt="" />
{% endfor %}
</div>
{% else %}
{% if post.mf-video != null %}
<div class="media">
{% for video in post.mf-video %}
<video class="u-video" src="{{video}}" controls loop>
<div lang="en">Looks like you can't see this video. <a href="{{video}}" download>Download it</a> instead.</div>
</video>
{% endfor %}
</div>
{% elsif post.mf-photo != null %}
<div class="media">
{% for photo in post.mf-photo %}
<img class="u-photo" src="https://cdn.miklb.com/{{photo | remove: 'https://miklb.com/'}}" alt="" />
{% endfor %}
</div>
{% endif %}
{% endif %}
{% if post.mf-in-reply-to != null %}
<h3>In reply to:</h3>
<ul>
{% for reply in post.mf-in-reply-to %}
<li><a class="u-in-reply-to" rel="in-reply-to" href="{{reply}}">{{reply}}</a></li>
{% endfor %}
</ul>
{% endif %}
<div class="e-content">
{% if post.content %}
{{ post.content }}
{% else %}
{{ content }}
{% endif %}
</div>
{% if post.mf-syndication != null %}
<div class="elsewhere linklist">
<h3>Also posted on:</h3>
<ul>
{% for elsewhere in post.mf-syndication %}
<li><a href="{{ elsewhere }}" class="u-syndication" {% if standalone == true %}rel="syndication"{% endif %}>
{{ elsewhere | remove_first:'http://' | remove_first:'https://' | remove_first:'www.' | split:'.' | first | capitalize }}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if post.mf-syndicate-to and site.data.[post.slug] %}
<div class="elsewhere linklist">
<h3>Also posted on:</h3>
<ul>
<li><a href="{{ site.data.[post.slug].url }}" class="u-syndication" rel="syndication">Twitter</a></li>
</ul>
</div>
{% endif %}
{% if post.persontags != null %}
<div class="persons linklist">
<h3>Mentioned:</h3>
<ul>
{% for elsewhere in post.persontags %}
<li><a href="{{ elsewhere }}" class="u-category h-card">
{{ elsewhere | remove_first:'http://' | remove_first:'https://' | remove_first:'www.' | remove_first:'.com' | split:'/' | first }}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if post.submitto != null %}
<div class="submitted-to linklist">
<h3>Submitted to:</h3>
<ul>
{% for elsewhere in post.submitto %}
<li><a href="{{ elsewhere }}" class="u-category">
{{ elsewhere | remove_first:'http://' | remove_first:'https://' | remove_first:'www.' | remove_first:'.com' | split:'/' | first }}</a></li>
{% endfor %}
</ul>
</div>
{% endif %}
{% if post.mf-location %}
<div class="post-map">
<img src="https://a.tiles.mapbox.com/v4/{{ site.mapid }}/pin-s-marker({% assign coordinates = post.mf-location | split: ',' %}{{ coordinates[1] | remove: ']' | remove:'"' }},{{ coordinates[0] | remove: 'geo:' | remove: '[' | remove:'"'}})/{{ coordinates[1] | remove: ']' | remove:'"' }},{{ coordinates[0] | remove: 'geo:' | remove: '[' | remove:'"'}},15/810x120.png?access_token={{ site.mapbox-token }}" alt="" class="post-location-image">
<p>🌎 {{ post.mf-place_name }}</p>
</div>
{% endif %}