123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- {{ define "main" }}
- <div class="container" role="main">
- <div class="row">
- <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
- <article role="main" class="blog-post">
- {{ .Content }}
- {{ if .Params.tags }}
- <div class="blog-tags">
- {{ range .Params.tags }}
- <!-- Fix for "https://github.com/halogenica/beautifulhugo/issues/349".
- Inspired by "https://github.com/dovidio/personalwebsite/commit/34762e94c29fd2c26c16c45f8ae2de21bdf9b46d".
- <a href="{{ $.Site.LanguagePrefix | absURL }}/tags/{{ . | urlize }}/">{{ . }}</a>
- -->
- <a href="{{"tags" | absLangURL}}/{{ . | urlize }}/">{{ . }}</a>
- {{ end }}
- </div>
- {{ end }}
- {{ if $.Param "socialShare" }}
- <hr/>
- <section id="social-share">
- <div class="list-inline footer-links">
- {{ partial "share-links" . }}
- </div>
- </section>
- {{ end }}
- {{ if .Site.Params.showRelatedPosts }}
- {{ range first 1 (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
- {{ $.Scratch.Set "has_related" true }}
- {{ end }}
- {{ if $.Scratch.Get "has_related" }}
- <h4 class="see-also">{{ i18n "seeAlso" }}</h4>
- <ul>
- {{ $num_to_show := .Site.Params.related_content_limit | default 5 }}
- {{ range first $num_to_show (where (where .Site.Pages ".Params.tags" "intersect" .Params.tags) "Permalink" "!=" .Permalink) }}
- <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
- {{ end }}
- </ul>
- {{ end }}
- {{ end }}
- </article>
- {{ if ne .Type "page" }}
- <ul class="pager blog-pager">
- {{ if .PrevInSection }}
- <li class="previous">
- <a href="{{ .PrevInSection.Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .PrevInSection.Title }}">← {{ i18n "previousPost" }}</a>
- </li>
- {{ end }}
- {{ if .NextInSection }}
- <li class="next">
- <a href="{{ .NextInSection.Permalink }}" data-toggle="tooltip" data-placement="top" title="{{ .NextInSection.Title }}">{{ i18n "nextPost" }} →</a>
- </li>
- {{ end }}
- </ul>
- {{ end }}
- {{ if (.Params.comments) | or (and (or (not (isset .Params "comments")) (eq .Params.comments nil)) (and .Site.Params.comments (ne .Type "page"))) }}
-
- {{ if .Site.Params.cusdisID }}
- <div id="cusdis_thread"
- data-host="https://cusdis.com"
- data-app-id="{{ .Site.Params.cusdisID }}"
- data-page-id="{{ .Permalink }}"
- data-page-url="{{ .Permalink }}"
- data-page-title="{{ .Title }}"
- data-theme="auto"
- ></div>
- <script async defer src="https://cusdis.com/js/cusdis.es.js"></script>
- {{ end }}
-
- {{ if .Site.Config.Services.Disqus.Shortname }}
- {{ if .Site.Params.delayDisqus }}
- <div class="disqus-comments">
- <button id="show-comments" class="btn btn-default" type="button">{{ i18n "show" }} <span class="disqus-comment-count" data-disqus-url="{{ trim .Permalink "/" }}">{{ i18n "comments" }}</span></button>
- <div id="disqus_thread"></div>
- <script type="text/javascript">
- var disqus_config = function () {
- this.page.url = '{{ trim .Permalink "/" }}';
- };
- </script>
- </div>
- {{ else }}
- {{ end }}
- {{ end }}
- {{ if .Site.Params.staticman }}
- <div class="staticman-comments">
- {{ partial "staticman-comments.html" . }}
- </div>
- {{ end }}
- {{ end }}
- </div>
- </div>
- </div>
- {{ end }}
|