initial
This commit is contained in:
35
blog/layouts/_default/single.html
Normal file
35
blog/layouts/_default/single.html
Normal file
@@ -0,0 +1,35 @@
|
||||
{{ define "main" }}
|
||||
{{ if .Menus }}
|
||||
<nav class="post-navigation">
|
||||
{{ range .Menus }}
|
||||
<a href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a>
|
||||
{{ end }}
|
||||
</nav>
|
||||
{{ end }}
|
||||
|
||||
<article class="post h-entry">
|
||||
<header class="post-header">
|
||||
<h1 class="p-name post-title{{ if .Params.favorite }} favorite{{end}}{{ if .Params.draft }} draft{{end}}">{{ trim .Title " " }}</h1>
|
||||
|
||||
{{ partial "post-language-switcher.html" . }}
|
||||
</header>
|
||||
{{ partial "post-toc.html" . }}
|
||||
<div class="content e-content">
|
||||
{{ .Content }}
|
||||
</div>
|
||||
{{ partial "post-info.html" . }}
|
||||
</article>
|
||||
|
||||
{{ if and (.Site.Params.paginationSinglePost) (ne .Type "page") }}
|
||||
{{ partial "post-pagination.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.DisqusShortname }}
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ if .Site.Params.UtterancesRepo }}
|
||||
{{ partial "utterances.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
||||
11
blog/layouts/partials/footer-comment.html
Normal file
11
blog/layouts/partials/footer-comment.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<div id="remark42"></div>
|
||||
<script>
|
||||
var remark_config = {
|
||||
host: "//comment-"+window.location.hostname,
|
||||
site_id: 'remark',
|
||||
components: ['embed'], // last-comments, counter
|
||||
show_email_subscription: false,
|
||||
simple_view: true,
|
||||
};
|
||||
</script>
|
||||
<script>!function(e,n){for(var o=0;o<e.length;o++){var r=n.createElement("script"),c=".js",d=n.head||n.body;"noModule"in r?(r.type="module",c=".mjs"):r.async=!0,r.defer=!0,r.src=remark_config.host+"/web/"+e[o]+c,d.appendChild(r)}}(remark_config.components||["embed"],document);</script>
|
||||
31
blog/layouts/partials/footer.html
Normal file
31
blog/layouts/partials/footer.html
Normal file
@@ -0,0 +1,31 @@
|
||||
{{ if .IsPage }}
|
||||
<footer class="common-footer">
|
||||
{{ partial "footer-comment.html" . }}
|
||||
</footer>
|
||||
{{ end }}
|
||||
<footer class="common-footer">
|
||||
{{ $languagesCount := $.Site.Home.AllTranslations }}
|
||||
{{ if gt $languagesCount 1 }}
|
||||
{{ partial "language-switcher.html" . }}
|
||||
{{ end }}
|
||||
|
||||
<div class="common-footer-bottom">
|
||||
{{ if .Site.Menus.footer }}
|
||||
{{ $currentPage := . }}
|
||||
<ul class="footer-menu">
|
||||
{{ range .Site.Menus.footer }}
|
||||
<li><a class="{{if or ($currentPage.IsMenuCurrent "footer" .) ($currentPage.HasMenuCurrent "footer" .) }} active{{end}}" href="{{ .URL | absLangURL }}" title="{{ .Title }}">{{ .Name }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
<div class="copyright">
|
||||
<p>© {{ if isset .Site.Params "author"}}{{ .Site.Params.author }}, {{end}}{{ now.Year }}<br>
|
||||
{{ i18n "powered" | humanize }} <a target="_blank" rel="noopener noreferrer" href="https://gohugo.io/">Hugo</a>, {{ i18n "theme" }} <a target="_blank" rel="noopener noreferrer" href="https://github.com/mitrichius/hugo-theme-anubis">Anubis</a>.<br>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{{ partial "theme-switcher.html" . }}
|
||||
</div>
|
||||
|
||||
{{ partial "h-card.html" . }}
|
||||
</footer>
|
||||
5
blog/layouts/partials/post-toc.html
Normal file
5
blog/layouts/partials/post-toc.html
Normal file
@@ -0,0 +1,5 @@
|
||||
{{ if gt .WordCount 500 }}
|
||||
<aside>
|
||||
{{ .TableOfContents }}
|
||||
</aside>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user