Merge commit 'bfb1829a86a2bc1b595dad52a9d6dcfe80dd0679' as 'themes/codex'

This commit is contained in:
2020-12-11 02:43:08 +05:30
77 changed files with 3137 additions and 0 deletions

View 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 }}

View 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>

View 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>

View File

@@ -0,0 +1 @@
<link rel="shortcut icon" type="image/png" href="/favicon.ico" />

View 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>

View 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>

View 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>

View 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>

View 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>

View 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>

View 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 }}