summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--templates/article-resource.html44
-rw-r--r--templates/article.html34
-rw-r--r--templates/base.html3
-rw-r--r--templates/post.html37
-rw-r--r--templates/resource.html36
-rw-r--r--templates/resources.html25
-rw-r--r--templates/thumbs.html2
7 files changed, 97 insertions, 84 deletions
diff --git a/templates/article-resource.html b/templates/article-resource.html
deleted file mode 100644
index e3d9cac..0000000
--- a/templates/article-resource.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<article>
- $if(thumbnail)$
- <div class="thumbnail" style="height: 30vh;">$thumbnail$</div>
- $endif$
- $if(torrent)$
- <div>
- <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>
- </div>
- $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> \ No newline at end of file
diff --git a/templates/article.html b/templates/article.html
deleted file mode 100644
index 2aa24f2..0000000
--- a/templates/article.html
+++ /dev/null
@@ -1,34 +0,0 @@
-<article>
- $if(thumbnail)$
- <div class="thumbnail" style="height: 30vh;">$thumbnail$</div>
- $endif$
- $if(torrent)$
- $partial("templates/video-player.html")$
- $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> \ No newline at end of file
diff --git a/templates/base.html b/templates/base.html
index 1875345..1d5c74c 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -22,9 +22,10 @@
<nav>
<ul>
<li><a href="/">home</a></li>
+ <li><a href="/resources">resources</a></li>
+ <li><a href="/archives">archives</a></li>
<li><a href="/about">about</a></li>
<li><a href="/contact">contact</a></li>
- <li><a href="/archives">archives</a></li>
<li class="nav-badges">
<a href="/feed.xml"><img src="/assets/atom.png"></a>
<a href="https://creativecommons.org/licenses/by-nc-sa/4.0/"><img src="/assets/cc-by-nc-sa-80x15.png"></a>
diff --git a/templates/post.html b/templates/post.html
index 5815e91..b9bbbe0 100644
--- a/templates/post.html
+++ b/templates/post.html
@@ -2,5 +2,38 @@
$if(torrent)$
$partial("templates/load-webtorrent.html")$
$endif$
- $partial("templates/article.html")$
-</main>
+ <article>
+ $if(thumbnail)$
+ <div class="thumbnail" style="height: 30vh;">$thumbnail$</div>
+ $endif$
+ $if(torrent)$
+ $partial("templates/video-player.html")$
+ $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>
+</main> \ No newline at end of file
diff --git a/templates/resource.html b/templates/resource.html
index b93984a..20b9716 100644
--- a/templates/resource.html
+++ b/templates/resource.html
@@ -2,5 +2,37 @@
$if(torrent)$
$partial("templates/load-webtorrent.html")$
$endif$
- $partial("templates/article.html")$
-</main> \ No newline at end of file
+ <article>
+ $if(thumbnail)$
+ <div class="thumbnail" style="height: 30vh;">$thumbnail$</div>
+ $endif$
+ $if(torrent)$
+ $partial("templates/video-player.html")$
+ $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$
+ $if(tags)$
+ <h3 class="tags">$tags$</h3>
+ $endif$
+ </div>
+ </section>
+ <br>
+ <br>
+ <section>
+ $body$
+ </section>
+ </div>
+ </article>
+</main>
diff --git a/templates/resources.html b/templates/resources.html
new file mode 100644
index 0000000..ab8f066
--- /dev/null
+++ b/templates/resources.html
@@ -0,0 +1,25 @@
+<main role="main">
+ <ul class="resource-list">
+ $for(resources)$
+ <li class="panel">
+ $if(thumbnail)$
+ <div class="thumbnail" style="height: 25vh">$thumbnail$</div>
+ $endif$
+ $if(torrent)$
+ $partial("templates/video-player.html")$
+ $endif$
+ <a href="$url$">$title$</a>
+ $if(subtitle)$
+ <div class="thumb-subtitle">
+ $subtitle$
+ </div>
+ $endif$
+ $if(teaser)$
+ <div class="thumb-teaser">
+ $teaser$<a href="$url$">read more...</a>
+ </div>
+ $endif$
+ </li>
+ $endfor$
+ </ul>
+</main> \ No newline at end of file
diff --git a/templates/thumbs.html b/templates/thumbs.html
index cadbbc7..72b2853 100644
--- a/templates/thumbs.html
+++ b/templates/thumbs.html
@@ -32,4 +32,4 @@
$endif$
</div>
$endfor$
-</div>
+</div> \ No newline at end of file