summaryrefslogblamecommitdiffstats
path: root/templates/article.html
blob: 3de52e4428cef20e39f0629b77ef013c90a2d5ff (plain) (tree)
1
2
3
4
5




                                                                








                                                                                  



























                                                            
<article>
  $if(thumbnail)$
  <div class="thumbnail" style="height: 30vh;">$thumbnail$</div>
  $endif$
  $if(torrent)$
  <video controls class="thumbnail" id="media-$id$" style="height: 30vh;"></video>
  <script type='module'>
    const torrentId = '$torrent$';
    const player = document.querySelector('#media-$id$');
    window.torrentClient.add(torrentId, torrent => {
      const file = torrent.files.find(file => file.name.endsWith('.mp4'));
      file.streamTo(player);
    });
  </script>
  $endif$
  <div class="panel">
    <section class="header">
      <div class="title">
        <h1>$title$</h1>
        <a href="https://infoculture.pub$url$">permalink</a>
        <a href="/$path$">raw</a>
        $if(torrent)$
        <a href="$torrent$">magnet link</a>
        $endif$
      </div>
      <div class="meta">
        $if(author)$
        <h2 class="author">$author$</h2>
        $endif$
        <h3 class="date">$date$</h3>
        $if(tags)$
        <h3 class="tags">$tags$</h3>
        $endif$
      </div>
    </section>
    <br>
    <br>
    <section>
      $body$
    </section>
  </div>
</article>