aboutsummaryrefslogtreecommitdiff
path: root/_layouts/post.html
blob: bff2f5573247324f98108a74bd7e78bc071ea5df (about) (plain) (blame)
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
---
layout: default
---
<article>
  <section class="header">
    {{ site.t.posted_on[page.lang] }}
    {% include i18n-date.html date=page.date %}
  </section>
  {% if page.updated_at %}
    <section class="header">
      {{ site.t.updated_at[page.lang] }}
      {% include i18n-date.html date=page.updated_at %}
    </section>
  {% endif %}
  <section>

    {% if page.audio %}
      {% assign ogg=page.url | replace_first: "/", "" | replace: ".html", ".ogg" %}
      <audio controls>
        <source src="{% link {{ ogg }} %}" type="audio/ogg">
      </audio>

      <div class="torrent-link">
        {% capture torrent-file %}{{ ogg | absolute_url | append: ".torrent" }}{% endcapture %}
        <a href="{{ torrent-file }}">torrent</a>
        |
        <a href="/torrent.html?torrent={{ torrent-file | uri_escape }}">online webtorrent</a>
      </div>
    {% endif %}

    {% if page.video %}
      {% assign mkv=page.url | replace_first: "/", "" | replace: ".html", ".mkv" %}
      {% if site.flags.direct-video %}
        <video width="320" height="240" controls>
          <source src="{% link {{ mkv }} %}" type="video/x-matroska">
        </video>
      {% endif %}

      <div class="torrent-link">
        {% capture torrent-file %}{{ mkv | absolute_url | append: ".torrent" }}{% endcapture %}
        <a href="{{ torrent-file }}">torrent</a>
        |
        <a href="/torrent.html?torrent={{ torrent-file | uri_escape }}">online webtorrent</a>
      </div>
    {% endif %}

    {{ content }}
  </section>
  <section class="post-footer">
    <p>
      {% include public-inbox.html %}
    </p>
  </section>
</article>