mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-23 15:57:57 +00:00
theme: adjust idention to spaces
This commit is contained in:
parent
de7b3d8056
commit
bdce9ec45a
8 changed files with 81 additions and 81 deletions
|
@ -1,22 +1,22 @@
|
||||||
{{ partial "header.html" . }}
|
{{ partial "header.html" . }}
|
||||||
|
|
||||||
{{ if eq .Kind "section" }}
|
{{ if eq .Kind "section" }}
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
{{ if or (eq .Kind "taxonomy") (eq .Kind "term") }}
|
{{ if or (eq .Kind "taxonomy") (eq .Kind "term") }}
|
||||||
<ul>
|
<ul>
|
||||||
{{ range .Pages }}
|
{{ range .Pages }}
|
||||||
<li><a href="{{.RelPermalink}}">{{.Title}}</a></li>
|
<li><a href="{{.RelPermalink}}">{{.Title}}</a></li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<footer class=" footline" >
|
<footer class=" footline" >
|
||||||
{{with .Params.LastModifierDisplayName}}
|
{{with .Params.LastModifierDisplayName}}
|
||||||
<i class='fas fa-user'></i> <a href="mailto:{{ $.Params.LastModifierEmail }}">{{ . }}</a> {{with $.Date}} <i class='fas fa-calendar'></i> {{ .Format "02/01/2006" }}{{end}}
|
<i class='fas fa-user'></i> <a href="mailto:{{ $.Params.LastModifierEmail }}">{{ . }}</a> {{with $.Date}} <i class='fas fa-calendar'></i> {{ .Format "02/01/2006" }}{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
|
@ -3,10 +3,10 @@
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
|
||||||
<footer class="footline">
|
<footer class="footline">
|
||||||
{{with .Params.LastModifierDisplayName}}
|
{{with .Params.LastModifierDisplayName}}
|
||||||
<i class='fas fa-user'></i> <a href="mailto:{{ $.Params.LastModifierEmail }}">{{ . }}</a> {{with $.Date}} <i class='fas fa-calendar'></i> {{ .Format "02/01/2006" }}{{end}}
|
<i class='fas fa-user'></i> <a href="mailto:{{ $.Params.LastModifierEmail }}">{{ . }}</a> {{with $.Date}} <i class='fas fa-calendar'></i> {{ .Format "02/01/2006" }}{{end}}
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
||||||
|
|
|
@ -6,14 +6,14 @@
|
||||||
{{if .Site.Home.Content }}
|
{{if .Site.Home.Content }}
|
||||||
{{.Site.Home.Content}}
|
{{.Site.Home.Content}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<h1>Customize your own home page</h1>
|
<h1>Customize your own home page</h1>
|
||||||
<p>
|
<p>
|
||||||
The site is working. Don't forget to customize this homepage with your own. You typically have 3 choices :
|
The site is working. Don't forget to customize this homepage with your own. You typically have 3 choices :
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><b>1. </b> Create an _index.md document in <b>content</b> folder and fill it with Markdown content</li>
|
<li><b>1. </b> Create an _index.md document in <b>content</b> folder and fill it with Markdown content</li>
|
||||||
<li><b>2. </b> Create an <b>index.html</b> file in the <b>static</b> folder and fill the file with HTML content</li>
|
<li><b>2. </b> Create an <b>index.html</b> file in the <b>static</b> folder and fill the file with HTML content</li>
|
||||||
<li><b>3. </b> Configure your server to automatically redirect home page to one your documentation page</li>
|
<li><b>3. </b> Configure your server to automatically redirect home page to one your documentation page</li>
|
||||||
</ul>
|
</ul>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ partial "footer.html" . }}
|
{{ partial "footer.html" . }}
|
||||||
|
|
|
@ -3,35 +3,35 @@
|
||||||
{{ $title := .Get "title" | default ("Attachments-label" | T) }}
|
{{ $title := .Get "title" | default ("Attachments-label" | T) }}
|
||||||
{{ $sort := .Get "sort" | default "asc" }}
|
{{ $sort := .Get "sort" | default "asc" }}
|
||||||
<section class="attachments {{ $style }}">
|
<section class="attachments {{ $style }}">
|
||||||
<div class="label">{{ $title }}</div>
|
<div class="label">{{ $title }}</div>
|
||||||
<div class="attachments-files">
|
<div class="attachments-files">
|
||||||
{{- $filesName := "files" }}
|
{{- $filesName := "files" }}
|
||||||
{{- if ne .Page.File.BaseFileName "index" }}
|
{{- if ne .Page.File.BaseFileName "index" }}
|
||||||
{{- $filesName = printf "%s.files" .Page.File.BaseFileName }}
|
{{- $filesName = printf "%s.files" .Page.File.BaseFileName }}
|
||||||
{{- end}}
|
{{- end}}
|
||||||
|
|
||||||
{{- $fileDir := replace .Page.File.Dir "\\" "/" }}
|
{{- $fileDir := replace .Page.File.Dir "\\" "/" }}
|
||||||
{{- $pattern := .Get "pattern" | default "" }}
|
{{- $pattern := .Get "pattern" | default "" }}
|
||||||
{{- range sort (readDir (printf "content/%s%s" .Page.File.Dir $filesName) ) "Name" $sort }}
|
{{- range sort (readDir (printf "content/%s%s" .Page.File.Dir $filesName) ) "Name" $sort }}
|
||||||
{{- if findRE $pattern .Name}}
|
{{- if findRE $pattern .Name}}
|
||||||
{{- $size := .Size }}
|
{{- $size := .Size }}
|
||||||
{{- $unit := "Byte-symbol" }}
|
{{- $unit := "Byte-symbol" }}
|
||||||
{{- if ge $size 1024 }}
|
{{- if ge $size 1024 }}
|
||||||
{{- $size = div $size 1024 }}
|
{{- $size = div $size 1024 }}
|
||||||
{{- $unit = "Kilobyte-symbol" }}
|
{{- $unit = "Kilobyte-symbol" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- if ge $size 1024 }}
|
{{- if ge $size 1024 }}
|
||||||
{{- $size = div $size 1024 }}
|
{{- $size = div $size 1024 }}
|
||||||
{{- $unit = "Megabyte-symbol" }}
|
{{- $unit = "Megabyte-symbol" }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- $unitsymbol := $unit | T }}
|
{{- $unitsymbol := $unit | T }}
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ (printf "%s%s/%s" $fileDir $filesName .Name) | relLangURL }}">{{.Name}}</a>
|
<a href="{{ (printf "%s%s/%s" $fileDir $filesName .Name) | relLangURL }}">{{.Name}}</a>
|
||||||
({{$size}} {{$unitsymbol}})
|
({{$size}} {{$unitsymbol}})
|
||||||
</li>
|
</li>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
{{- .Inner }}
|
{{- .Inner }}
|
||||||
</section>
|
</section>
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
{{ $style := .Get 0 }}
|
{{ $style := .Get 0 }}
|
||||||
{{ $title := $style | T }}
|
{{ $title := $style | T }}
|
||||||
<div class="notices {{ $style }}">
|
<div class="notices {{ $style }}">
|
||||||
<div class="label">{{ $title }}</div>
|
<div class="label">{{ $title }}</div>
|
||||||
{{ .Inner }}
|
{{ .Inner }}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
{{- if in (.Get 0) "/_index.md" -}}
|
{{- if in (.Get 0) "/_index.md" -}}
|
||||||
{{- $paths := (split (.Get 0) "_index.md") -}}
|
{{- $paths := (split (.Get 0) "_index.md") -}}
|
||||||
{{- $pagepath := index $paths 0 -}}
|
{{- $pagepath := index $paths 0 -}}
|
||||||
{{- $anchor := index $paths 1 -}}
|
{{- $anchor := index $paths 1 -}}
|
||||||
{{- with .Site.GetPage "section" (trim $pagepath "/") -}}
|
{{- with .Site.GetPage "section" (trim $pagepath "/") -}}
|
||||||
{{- ( printf "%s%s" $pagepath $anchor ) | relLangURL -}}
|
{{- ( printf "%s%s" $pagepath $anchor ) | relLangURL -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- with .Site.GetPage "section" (.Get 0) }}
|
{{- with .Site.GetPage "section" (.Get 0) }}
|
||||||
{{- .RelPermalink -}}
|
{{- .RelPermalink -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- .Get 0 | relref .Page -}}
|
{{- .Get 0 | relref .Page -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
|
@ -1,14 +1,14 @@
|
||||||
{{- if in (.Get 0) "/_index.md" -}}
|
{{- if in (.Get 0) "/_index.md" -}}
|
||||||
{{- $paths := (split (.Get 0) "_index.md") -}}
|
{{- $paths := (split (.Get 0) "_index.md") -}}
|
||||||
{{- $pagepath := index $paths 0 -}}
|
{{- $pagepath := index $paths 0 -}}
|
||||||
{{- $anchor := index $paths 1 -}}
|
{{- $anchor := index $paths 1 -}}
|
||||||
{{- with .Site.GetPage "section" (trim $pagepath "/") -}}
|
{{- with .Site.GetPage "section" (trim $pagepath "/") -}}
|
||||||
{{- ( printf "%s%s" $pagepath $anchor ) | relLangURL -}}
|
{{- ( printf "%s%s" $pagepath $anchor ) | relLangURL -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- with .Site.GetPage "section" (.Get 0) }}
|
{{- with .Site.GetPage "section" (.Get 0) }}
|
||||||
{{- .RelPermalink -}}
|
{{- .RelPermalink -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- .Get 0 | relref .Page -}}
|
{{- .Get 0 | relref .Page -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
|
@ -1,12 +1,12 @@
|
||||||
{{ if .Parent }}
|
{{ if .Parent }}
|
||||||
{{ $name := trim (.Get "name") " " }}
|
{{ $name := trim (.Get "name") " " }}
|
||||||
{{ if not (.Parent.Scratch.Get "tabs") }}
|
{{ if not (.Parent.Scratch.Get "tabs") }}
|
||||||
{{ .Parent.Scratch.Set "tabs" slice }}
|
{{ .Parent.Scratch.Set "tabs" slice }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ with .Inner }}
|
{{ with .Inner }}
|
||||||
{{ $.Parent.Scratch.Add "tabs" (dict "name" $name "content" . ) }}
|
{{ $.Parent.Scratch.Add "tabs" (dict "name" $name "content" . ) }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{- errorf "[%s] %q: tab shortcode missing its parent" site.Language.Lang .Page.Path -}}
|
{{- errorf "[%s] %q: tab shortcode missing its parent" site.Language.Lang .Page.Path -}}
|
||||||
{{ end}}
|
{{ end}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue