Merge commit 'bfb1829a86a2bc1b595dad52a9d6dcfe80dd0679' as 'themes/codex'
This commit is contained in:
2
themes/codex/layouts/partials/anchored-headings.html
Normal file
2
themes/codex/layouts/partials/anchored-headings.html
Normal file
@@ -0,0 +1,2 @@
|
||||
<!-- formats .Content headings by adding an anchor -->
|
||||
{{ . | replaceRE "(<h[2-3] id=\"([^\"]+)\".+)(</h[2-9]+>)" "${1}<a class=\"anchor\" href=\"#${2}\">#</a>${3}" | safeHTML }}
|
||||
7
themes/codex/layouts/partials/browse-by-tag.html
Normal file
7
themes/codex/layouts/partials/browse-by-tag.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<ul class="tags__list">
|
||||
{{ range $tag, $value := $.Site.Taxonomies.tags }}
|
||||
<li class="tag__item">
|
||||
<a class="tag__link" href="{{ "/tags/" | relLangURL}}{{ $tag | urlize }}/">{{ $tag | urlize }} ({{ len $value }})</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
7
themes/codex/layouts/partials/burger.html
Normal file
7
themes/codex/layouts/partials/burger.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<div class="burger__container">
|
||||
<div class="burger" aria-controls="navigation" aria-label="Menu">
|
||||
<div class="burger__meat burger__meat--1"></div>
|
||||
<div class="burger__meat burger__meat--2"></div>
|
||||
<div class="burger__meat burger__meat--3"></div>
|
||||
</div>
|
||||
</div>
|
||||
1
themes/codex/layouts/partials/favicon.html
Normal file
1
themes/codex/layouts/partials/favicon.html
Normal file
@@ -0,0 +1 @@
|
||||
<link rel="shortcut icon" type="image/png" href="/favicon.ico" />
|
||||
11
themes/codex/layouts/partials/math.html
Normal file
11
themes/codex/layouts/partials/math.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<!-- layouts/partials/math.html -->
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_SVG"></script>
|
||||
<script type="text/x-mathjax-config">
|
||||
MathJax.Hub.Config({
|
||||
showMathMenu: false, //disables context menu
|
||||
tex2jax: {
|
||||
inlineMath: [ ['$','$'], ['\\(','\\)'] ]
|
||||
}
|
||||
});
|
||||
</script>
|
||||
11
themes/codex/layouts/partials/nav.html
Normal file
11
themes/codex/layouts/partials/nav.html
Normal file
@@ -0,0 +1,11 @@
|
||||
<nav class="nav" id="navigation">
|
||||
<ul class="nav__list">
|
||||
{{ $currentPage := . }}
|
||||
{{ range .Site.Menus.main }}
|
||||
<li>
|
||||
<a {{ if or ($currentPage.IsMenuCurrent "main" .) (eq $currentPage.Section .Identifier) }} class="active"
|
||||
{{end}} href="{{ .URL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
7
themes/codex/layouts/partials/pagination.html
Normal file
7
themes/codex/layouts/partials/pagination.html
Normal file
@@ -0,0 +1,7 @@
|
||||
<div class="paginator-container">
|
||||
{{ if .Paginator.HasPrev }}
|
||||
<a class="paginator paginator--left" href="{{ .Paginator.Prev.URL }}"></a>
|
||||
{{ end }} {{ if .Paginator.HasNext }}
|
||||
<a class="paginator paginator--right" href="{{ .Paginator.Next.URL }}"></a>
|
||||
{{ end }}
|
||||
</div>
|
||||
15
themes/codex/layouts/partials/post-pagination.html
Normal file
15
themes/codex/layouts/partials/post-pagination.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<div class="pagination">
|
||||
{{if .PrevInSection}}
|
||||
<a class="pagination__item" href="{{.PrevInSection.Permalink}}">
|
||||
<span class="pagination__label">Previous Post</span>
|
||||
<span class="pagination__title">{{.PrevInSection.Title}}</span>
|
||||
</a>
|
||||
{{end}}
|
||||
|
||||
{{if .NextInSection}}
|
||||
<a class="pagination__item" href="{{.NextInSection.Permalink}}">
|
||||
<span class="pagination__label">Next Post</span>
|
||||
<span class="pagination__title" >{{.NextInSection.Title}}</span>
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
42
themes/codex/layouts/partials/seo-schema.html
Normal file
42
themes/codex/layouts/partials/seo-schema.html
Normal file
@@ -0,0 +1,42 @@
|
||||
|
||||
<!-- JSON-LD -->
|
||||
<script type="application/ld+json">
|
||||
{{ if and (.IsPage) (eq .Section "blog") }}
|
||||
{
|
||||
"@context" : "http://schema.org",
|
||||
"@type" : "BlogPosting",
|
||||
"mainEntityOfPage": {
|
||||
"@type": "WebPage",
|
||||
"@id": "{{ .Site.BaseURL }}"
|
||||
},
|
||||
"articleSection" : "{{ .Section }}",
|
||||
"name" : "{{ .Title }}",
|
||||
"headline" : "{{ .Title }}",
|
||||
"description" : "{{ .Description }}",
|
||||
"inLanguage" : "en-US",
|
||||
"author" : "{{ .Site.Params.name }}",
|
||||
"creator" : "{{ .Site.Params.name }}",
|
||||
"publisher": "{{ .Site.Params.name }}",
|
||||
"accountablePerson" : "{{ .Site.Params.name }}",
|
||||
"copyrightHolder" : "{{ .Site.Params.name }}",
|
||||
"copyrightYear" : "{{ .Date.Format "2006" }}",
|
||||
"datePublished": "{{ .Date }}",
|
||||
"dateModified" : "{{ .Date }}",
|
||||
"url" : "{{ .Permalink }}",
|
||||
"wordCount" : "{{ .WordCount }}",
|
||||
"keywords" : [{{ if isset .Params "keywords" }}{{ range .Params.keywords }}"{{ . }}", {{ end }}{{ end }}"Blog"]
|
||||
}
|
||||
{{ else }}
|
||||
{
|
||||
"@context": "http://schema.org",
|
||||
"@type": "WebSite",
|
||||
"url": "{{ .Permalink }}",
|
||||
"name": "{{ .Title }}",
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "{{ .Site.Params.name }}"
|
||||
},
|
||||
"description": "{{ if .IsHome }}{{ htmlEscape .Site.Params.description }}{{ else }}{{ htmlEscape .Description }}{{ end }}"
|
||||
}
|
||||
{{ end }}
|
||||
</script>
|
||||
15
themes/codex/layouts/partials/social-icons.html
Normal file
15
themes/codex/layouts/partials/social-icons.html
Normal file
@@ -0,0 +1,15 @@
|
||||
{{ $currentPage := . }}
|
||||
{{ $icons := .Site.Params.iconOrder | default (slice "Twitter" "GitHub" "Email" "Facebook" "GitLab" "Instagram" "LinkedIn" "YouTube") }}
|
||||
|
||||
<div class="social-icons">
|
||||
{{ range $icons }}
|
||||
{{ $icon := anchorize . }}
|
||||
{{ if isset $currentPage.Site.Params $icon }}
|
||||
<a class="social-icons__link" rel="me" title="{{ . }}"
|
||||
href="{{ index $currentPage.Site.Params $icon }}"
|
||||
target="_blank" rel="noopener">
|
||||
<div class="social-icons__icon" style="background-image: url('{{print "svg/" $icon ".svg" | absURL}}')"></div>
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</div>
|
||||
12
themes/codex/layouts/partials/tags.html
Normal file
12
themes/codex/layouts/partials/tags.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{{ $taxo := "tags" }}
|
||||
{{ with .Param $taxo }}
|
||||
<ul class="tags__list">
|
||||
{{ range $index, $tag := . }}
|
||||
{{ with $.Site.GetPage (printf "/%s/%s" $taxo $tag) -}}
|
||||
<li class="tag__item">
|
||||
<a class="tag__link" href="{{ .Permalink }}">{{ $tag | urlize }}</a>
|
||||
</li>
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
</ul>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user