This commit is contained in:
18
themes/Eclectic/layouts/_default/baseof.html
Normal file
18
themes/Eclectic/layouts/_default/baseof.html
Normal file
@@ -0,0 +1,18 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="no-js {{ partial "class.html" . -}}" lang="en">
|
||||
<head>
|
||||
{{- partial "core/head.html" . -}}
|
||||
{{- block "resources" . -}}
|
||||
{{- partialCached "core/resources.html" . -}}
|
||||
{{- end -}}
|
||||
{{- block "head" . }}{{- end }}
|
||||
</head>
|
||||
<body>
|
||||
{{- partial "header.html" . -}}
|
||||
{{- block "main" . }}{{- end }}
|
||||
{{- partialCached "footer.html" . -}}
|
||||
{{- if .Site.Params.DebugMenu -}}
|
||||
{{- partial "debug/debug.html" (dict "context" .) -}}
|
||||
{{- end -}}
|
||||
</body>
|
||||
</html>
|
20
themes/Eclectic/layouts/_default/index.json
Normal file
20
themes/Eclectic/layouts/_default/index.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{{- $.Scratch.Add "index" slice -}}
|
||||
{{$icon := (resources.Get "image/favicon.svg" | resources.Minify).RelPermalink}}
|
||||
{{- with .Site.Home -}}
|
||||
{{- $.Scratch.Add "index" (dict "title" .Title "description" .Description "date" "2000-01-01T00:00:00Z" "tags" .Params.tags "category" (humanize (delimit (default "" .Params.categories) " ")) "image" $icon "series" .Params.series "contents" .Plain "meta" .Params.content "permalink" .Permalink "readingTime" .ReadingTime) -}}
|
||||
{{- end -}}
|
||||
{{- range .Site.RegularPages -}}
|
||||
{{- $params := "100x100" -}}
|
||||
{{- $cover := "" -}}
|
||||
{{- if .Params.coverAnchor -}}
|
||||
{{- $params = print $params " " .Params.coverAnchor -}}
|
||||
{{- else -}}
|
||||
{{- $params = print $params " Center" -}}
|
||||
{{- end -}}
|
||||
{{- $images := .Resources.ByType "image" -}}
|
||||
{{- $featured := $images.GetMatch "*feature*" -}}
|
||||
{{- $featured := cond (ne $featured nil) $featured ($images.GetMatch "{*cover*,*thumbnail*}") -}}
|
||||
{{- $cover = ($featured.Fill $params).RelPermalink -}}
|
||||
{{- $.Scratch.Add "index" (dict "title" .Title "description" .Description "date" (.Date.Format "2006-01-02T15:04:05-07:00") "tags" .Params.tags "category" (humanize (delimit (default "" .Params.categories) " ")) "series" .Params.series "contents" .Plain "meta" .Params.content "permalink" .Permalink "image" (default $icon $cover) "readingTime" .ReadingTime) -}}
|
||||
{{- end -}}
|
||||
{{- $.Scratch.Get "index" | jsonify -}}
|
25
themes/Eclectic/layouts/_default/list.html
Normal file
25
themes/Eclectic/layouts/_default/list.html
Normal file
@@ -0,0 +1,25 @@
|
||||
{{ define "main" }}
|
||||
{{- partialCached "util/background.html" "bg" -}}
|
||||
<article class="list">
|
||||
<h1 class='title'>{{.Title}}</h1>
|
||||
<span class='subtitle'>{{.Params.Subtitle}}</span>
|
||||
{{with .Content}}<div class="content">{{ .}}</div> {{- end -}}
|
||||
{{if and (not .Paginator.HasPrev) (gt (len .Sections) 0) }}
|
||||
<h2 class='title'>Pages</h2>
|
||||
{{end}}
|
||||
<ul class="blog-posts items-{{.Paginator.PageSize}}">
|
||||
{{ range .Paginator.Pages}}
|
||||
{{- partialCached "util/post.html" . .RelPermalink -}}
|
||||
{{ end }}
|
||||
</ul>
|
||||
{{ template "_internal/pagination.html" . }}
|
||||
{{if and (not .Paginator.HasPrev) (gt (len .Sections) 0) }}
|
||||
<h2 class='title'>Subsections</h2>
|
||||
<ul class="blog-posts items-{{len .Sections}}">
|
||||
{{range .Sections}}
|
||||
{{- partialCached "util/post.html" . .RelPermalink -}}
|
||||
{{end}}
|
||||
</ul>
|
||||
{{end}}
|
||||
</article>
|
||||
{{ end }}
|
3
themes/Eclectic/layouts/_default/single.html
Normal file
3
themes/Eclectic/layouts/_default/single.html
Normal file
@@ -0,0 +1,3 @@
|
||||
{{- define "main" -}}
|
||||
{{- partial "meta.html" . -}}
|
||||
{{- end -}}
|
Reference in New Issue
Block a user