diff options
Diffstat (limited to 'themes/hugo-coder/layouts/partials')
25 files changed, 383 insertions, 0 deletions
diff --git a/themes/hugo-coder b/themes/hugo-coder deleted file mode 160000 | |||
Subproject 55b2a150f990bc56364dba347bc9acc6aab07be | |||
diff --git a/themes/hugo-coder/layouts/partials/404.html b/themes/hugo-coder/layouts/partials/404.html new file mode 100644 index 0000000..a884c68 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/404.html | |||
@@ -0,0 +1,7 @@ | |||
1 | <section class="container centered"> | ||
2 | <div class="error"> | ||
3 | <h1>404</h1> | ||
4 | <h2>{{ i18n "page_not_found" }}</h2> | ||
5 | <p>{{ i18n "page_does_not_exist" }}<br />{{ i18n "head_back" .Site.BaseURL | safeHTML }}</p> | ||
6 | </div> | ||
7 | </section> | ||
diff --git a/themes/hugo-coder/layouts/partials/analytics/cloudflare.html b/themes/hugo-coder/layouts/partials/analytics/cloudflare.html new file mode 100644 index 0000000..d8a732f --- /dev/null +++ b/themes/hugo-coder/layouts/partials/analytics/cloudflare.html | |||
@@ -0,0 +1,4 @@ | |||
1 | <!-- Cloudflare Web Analytics --> | ||
2 | <script defer src='https://static.cloudflareinsights.com/beacon.min.js' | ||
3 | data-cf-beacon='{"token": "{{ $.Site.Params.cloudflare.token }}"}'></script> | ||
4 | <!-- End Cloudflare Web Analytics --> | ||
diff --git a/themes/hugo-coder/layouts/partials/analytics/fathom.html b/themes/hugo-coder/layouts/partials/analytics/fathom.html new file mode 100644 index 0000000..13e7cfc --- /dev/null +++ b/themes/hugo-coder/layouts/partials/analytics/fathom.html | |||
@@ -0,0 +1,13 @@ | |||
1 | <script> | ||
2 | (function(f, a, t, h, o, m){ | ||
3 | a[h]=a[h]||function(){ | ||
4 | (a[h].q=a[h].q||[]).push(arguments) | ||
5 | }; | ||
6 | o=f.createElement('script'), | ||
7 | m=f.getElementsByTagName('script')[0]; | ||
8 | o.async=1; o.src=t; o.id='fathom-script'; | ||
9 | m.parentNode.insertBefore(o,m) | ||
10 | })(document, window, '//{{ .Site.Params.fathomAnalytics.serverURL | default "cdn.usefathom.com" }}/tracker.js', 'fathom'); | ||
11 | fathom('set', 'siteId', '{{ .Site.Params.fathomAnalytics.siteID }}'); | ||
12 | fathom('trackPageview'); | ||
13 | </script> | ||
diff --git a/themes/hugo-coder/layouts/partials/analytics/goatcounter.html b/themes/hugo-coder/layouts/partials/analytics/goatcounter.html new file mode 100644 index 0000000..5ba3063 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/analytics/goatcounter.html | |||
@@ -0,0 +1,2 @@ | |||
1 | <script data-goatcounter="https://{{ $.Site.Params.goatCounter.code }}.goatcounter.com/count" | ||
2 | async src="//gc.zgo.at/count.js"></script> | ||
diff --git a/themes/hugo-coder/layouts/partials/analytics/googletagmanager.html b/themes/hugo-coder/layouts/partials/analytics/googletagmanager.html new file mode 100644 index 0000000..2d2581d --- /dev/null +++ b/themes/hugo-coder/layouts/partials/analytics/googletagmanager.html | |||
@@ -0,0 +1,9 @@ | |||
1 | <!-- Global site tag (gtag.js) - Google Analytics --> | ||
2 | <script async src="https://www.googletagmanager.com/gtag/js?id={{ $.Site.Params.googleTagManager.id }}"></script> | ||
3 | <script> | ||
4 | window.dataLayer = window.dataLayer || []; | ||
5 | function gtag(){dataLayer.push(arguments);} | ||
6 | gtag('js', new Date()); | ||
7 | |||
8 | gtag('config', '{{ $.Site.Params.googleTagManager.id }}'); | ||
9 | </script> | ||
diff --git a/themes/hugo-coder/layouts/partials/analytics/matomo.html b/themes/hugo-coder/layouts/partials/analytics/matomo.html new file mode 100644 index 0000000..8fabb63 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/analytics/matomo.html | |||
@@ -0,0 +1,13 @@ | |||
1 | <script type="application/javascript"> | ||
2 | var _paq = window._paq = window._paq || []; | ||
3 | /* tracker methods like "setCustomDimension" should be called before "trackPageView" */ | ||
4 | _paq.push(['trackPageView']); | ||
5 | _paq.push(['enableLinkTracking']); | ||
6 | (function() { | ||
7 | var u="https://{{ $.Site.Params.matomo.serverURL }}/"; | ||
8 | _paq.push(['setTrackerUrl', u+'matomo.php']); | ||
9 | _paq.push(['setSiteId', '{{ $.Site.Params.matomo.siteID | default "1" }}']); | ||
10 | var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; | ||
11 | g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s); | ||
12 | })(); | ||
13 | </script> | ||
diff --git a/themes/hugo-coder/layouts/partials/analytics/plausible.html b/themes/hugo-coder/layouts/partials/analytics/plausible.html new file mode 100644 index 0000000..8999972 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/analytics/plausible.html | |||
@@ -0,0 +1 @@ | |||
<script async defer data-domain="{{ .Site.Params.plausibleAnalytics.domain }}" src="https://{{ .Site.Params.plausibleAnalytics.serverURL | default "plausible.io" }}/js/plausible.js"></script> | |||
diff --git a/themes/hugo-coder/layouts/partials/csp.html b/themes/hugo-coder/layouts/partials/csp.html new file mode 100644 index 0000000..e9238a4 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/csp.html | |||
@@ -0,0 +1 @@ | |||
{{ printf `<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests; block-all-mixed-content; default-src 'self'; child-src %s; font-src %s; form-action %s; frame-src %s; img-src %s; object-src %s; style-src %s; script-src %s; prefetch-src %s; connect-src %s;">` (delimit .Site.Params.csp.childsrc " ") (delimit .Site.Params.csp.fontsrc " ") (delimit .Site.Params.csp.formaction " ") (delimit .Site.Params.csp.framesrc " ") (delimit .Site.Params.csp.imgsrc " ") (delimit .Site.Params.csp.objectsrc " ") (delimit .Site.Params.csp.stylesrc " ") (delimit .Site.Params.csp.scriptsrc " ") (delimit .Site.Params.csp.prefetchsrc " ") (delimit .Site.Params.csp.connectsrc " ") | safeHTML }} | |||
diff --git a/themes/hugo-coder/layouts/partials/float.html b/themes/hugo-coder/layouts/partials/float.html new file mode 100644 index 0000000..623047d --- /dev/null +++ b/themes/hugo-coder/layouts/partials/float.html | |||
@@ -0,0 +1,7 @@ | |||
1 | {{ if not .Site.Params.hideColorSchemeToggle }} | ||
2 | <div class="float-container"> | ||
3 | <a id="dark-mode-toggle" class="colorscheme-toggle"> | ||
4 | <i class="fa fa-adjust fa-fw" aria-hidden="true"></i> | ||
5 | </a> | ||
6 | </div> | ||
7 | {{ end }} | ||
diff --git a/themes/hugo-coder/layouts/partials/footer.html b/themes/hugo-coder/layouts/partials/footer.html new file mode 100644 index 0000000..c184381 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/footer.html | |||
@@ -0,0 +1,26 @@ | |||
1 | {{ if not .Site.Params.hideFooter | default false }} | ||
2 | <footer class="footer"> | ||
3 | <section class="container"> | ||
4 | {{ with .Site.Params.footerContent | safeHTML }} | ||
5 | <p>{{ . }}</p> | ||
6 | {{ end }} | ||
7 | {{ if not .Site.Params.hideCopyright }} | ||
8 | © | ||
9 | {{ if (and (.Site.Params.since) (lt .Site.Params.since now.Year)) }} | ||
10 | {{ .Site.Params.since }} - | ||
11 | {{ end }} | ||
12 | {{ now.Year }} | ||
13 | {{ with .Site.Params.author }} {{ . }} {{ end }} | ||
14 | {{ end }} | ||
15 | {{ if not .Site.Params.hideCredits }} | ||
16 | {{ if not .Site.Params.hideCopyright }} · {{ end }} | ||
17 | {{ i18n "powered_by" }} <a href="https://gohugo.io/">Hugo</a> & <a href="https://github.com/luizdepra/hugo-coder/">Coder</a>. | ||
18 | {{ end }} | ||
19 | {{ if .Site.Params.commit }} | ||
20 | {{ if .GitInfo }} | ||
21 | [<a href="{{ .Site.Params.commit }}/{{ .GitInfo.Hash }}">{{ .GitInfo.AbbreviatedHash }}</a>] | ||
22 | {{ end }} | ||
23 | {{ end }} | ||
24 | </section> | ||
25 | </footer> | ||
26 | {{ end }} | ||
diff --git a/themes/hugo-coder/layouts/partials/header.html b/themes/hugo-coder/layouts/partials/header.html new file mode 100644 index 0000000..4b7924e --- /dev/null +++ b/themes/hugo-coder/layouts/partials/header.html | |||
@@ -0,0 +1,39 @@ | |||
1 | <nav class="navigation"> | ||
2 | <section class="container"> | ||
3 | <a class="navigation-title" href="{{ .Site.BaseURL | relLangURL }}"> | ||
4 | {{ .Site.Title }} | ||
5 | </a> | ||
6 | {{ if or .Site.Menus.main .Site.IsMultiLingual }} | ||
7 | <input type="checkbox" id="menu-toggle" /> | ||
8 | <label class="menu-button float-right" for="menu-toggle"> | ||
9 | <i class="fa fa-bars fa-fw" aria-hidden="true"></i> | ||
10 | </label> | ||
11 | <ul class="navigation-list"> | ||
12 | {{ with .Site.Menus.main}} | ||
13 | {{ range sort . }} | ||
14 | <li class="navigation-item"> | ||
15 | <a class="navigation-link" href="{{ .URL | relLangURL }}">{{ .Name }}</a> | ||
16 | </li> | ||
17 | {{ end }} | ||
18 | {{ end }} | ||
19 | {{ if .Site.IsMultiLingual }} | ||
20 | {{ $node := . }} | ||
21 | {{ .Scratch.Set "separator" true }} | ||
22 | {{ range (default .Site.Home.AllTranslations .Translations) }} | ||
23 | {{ if ne $.Site.Language .Language }} | ||
24 | {{ if $node.Scratch.Get "separator" }} | ||
25 | <li class="navigation-item menu-separator"> | ||
26 | <span>|</span> | ||
27 | </li> | ||
28 | {{ $node.Scratch.Set "separator" false }} | ||
29 | {{ end }} | ||
30 | <li class="navigation-item"> | ||
31 | <a href="{{ .Permalink }}">{{ .Language.LanguageName | emojify }}</a> | ||
32 | </li> | ||
33 | {{ end }} | ||
34 | {{ end }} | ||
35 | {{ end }} | ||
36 | </ul> | ||
37 | {{ end }} | ||
38 | </section> | ||
39 | </nav> | ||
diff --git a/themes/hugo-coder/layouts/partials/home.html b/themes/hugo-coder/layouts/partials/home.html new file mode 100644 index 0000000..ff640dd --- /dev/null +++ b/themes/hugo-coder/layouts/partials/home.html | |||
@@ -0,0 +1,35 @@ | |||
1 | <section class="container centered"> | ||
2 | <div class="about"> | ||
3 | {{ if and (isset .Site.Params "avatarurl") (not (isset .Site.Params "gravatar")) }} | ||
4 | {{ with .Site.Params.avatarURL }} | ||
5 | <div class="avatar"><img src="{{ . | relURL }}" alt="avatar"></div> | ||
6 | {{ end }} | ||
7 | {{ end }} | ||
8 | {{ with .Site.Params.gravatar }} | ||
9 | <div class="avatar"><img src="https://www.gravatar.com/avatar/{{md5 .}}?s=240&d=mp" alt="gravatar"></div> | ||
10 | {{ end }} | ||
11 | <h1>{{ .Site.Params.author }}</h1> | ||
12 | {{ if reflect.IsSlice .Site.Params.info }} | ||
13 | <h2>{{ range .Site.Params.info }}{{.}}<br>{{ end}}</h2> | ||
14 | {{ else }} | ||
15 | <h2>{{ .Site.Params.info }}</h2> | ||
16 | {{ end }} | ||
17 | {{ with .Site.Params.social }} | ||
18 | <ul> | ||
19 | {{ range sort . "weight" }} | ||
20 | {{ if .icon }} | ||
21 | <li> | ||
22 | <a href="{{ .url | safeURL }}" aria-label="{{ .name }}" {{ if .rel }}rel="{{ .rel }}"{{ end }} {{ if .target }}target="{{ .target }}"{{ end }} {{ if .type }}type="{{ .type }}"{{ end }}> | ||
23 | <i class="{{ .icon }}" aria-hidden="true"></i> | ||
24 | </a> | ||
25 | </li> | ||
26 | {{ else }} | ||
27 | <li> | ||
28 | <a href="{{ .url | safeURL }}" aria-label="{{ .name }}" {{ if .rel }}rel="{{ .rel }}"{{ end }} {{ if .target }}target="{{ .target }}"{{ end }}>{{ .name }}</a> | ||
29 | </li> | ||
30 | {{ end }} | ||
31 | {{ end }} | ||
32 | </ul> | ||
33 | {{ end }} | ||
34 | </div> | ||
35 | </section> | ||
diff --git a/themes/hugo-coder/layouts/partials/list.html b/themes/hugo-coder/layouts/partials/list.html new file mode 100644 index 0000000..243e1af --- /dev/null +++ b/themes/hugo-coder/layouts/partials/list.html | |||
@@ -0,0 +1,22 @@ | |||
1 | <section class="container list"> | ||
2 | <h1 class="title"> | ||
3 | <a class="title-link" href="{{ .Permalink | safeURL }}"> | ||
4 | {{- if eq .Kind "term" -}} | ||
5 | {{- i18n .Data.Singular | title -}} | ||
6 | {{- print ": " -}} | ||
7 | {{- end -}} | ||
8 | |||
9 | {{- i18n (lower .Title) | default .Title | title -}} | ||
10 | </a> | ||
11 | </h1> | ||
12 | {{ .Content }} | ||
13 | <ul> | ||
14 | {{ range .Paginator.Pages }} | ||
15 | <li> | ||
16 | <span class="date">{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}</span> | ||
17 | <a class="title" href="{{ .Params.externalLink | default .RelPermalink }}">{{ .Title }}</a> | ||
18 | </li> | ||
19 | {{ end }} | ||
20 | </ul> | ||
21 | {{ partial "pagination.html" . }} | ||
22 | </section> | ||
diff --git a/themes/hugo-coder/layouts/partials/page.html b/themes/hugo-coder/layouts/partials/page.html new file mode 100644 index 0000000..656f2f1 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/page.html | |||
@@ -0,0 +1,13 @@ | |||
1 | <section class="container page"> | ||
2 | <article> | ||
3 | <header> | ||
4 | <h1 class="title"> | ||
5 | <a class="title-link" href="{{ .Permalink | safeURL }}"> | ||
6 | {{ .Title }} | ||
7 | </a> | ||
8 | </h1> | ||
9 | </header> | ||
10 | |||
11 | {{ .Content }} | ||
12 | </article> | ||
13 | </section> | ||
diff --git a/themes/hugo-coder/layouts/partials/pagination.html b/themes/hugo-coder/layouts/partials/pagination.html new file mode 100644 index 0000000..1e004b8 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/pagination.html | |||
@@ -0,0 +1,48 @@ | |||
1 | {{ $paginator := .Paginator }} | ||
2 | {{ $adjacent_links := 2 }} | ||
3 | {{ $max_links := (add (mul $adjacent_links 2) 1) }} | ||
4 | {{ $lower_limit := (add $adjacent_links 1) }} | ||
5 | {{ $upper_limit := (sub $paginator.TotalPages $adjacent_links) }} | ||
6 | {{ if gt $paginator.TotalPages 1 }} | ||
7 | <ul class="pagination"> | ||
8 | {{ if $paginator.HasPrev }} | ||
9 | {{ if ne $paginator.PageNumber 1 }} | ||
10 | <li><a href="{{ $paginator.First.URL }}">«</a></li> | ||
11 | {{ end }} | ||
12 | <li class="hidden"><a href="{{ $paginator.Prev.URL }}">‹</a></li> | ||
13 | {{ end }} | ||
14 | {{ range $paginator.Pagers }} | ||
15 | {{ $.Scratch.Set "page_number_flag" false }} | ||
16 | {{ if gt $paginator.TotalPages $max_links }} | ||
17 | {{ if le $paginator.PageNumber $lower_limit }} | ||
18 | {{ if le .PageNumber $max_links }} | ||
19 | {{ $.Scratch.Set "page_number_flag" true }} | ||
20 | {{ end }} | ||
21 | {{ else if ge $paginator.PageNumber $upper_limit }} | ||
22 | {{ if gt .PageNumber (sub $paginator.TotalPages $max_links) }} | ||
23 | {{ $.Scratch.Set "page_number_flag" true }} | ||
24 | {{ end }} | ||
25 | {{ else }} | ||
26 | {{ if and ( ge .PageNumber (sub $paginator.PageNumber $adjacent_links) ) ( le .PageNumber (add $paginator.PageNumber $adjacent_links) ) }} | ||
27 | {{ $.Scratch.Set "page_number_flag" true }} | ||
28 | {{ end }} | ||
29 | {{ end }} | ||
30 | {{ else }} | ||
31 | {{ $.Scratch.Set "page_number_flag" true }} | ||
32 | {{ end }} | ||
33 | {{ if eq ($.Scratch.Get "page_number_flag") true }} | ||
34 | {{ if eq . $paginator }} | ||
35 | <li>{{ .PageNumber }}</li> | ||
36 | {{ else }} | ||
37 | <li><a href="{{ .URL }}">{{ .PageNumber }}</a></li> | ||
38 | {{ end }} | ||
39 | {{ end }} | ||
40 | {{ end }} | ||
41 | {{ if $paginator.HasNext }} | ||
42 | <li class="hidden"><a href="{{ $paginator.Next.URL }}">›</a></li> | ||
43 | {{ if ne $paginator.PageNumber $paginator.TotalPages }} | ||
44 | <li><a href="{{ $paginator.Last.URL }}">»</a></li> | ||
45 | {{ end }} | ||
46 | {{ end }} | ||
47 | </ul> | ||
48 | {{ end }} | ||
diff --git a/themes/hugo-coder/layouts/partials/posts/commento.html b/themes/hugo-coder/layouts/partials/posts/commento.html new file mode 100644 index 0000000..93a245e --- /dev/null +++ b/themes/hugo-coder/layouts/partials/posts/commento.html | |||
@@ -0,0 +1,4 @@ | |||
1 | {{- if and (isset .Site.Params "commentourl") (not (eq .Site.Params.commentoURL "" )) (eq (.Params.disableComments | default false) false) -}} | ||
2 | <div id="commento"></div> | ||
3 | <script src="{{ .Site.Params.commentoURL }}/js/commento.js"></script> | ||
4 | {{- end -}} | ||
diff --git a/themes/hugo-coder/layouts/partials/posts/disqus.html b/themes/hugo-coder/layouts/partials/posts/disqus.html new file mode 100644 index 0000000..b0ffb1f --- /dev/null +++ b/themes/hugo-coder/layouts/partials/posts/disqus.html | |||
@@ -0,0 +1,3 @@ | |||
1 | {{- if and (not (eq (.Site.DisqusShortname | default "") "")) (eq (.Params.disableComments | default false) false) -}} | ||
2 | {{ template "_internal/disqus.html" . }} | ||
3 | {{- end -}} | ||
diff --git a/themes/hugo-coder/layouts/partials/posts/math.html b/themes/hugo-coder/layouts/partials/posts/math.html new file mode 100644 index 0000000..bc39ce5 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/posts/math.html | |||
@@ -0,0 +1,38 @@ | |||
1 | {{- if or (.Params.math) (.Site.Params.math) -}} | ||
2 | <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script> | ||
3 | {{/* The file is already minified */}} | ||
4 | <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script> | ||
5 | <script> | ||
6 | MathJax = { | ||
7 | tex: { | ||
8 | inlineMath: [ | ||
9 | ['$', '$'], ['\\(', '\\)'] | ||
10 | ], | ||
11 | processEscapes: true, | ||
12 | processEnvironments: true | ||
13 | }, | ||
14 | options: { | ||
15 | skipHtmlTags: ['script', 'noscript', 'style', 'textarea', 'pre'] | ||
16 | } | ||
17 | }; | ||
18 | </script> | ||
19 | {{- end -}} | ||
20 | {{- if or (.Params.katex) (.Site.Params.katex) -}} | ||
21 | <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.css" | ||
22 | integrity="sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc" crossorigin="anonymous"> | ||
23 | {{/* The loading of KaTeX is deferred to speed up page rendering */}} | ||
24 | <script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/katex.min.js" | ||
25 | integrity="sha384-YNHdsYkH6gMx9y3mRkmcJ2mFUjTd0qNQQvY9VYZgQd7DcN7env35GzlmFaZ23JGp" crossorigin="anonymous"></script> | ||
26 | <script defer src="https://cdn.jsdelivr.net/npm/katex@0.13.11/dist/contrib/auto-render.min.js" | ||
27 | integrity="sha384-vZTG03m+2yp6N6BNi5iM4rW4oIwk5DfcNdFfxkk9ZWpDriOkXX8voJBFrAO7MpVl" crossorigin="anonymous" | ||
28 | onload="renderMathInElement(document.body, | ||
29 | { | ||
30 | delimiters: [ | ||
31 | {left: '$$', right: '$$', display:true}, | ||
32 | {left: '$', right: '$', display:false}, | ||
33 | {left: '\\(', right: '\\)', display: false}, | ||
34 | {left: '\\[', right: '\\]', display: true} | ||
35 | ] | ||
36 | } | ||
37 | );"></script> | ||
38 | {{- end -}} | ||
diff --git a/themes/hugo-coder/layouts/partials/posts/series.html b/themes/hugo-coder/layouts/partials/posts/series.html new file mode 100644 index 0000000..d08a83d --- /dev/null +++ b/themes/hugo-coder/layouts/partials/posts/series.html | |||
@@ -0,0 +1,29 @@ | |||
1 | {{ $currentPageUrl := .RelPermalink }} | ||
2 | {{ if .Params.series }} | ||
3 | <section class="see-also"> | ||
4 | {{ range .Params.series }} | ||
5 | {{ $name := . | urlize }} | ||
6 | {{ $series := index $.Site.Taxonomies.series $name }} | ||
7 | {{ if gt (len $series.Pages) 1 }} | ||
8 | <h3 id="{{ i18n "see_also" | default "See also in" | anchorize }}-{{ anchorize . | safeURL }}"> | ||
9 | {{ i18n "see_also" | default "See also in" }} {{ . }} | ||
10 | <a class="heading-link" href="#{{ i18n "see_also" | default "See also in" | anchorize }}-{{ anchorize . | safeURL }}"> | ||
11 | <i class="fa fa-link" aria-hidden="true"></i> | ||
12 | </a> | ||
13 | </h3> | ||
14 | <nav> | ||
15 | <ul> | ||
16 | {{ $maxItems := $.Site.Params.maxSeeAlsoItems | default 5 }} | ||
17 | {{ range first (add $maxItems 1) $series.Pages }} | ||
18 | {{ if ne .RelPermalink $currentPageUrl }} | ||
19 | <li> | ||
20 | <a href="{{ .Params.externalLink | default .RelPermalink }}">{{ .Title }}</a> | ||
21 | </li> | ||
22 | {{ end }} | ||
23 | {{ end }} | ||
24 | </ul> | ||
25 | </nav> | ||
26 | {{ end }} | ||
27 | {{ end }} | ||
28 | </section> | ||
29 | {{ end }} | ||
diff --git a/themes/hugo-coder/layouts/partials/posts/utterances.html b/themes/hugo-coder/layouts/partials/posts/utterances.html new file mode 100644 index 0000000..0feea41 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/posts/utterances.html | |||
@@ -0,0 +1,12 @@ | |||
1 | {{- if isset .Site.Params "utterances" -}} | ||
2 | {{- if and (isset .Site.Params.utterances "repo") (not (eq .Site.Params.utterances.repo "" )) (eq (.Params.disable_comments | default false) false) -}} | ||
3 | <script src="https://utteranc.es/client.js" | ||
4 | repo= "{{ .Site.Params.utterances.repo }}" | ||
5 | issue-term="{{ default "title" .Site.Params.utterances.issueTerm }}" | ||
6 | {{ if isset .Site.Params.utterances "label" }}label="{{ .Site.Params.utterances.label }}"{{ end }} | ||
7 | theme="{{ default "github-light" .Site.Params.utterances.theme }}" | ||
8 | crossorigin="anonymous" | ||
9 | async> | ||
10 | </script> | ||
11 | {{- end -}} | ||
12 | {{- end -}} | ||
diff --git a/themes/hugo-coder/layouts/partials/taxonomy/authors.html b/themes/hugo-coder/layouts/partials/taxonomy/authors.html new file mode 100644 index 0000000..366d8d8 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/taxonomy/authors.html | |||
@@ -0,0 +1,9 @@ | |||
1 | <div class="authors"> | ||
2 | <i class="fa fa-user" aria-hidden="true"></i> | ||
3 | {{- range $index, $el := . -}} | ||
4 | {{- if gt $index 0 }} | ||
5 | <span class="separator">•</span> | ||
6 | {{- end }} | ||
7 | <a href="{{ ( printf "authors/%s/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a> | ||
8 | {{- end -}} | ||
9 | </div> \ No newline at end of file | ||
diff --git a/themes/hugo-coder/layouts/partials/taxonomy/categories.html b/themes/hugo-coder/layouts/partials/taxonomy/categories.html new file mode 100644 index 0000000..b592f4e --- /dev/null +++ b/themes/hugo-coder/layouts/partials/taxonomy/categories.html | |||
@@ -0,0 +1,9 @@ | |||
1 | <div class="categories"> | ||
2 | <i class="fa fa-folder" aria-hidden="true"></i> | ||
3 | {{- range $index, $el := . -}} | ||
4 | {{- if gt $index 0 }} | ||
5 | <span class="separator">•</span> | ||
6 | {{- end }} | ||
7 | <a href="{{ ( printf "categories/%s/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a> | ||
8 | {{- end -}} | ||
9 | </div> | ||
diff --git a/themes/hugo-coder/layouts/partials/taxonomy/tags.html b/themes/hugo-coder/layouts/partials/taxonomy/tags.html new file mode 100644 index 0000000..1be1ec0 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/taxonomy/tags.html | |||
@@ -0,0 +1,11 @@ | |||
1 | <div class="tags"> | ||
2 | <i class="fa fa-tag" aria-hidden="true"></i> | ||
3 | {{- range $index, $el := . -}} | ||
4 | {{- if gt $index 0 }} | ||
5 | <span class="separator">•</span> | ||
6 | {{- end }} | ||
7 | <span class="tag"> | ||
8 | <a href="{{ ( printf "tags/%s/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a> | ||
9 | </span> | ||
10 | {{- end -}} | ||
11 | </div> | ||
diff --git a/themes/hugo-coder/layouts/partials/terms.html b/themes/hugo-coder/layouts/partials/terms.html new file mode 100644 index 0000000..7d51e57 --- /dev/null +++ b/themes/hugo-coder/layouts/partials/terms.html | |||
@@ -0,0 +1,28 @@ | |||
1 | <section class="container taxonomy"> | ||
2 | <h1 class="title"> | ||
3 | <a class="title-link" href="{{ .Permalink | safeURL }}"> | ||
4 | {{- if eq .Kind "term" -}} | ||
5 | {{- i18n .Data.Singular | title -}} | ||
6 | {{- print ": " -}} | ||
7 | {{- end -}} | ||
8 | |||
9 | {{- i18n (lower .Title) | default .Title | title -}} | ||
10 | </a> | ||
11 | </h1> | ||
12 | {{ .Content }} | ||
13 | <ul> | ||
14 | {{ $type := .Type }} | ||
15 | {{ range $key, $value := .Data.Terms.Alphabetical }} | ||
16 | {{ $name := .Name }} | ||
17 | {{ $count := .Count }} | ||
18 | {{ with $.Site.GetPage (printf "/%s/%s" $type $name) }} | ||
19 | <li> | ||
20 | <span class="taxonomy-element"> | ||
21 | <a href="{{ .Permalink }}">{{ .Name }}</a> | ||
22 | <sup>{{ $count }}</sup> | ||
23 | </span> | ||
24 | </li> | ||
25 | {{ end }} | ||
26 | {{ end }} | ||
27 | </ul> | ||
28 | </section> | ||