Move some files to a better place, remove some unused file
This commit is contained in:
parent
0bbda99e9c
commit
89e88cf1e1
27 changed files with 13 additions and 13 deletions
7
layouts/partials/404.html
Normal file
7
layouts/partials/404.html
Normal file
|
@ -0,0 +1,7 @@
|
|||
<section class="container centered">
|
||||
<div class="error">
|
||||
<h1>404</h1>
|
||||
<h2>{{ i18n "page_not_found" }}</h2>
|
||||
<p>{{ i18n "page_does_not_exist" }}<br />{{ i18n "head_back" .Site.BaseURL | safeHTML }}</p>
|
||||
</div>
|
||||
</section>
|
16
layouts/partials/footer.html
Normal file
16
layouts/partials/footer.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<footer class="footer">
|
||||
<section class="container">
|
||||
{{ with .Site.Params.footercontent }}
|
||||
<p>{{ . }}</p>
|
||||
{{ end }}
|
||||
{{ if not .Site.Params.hideCopyright }} © {{ now.Format "2006" }}{{ end }}
|
||||
{{ if not .Site.Params.hideCredits }}
|
||||
{{ if not .Site.Params.hideCopyright }} · {{ end }}
|
||||
{{ i18n "powered_by" }} <a href="https://gohugo.io/">Hugo</a> & <a href="https://github.com/luizdepra/hugo-coder/">Coder</a>.
|
||||
{{ end }}
|
||||
{{ if .Site.Params.commit }}
|
||||
{{ if or (not .Site.Params.hideCredits) (not .Site.Params.hideCopyright) }} · {{ end }}
|
||||
[<a href="{{ .Site.Params.commit }}{{ getenv "GIT_COMMIT_SHA" }}">{{ getenv "GIT_COMMIT_SHA_SHORT" }}</a>]
|
||||
{{ end }}
|
||||
</section>
|
||||
</footer>
|
35
layouts/partials/header.html
Normal file
35
layouts/partials/header.html
Normal file
|
@ -0,0 +1,35 @@
|
|||
<nav class="navigation">
|
||||
<section class="container">
|
||||
<a class="navigation-title" href="{{ .Site.BaseURL | absLangURL }}">
|
||||
{{ .Site.Title }}
|
||||
</a>
|
||||
<input type="checkbox" id="menu-toggle" />
|
||||
<label class="menu-button float-right" for="menu-toggle"><i class="fas fa-bars"></i></label>
|
||||
<ul class="navigation-list">
|
||||
{{ with .Site.Menus.main}}
|
||||
{{ range sort . }}
|
||||
<li class="navigation-item">
|
||||
<a class="navigation-link" href="{{ .URL | relLangURL }}">{{ .Name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if .Site.IsMultiLingual }}
|
||||
{{ $node := . }}
|
||||
{{ .Scratch.Set "separator" true }}
|
||||
{{ range .Site.Home.AllTranslations }}
|
||||
{{ if ne $.Site.Language .Language }}
|
||||
{{ if $node.Scratch.Get "separator" }}
|
||||
<li class="navigation-item menu-separator">
|
||||
<span>|</span>
|
||||
</li>
|
||||
{{ $node.Scratch.Set "separator" false }}
|
||||
{{ end }}
|
||||
<li class="navigation-item">
|
||||
<a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</section>
|
||||
</nav>
|
30
layouts/partials/home.html
Normal file
30
layouts/partials/home.html
Normal file
|
@ -0,0 +1,30 @@
|
|||
<section class="container centered">
|
||||
<div class="about">
|
||||
{{ with .Site.Params.avatarurl }}
|
||||
<div class="avatar"><img src="{{ . | relURL }}" alt="avatar"></div>
|
||||
{{ end }}
|
||||
<h1>{{ .Site.Params.author }}</h1>
|
||||
<h2>{{ .Site.Params.info }}</h2>
|
||||
{{ with .Site.Params.social }}
|
||||
<ul>
|
||||
{{ range sort . "weight" }}
|
||||
{{ if .icon }}
|
||||
<li>
|
||||
{{ if eq .type "tel"}}
|
||||
<a href="tel:{{ .url }}" rel="me" aria-label="{{ .name }}" title="{{ .name }}">
|
||||
{{ else }}
|
||||
<a href="{{ .url }}" rel="me" aria-label="{{ .name }}" title="{{ .name }}">
|
||||
{{ end }}
|
||||
<i class="{{ .icon }}" aria-hidden="true"></i>
|
||||
</a>
|
||||
</li>
|
||||
{{ else }}
|
||||
<li>
|
||||
<a href="{{ .url }}" rel="me" aria-label="{{ .name }}" title="{{ .name }}">{{ .name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
||||
</div>
|
||||
</section>
|
19
layouts/partials/list.html
Normal file
19
layouts/partials/list.html
Normal file
|
@ -0,0 +1,19 @@
|
|||
<section class="container list">
|
||||
<h1 class="title">
|
||||
{{- if eq .Kind "taxonomy" -}}
|
||||
{{- i18n .Data.Singular | title -}}
|
||||
{{- print ": " -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- .Title -}}
|
||||
</h1>
|
||||
<ul>
|
||||
{{ range .Paginator.Pages }}
|
||||
<li>
|
||||
<span class="date">{{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}</span>
|
||||
<a class="title" href="{{ .Params.ExternalLink | default .URL }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ partial "pagination.html" . }}
|
||||
</section>
|
9
layouts/partials/page.html
Normal file
9
layouts/partials/page.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<section class="container page">
|
||||
<article>
|
||||
<header>
|
||||
<h1>{{ .Title }}</h1>
|
||||
</header>
|
||||
|
||||
{{ .Content }}
|
||||
</article>
|
||||
</section>
|
48
layouts/partials/pagination.html
Normal file
48
layouts/partials/pagination.html
Normal file
|
@ -0,0 +1,48 @@
|
|||
{{ $paginator := .Paginator }}
|
||||
{{ $adjacent_links := 2 }}
|
||||
{{ $max_links := (add (mul $adjacent_links 2) 1) }}
|
||||
{{ $lower_limit := (add $adjacent_links 1) }}
|
||||
{{ $upper_limit := (sub $paginator.TotalPages $adjacent_links) }}
|
||||
{{ if gt $paginator.TotalPages 1 }}
|
||||
<ul class="pagination">
|
||||
{{ if $paginator.HasPrev }}
|
||||
{{ if ne $paginator.PageNumber 1 }}
|
||||
<li><a href="{{ $paginator.First.URL }}">«</a></li>
|
||||
{{ end }}
|
||||
<li class="hidden"><a href="{{ $paginator.Prev.URL }}">‹</a></li>
|
||||
{{ end }}
|
||||
{{ range $paginator.Pagers }}
|
||||
{{ $.Scratch.Set "page_number_flag" false }}
|
||||
{{ if gt $paginator.TotalPages $max_links }}
|
||||
{{ if le $paginator.PageNumber $lower_limit }}
|
||||
{{ if le .PageNumber $max_links }}
|
||||
{{ $.Scratch.Set "page_number_flag" true }}
|
||||
{{ end }}
|
||||
{{ else if ge $paginator.PageNumber $upper_limit }}
|
||||
{{ if gt .PageNumber (sub $paginator.TotalPages $max_links) }}
|
||||
{{ $.Scratch.Set "page_number_flag" true }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ if and ( ge .PageNumber (sub $paginator.PageNumber $adjacent_links) ) ( le .PageNumber (add $paginator.PageNumber $adjacent_links) ) }}
|
||||
{{ $.Scratch.Set "page_number_flag" true }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
{{ $.Scratch.Set "page_number_flag" true }}
|
||||
{{ end }}
|
||||
{{ if eq ($.Scratch.Get "page_number_flag") true }}
|
||||
{{ if eq . $paginator }}
|
||||
<li>{{ .PageNumber }}</li>
|
||||
{{ else }}
|
||||
<li><a href="{{ .URL }}">{{ .PageNumber }}</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ if $paginator.HasNext }}
|
||||
<li class="hidden"><a href="{{ $paginator.Next.URL }}">›</a></li>
|
||||
{{ if ne $paginator.PageNumber $paginator.TotalPages }}
|
||||
<li><a href="{{ $paginator.Last.URL }}">»</a></li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ end }}
|
3
layouts/partials/posts/disqus.html
Normal file
3
layouts/partials/posts/disqus.html
Normal file
|
@ -0,0 +1,3 @@
|
|||
{{- if and (not (eq .Site.DisqusShortname "" )) (eq (.Site.Params.disable_comments | default false) false) -}}
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
{{- end -}}
|
24
layouts/partials/posts/math.html
Normal file
24
layouts/partials/posts/math.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
{{- if .Params.math -}}
|
||||
<script type="text/javascript" async
|
||||
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js?config=TeX-AMS-MML_HTMLorMML-full">
|
||||
MathJax.Hub.Config({
|
||||
tex2jax: {
|
||||
inlineMath: [['$','$']],
|
||||
displayMath: [['$$','$$']],
|
||||
processEscapes: true,
|
||||
processEnvironments: true,
|
||||
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre'],
|
||||
TeX: { extensions: ["AMSmath.js", "AMSsymbols.js"] }
|
||||
}
|
||||
});
|
||||
MathJax.Hub.Queue(function() {
|
||||
// Fix <code> tags after MathJax finishes running. This is a
|
||||
// hack to overcome a shortcoming of Markdown. Discussion at
|
||||
// https://github.com/mojombo/jekyll/issues/199
|
||||
var all = MathJax.Hub.getAllJax(), i;
|
||||
for(i = 0; i < all.length; i += 1) {
|
||||
all[i].SourceElement().parentNode.className += ' has-jax';
|
||||
}
|
||||
});
|
||||
</script>
|
||||
{{- end -}}
|
24
layouts/partials/posts/series.html
Normal file
24
layouts/partials/posts/series.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
{{ $currentPageUrl := .URL }}
|
||||
{{ if .Params.series }}
|
||||
<section class="see-also">
|
||||
{{ range .Params.series }}
|
||||
<h3>See also in {{ . }}</h3>
|
||||
{{ $name := . | urlize }}
|
||||
{{ $series := index $.Site.Taxonomies.series $name }}
|
||||
{{ if gt (len $series.Pages) 0 }}
|
||||
<nav>
|
||||
<ul>
|
||||
{{ $maxItems := $.Site.Params.maxSeeAlsoItems | default 5 }}
|
||||
{{ range first (add $maxItems 1) $series.Pages }}
|
||||
{{ if ne .URL $currentPageUrl }}
|
||||
<li>
|
||||
<a href="{{ .Params.ExternalLink | default .URL }}">{{ .Title }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</ul>
|
||||
</nav>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</section>
|
||||
{{ end }}
|
9
layouts/partials/taxonomy/categories.html
Normal file
9
layouts/partials/taxonomy/categories.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<div class="categories">
|
||||
<i class="fas fa-folder"></i>
|
||||
{{- range $index, $el := . -}}
|
||||
{{- if gt $index 0 }}
|
||||
<span class="separator">•</span>
|
||||
{{- end }}
|
||||
<a href="{{ ( printf "categories/%s/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a>
|
||||
{{- end -}}
|
||||
</div>
|
9
layouts/partials/taxonomy/tags.html
Normal file
9
layouts/partials/taxonomy/tags.html
Normal file
|
@ -0,0 +1,9 @@
|
|||
<div class="tags">
|
||||
<i class="fas fa-tag"></i>
|
||||
{{- range $index, $el := . -}}
|
||||
{{- if gt $index 0 }}
|
||||
<span class="separator">•</span>
|
||||
{{- end }}
|
||||
<a href="{{ ( printf "tags/%s/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a>
|
||||
{{- end -}}
|
||||
</div>
|
Loading…
Add table
Add a link
Reference in a new issue