aboutsummaryrefslogtreecommitdiff
path: root/generators/hugo/themes/tdro/layouts
diff options
context:
space:
mode:
authorThedro Neely <thedroneely@gmail.com>2019-05-30 11:56:58 -0400
committerThedro Neely <thedroneely@gmail.com>2019-05-30 11:56:58 -0400
commit218167a5959a4cdf551083a64b28fc29e57a8e4f (patch)
treedf87d85919e2c1924c6b187c49e0fc7ff3befb13 /generators/hugo/themes/tdro/layouts
parentae8c0b1634236a442716a2e191ecab968031dc7b (diff)
downloadthedroneely.com-218167a5959a4cdf551083a64b28fc29e57a8e4f.tar.gz
thedroneely.com-218167a5959a4cdf551083a64b28fc29e57a8e4f.tar.bz2
thedroneely.com-218167a5959a4cdf551083a64b28fc29e57a8e4f.zip
hugo/_default/single.html: Add random related articles to post
Diffstat (limited to 'generators/hugo/themes/tdro/layouts')
-rw-r--r--generators/hugo/themes/tdro/layouts/_default/single.html73
1 files changed, 47 insertions, 26 deletions
diff --git a/generators/hugo/themes/tdro/layouts/_default/single.html b/generators/hugo/themes/tdro/layouts/_default/single.html
index 36d0959..d5ebaa8 100644
--- a/generators/hugo/themes/tdro/layouts/_default/single.html
+++ b/generators/hugo/themes/tdro/layouts/_default/single.html
@@ -6,38 +6,59 @@
<article class="content document">
<h1 class="title serif">{{ .Title }}</h1>
- <p class="subtitle is-6 has-text-grey-dark">
- {{- partial "page-meta.html" . -}}
- <br>
- <script>document.write('<a href="#isso-thread">Comments</a> ·');</script> {{- partial "read-time.html" . -}} · {{ .FuzzyWordCount }} words
- </p>
-
- {{- partial "page-status.html" . -}}
-
- {{- .Content | replaceRE "<p>" "<p class=\"serif is-size-serif\">" | replaceRE "<h2" "<h2 class=\"serif\"" | replaceRE "<h3" "<h3 class=\"serif\"" | safeHTML }}
-
- <div class="has-text-right">
- <p class="article__updated has-text-grey-dark is-inline-block">
- Updated
- {{ if .Params.updated }}
- {{ dateFormat "2 January 2006" .Params.updated }}
- {{ else }}
- {{ dateFormat "2 January 2006" .Params.date }}
- {{ end }}
+ <p class="subtitle is-6 has-text-grey-dark">
+ {{- partial "page-meta.html" . -}}
+ <br>
+ <script>document.write('<a title="Jump to Comments" href="#isso-thread">0 Comments</a>');</script> · {{- partial "read-time.html" . -}} · {{ .FuzzyWordCount }} words
</p>
- </div>
- <script>document.write('<h3 id="comments">Comments</h3>');</script>
+ {{- partial "page-status.html" . -}}
+
+ {{- .Content | replaceRE "<p>" "<p class=\"serif is-size-serif\">" | replaceRE "<h2" "<h2 class=\"serif\"" | replaceRE "<h3" "<h3 class=\"serif\"" | safeHTML }}
+
+
+ <div class="has-text-right">
+ <p class="article__updated has-text-grey-dark is-inline-block">
+ Updated
+ {{ if .Params.updated }}
+ {{ dateFormat "2 January 2006" .Params.updated }}
+ {{ else }}
+ {{ dateFormat "2 January 2006" .Params.date }}
+ {{ end }}
+ </p>
+ </div>
+
+
+ <section>
+ {{ $related := shuffle .Site.RegularPages | first 3 }}
+ {{ with $related }}
+ <h3>Random</h3>
+ <ul>
+ {{ range . }}
+ <li><a href="{{ .RelPermalink }}" title="{{ .Title }}">{{ .Title }}</a></li>
+ {{ end }}
+ </ul>
+ {{ end }}
+ </section>
- </article>
- {{ if .Params.syntax }}
- <link rel="stylesheet" href="/css/syntax-highlight.css">
- {{ end }}
+ {{ if .Params.syntax }}
+ <link rel="stylesheet" href="/css/syntax-highlight.css">
+ {{ end }}
- <script data-isso="/isso/" data-isso-css="false" src="/isso/js/embed.min.js"></script>
- <section id="isso-thread" data-title="{{ .Title }}"></section>
+ <section>
+
+ <script>document.write('<h3 id="comments">Comments</h3>');</script>
+
+ <script data-isso="/isso/" data-isso-css="false" src="/isso/js/embed.min.js"></script>
+
+ <section id="isso-thread" data-title="{{ .Title }}"></section>
+
+ </section>
+
+
+ </article>
</div>
</div>