theme: adjust idention to spaces

This commit is contained in:
Sören Weber 2021-08-23 23:57:56 +02:00
parent de7b3d8056
commit bdce9ec45a
No known key found for this signature in database
GPG key ID: 07D17FF580AE7589
8 changed files with 81 additions and 81 deletions

View file

@ -1,22 +1,22 @@
{{ partial "header.html" . }}
{{ if eq .Kind "section" }}
{{ .Content }}
{{ .Content }}
{{end}}
{{ if or (eq .Kind "taxonomy") (eq .Kind "term") }}
<ul>
{{ range .Pages }}
<li><a href="{{.RelPermalink}}">{{.Title}}</a></li>
{{ end }}
{{ range .Pages }}
<li><a href="{{.RelPermalink}}">{{.Title}}</a></li>
{{ end }}
</ul>
{{end}}
<footer class=" footline" >
{{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}}
</div>
{{end}}
{{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}}
</div>
{{end}}
</footer>
{{ partial "footer.html" . }}

View file

@ -3,10 +3,10 @@
{{ .Content }}
<footer class="footline">
{{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}}
</div>
{{end}}
{{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}}
</div>
{{end}}
</footer>
{{ partial "footer.html" . }}

View file

@ -6,14 +6,14 @@
{{if .Site.Home.Content }}
{{.Site.Home.Content}}
{{else}}
<h1>Customize your own home page</h1>
<p>
The site is working. Don't forget to customize this homepage with your own. You typically have 3 choices :
</p>
<ul>
<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>3. </b> Configure your server to automatically redirect home page to one your documentation page</li>
</ul>
<h1>Customize your own home page</h1>
<p>
The site is working. Don't forget to customize this homepage with your own. You typically have 3 choices :
</p>
<ul>
<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>3. </b> Configure your server to automatically redirect home page to one your documentation page</li>
</ul>
{{ end }}
{{ partial "footer.html" . }}

View file

@ -3,35 +3,35 @@
{{ $title := .Get "title" | default ("Attachments-label" | T) }}
{{ $sort := .Get "sort" | default "asc" }}
<section class="attachments {{ $style }}">
<div class="label">{{ $title }}</div>
<div class="attachments-files">
{{- $filesName := "files" }}
{{- if ne .Page.File.BaseFileName "index" }}
{{- $filesName = printf "%s.files" .Page.File.BaseFileName }}
{{- end}}
<div class="label">{{ $title }}</div>
<div class="attachments-files">
{{- $filesName := "files" }}
{{- if ne .Page.File.BaseFileName "index" }}
{{- $filesName = printf "%s.files" .Page.File.BaseFileName }}
{{- end}}
{{- $fileDir := replace .Page.File.Dir "\\" "/" }}
{{- $pattern := .Get "pattern" | default "" }}
{{- range sort (readDir (printf "content/%s%s" .Page.File.Dir $filesName) ) "Name" $sort }}
{{- if findRE $pattern .Name}}
{{- $size := .Size }}
{{- $unit := "Byte-symbol" }}
{{- if ge $size 1024 }}
{{- $size = div $size 1024 }}
{{- $unit = "Kilobyte-symbol" }}
{{- end }}
{{- if ge $size 1024 }}
{{- $size = div $size 1024 }}
{{- $unit = "Megabyte-symbol" }}
{{- end }}
{{- $unitsymbol := $unit | T }}
{{- $fileDir := replace .Page.File.Dir "\\" "/" }}
{{- $pattern := .Get "pattern" | default "" }}
{{- range sort (readDir (printf "content/%s%s" .Page.File.Dir $filesName) ) "Name" $sort }}
{{- if findRE $pattern .Name}}
{{- $size := .Size }}
{{- $unit := "Byte-symbol" }}
{{- if ge $size 1024 }}
{{- $size = div $size 1024 }}
{{- $unit = "Kilobyte-symbol" }}
{{- end }}
{{- if ge $size 1024 }}
{{- $size = div $size 1024 }}
{{- $unit = "Megabyte-symbol" }}
{{- end }}
{{- $unitsymbol := $unit | T }}
<li>
<a href="{{ (printf "%s%s/%s" $fileDir $filesName .Name) | relLangURL }}">{{.Name}}</a>
({{$size}} {{$unitsymbol}})
</li>
{{- end }}
{{- end }}
</div>
{{- .Inner }}
<li>
<a href="{{ (printf "%s%s/%s" $fileDir $filesName .Name) | relLangURL }}">{{.Name}}</a>
({{$size}} {{$unitsymbol}})
</li>
{{- end }}
{{- end }}
</div>
{{- .Inner }}
</section>

View file

@ -2,6 +2,6 @@
{{ $style := .Get 0 }}
{{ $title := $style | T }}
<div class="notices {{ $style }}">
<div class="label">{{ $title }}</div>
{{ .Inner }}
<div class="label">{{ $title }}</div>
{{ .Inner }}
</div>

View file

@ -1,14 +1,14 @@
{{- if in (.Get 0) "/_index.md" -}}
{{- $paths := (split (.Get 0) "_index.md") -}}
{{- $pagepath := index $paths 0 -}}
{{- $anchor := index $paths 1 -}}
{{- with .Site.GetPage "section" (trim $pagepath "/") -}}
{{- ( printf "%s%s" $pagepath $anchor ) | relLangURL -}}
{{- end -}}
{{- $paths := (split (.Get 0) "_index.md") -}}
{{- $pagepath := index $paths 0 -}}
{{- $anchor := index $paths 1 -}}
{{- with .Site.GetPage "section" (trim $pagepath "/") -}}
{{- ( printf "%s%s" $pagepath $anchor ) | relLangURL -}}
{{- end -}}
{{- else -}}
{{- with .Site.GetPage "section" (.Get 0) }}
{{- .RelPermalink -}}
{{- else -}}
{{- .Get 0 | relref .Page -}}
{{- end -}}
{{- with .Site.GetPage "section" (.Get 0) }}
{{- .RelPermalink -}}
{{- else -}}
{{- .Get 0 | relref .Page -}}
{{- end -}}
{{- end -}}

View file

@ -1,14 +1,14 @@
{{- if in (.Get 0) "/_index.md" -}}
{{- $paths := (split (.Get 0) "_index.md") -}}
{{- $pagepath := index $paths 0 -}}
{{- $anchor := index $paths 1 -}}
{{- with .Site.GetPage "section" (trim $pagepath "/") -}}
{{- ( printf "%s%s" $pagepath $anchor ) | relLangURL -}}
{{- end -}}
{{- $paths := (split (.Get 0) "_index.md") -}}
{{- $pagepath := index $paths 0 -}}
{{- $anchor := index $paths 1 -}}
{{- with .Site.GetPage "section" (trim $pagepath "/") -}}
{{- ( printf "%s%s" $pagepath $anchor ) | relLangURL -}}
{{- end -}}
{{- else -}}
{{- with .Site.GetPage "section" (.Get 0) }}
{{- .RelPermalink -}}
{{- else -}}
{{- .Get 0 | relref .Page -}}
{{- end -}}
{{- with .Site.GetPage "section" (.Get 0) }}
{{- .RelPermalink -}}
{{- else -}}
{{- .Get 0 | relref .Page -}}
{{- end -}}
{{- end -}}

View file

@ -1,12 +1,12 @@
{{ if .Parent }}
{{ $name := trim (.Get "name") " " }}
{{ if not (.Parent.Scratch.Get "tabs") }}
{{ .Parent.Scratch.Set "tabs" slice }}
{{ end }}
{{ with .Inner }}
{{ $name := trim (.Get "name") " " }}
{{ if not (.Parent.Scratch.Get "tabs") }}
{{ .Parent.Scratch.Set "tabs" slice }}
{{ end }}
{{ with .Inner }}
{{ $.Parent.Scratch.Add "tabs" (dict "name" $name "content" . ) }}
{{ end }}
{{ end }}
{{ 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}}