diff --git a/layouts/404.html b/layouts/404.html deleted file mode 100644 index e680954..0000000 --- a/layouts/404.html +++ /dev/null @@ -1,10 +0,0 @@ -{{ define "main" }} -
-

404 — {{ $.Site.Params.missingContentMessage | default "Page not found..." }}

- -
- {{ $.Site.Params.missingBackButtonLabel | default "Back to home page" }} → -
- -
-{{ end }} diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html deleted file mode 100644 index b68fbae..0000000 --- a/layouts/_default/_markup/render-heading.html +++ /dev/null @@ -1,5 +0,0 @@ -{{ .Text | safeHTML }} -{{- if and (ge .Level 2) (le .Level 5) }}{{" " -}} - -{{- end -}} - \ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..ae3b9cc --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,27 @@ + + + + {{ block "title" . }} + {{ if .IsHome }}{{ $.Site.Title }}{{ else }}{{ .Title }} :: {{ $.Site.Title }}{{ end }} + {{ end }} + {{ partial "head.html" . }} + + +{{ $container := cond ($.Site.Params.FullWidthTheme | default false) "container full" (cond ($.Site.Params.CenterTheme | default false) "container center" "container") }} + +
+ + {{ partial "header.html" . }} + +
+ {{ block "main" . }} + {{ end }} +
+ + {{ block "footer" . }} + {{ partial "footer.html" . }} + {{ end }} +
+ + + diff --git a/layouts/_default/partials/footer.html b/layouts/_default/partials/footer.html deleted file mode 100644 index 49c4068..0000000 --- a/layouts/_default/partials/footer.html +++ /dev/null @@ -1,25 +0,0 @@ - - -{{ $menu := resources.Get "js/menu.js" | js.Build }} -{{ $prism := resources.Get "js/prism.js" | js.Build }} - -{{ $bundle := slice $menu $prism | resources.Concat "bundle.js" | resources.Minify }} - - - - -{{ partial "extended_footer.html" . }} diff --git a/layouts/_default/partials/list.html b/layouts/_default/partials/list.html deleted file mode 100644 index cce3295..0000000 --- a/layouts/_default/partials/list.html +++ /dev/null @@ -1,56 +0,0 @@ -{{ define "main" }} - {{ with .Content }} -
- {{ . }} -
- {{ end }} -
- {{ range .Paginator.Pages }} -
-

- {{ .Title | markdownify }} -

- - - {{ if .Params.tags }} - - {{ end }} - - {{ partial "cover.html" . }} - -
- {{ if .Params.showFullContent }} - {{ .Content }} - {{ else if .Description }} - {{ .Description | markdownify }} - {{ else }} - {{ .Summary }} - {{ end }} -
- - {{ if not .Params.showFullContent }} -
- {{ $.Site.Params.ReadMore }} → -
- {{ end }} -
- {{ end }} - - {{ partial "pagination.html" . }} -
-{{ end }} diff --git a/layouts/_default/partials/mobile-menu.html b/layouts/_default/partials/mobile-menu.html deleted file mode 100644 index 0ec8f33..0000000 --- a/layouts/_default/partials/mobile-menu.html +++ /dev/null @@ -1,20 +0,0 @@ - diff --git a/layouts/_default/rss.xml b/layouts/_default/rss.xml new file mode 100644 index 0000000..65aa855 --- /dev/null +++ b/layouts/_default/rss.xml @@ -0,0 +1,40 @@ +{{- $pctx := . -}} +{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}} +{{- $pages := slice -}} +{{- if or $.IsHome $.IsSection -}} +{{- $pages = $pctx.RegularPages -}} +{{- else -}} +{{- $pages = $pctx.Pages -}} +{{- end -}} +{{- $limit := .Site.Config.Services.RSS.Limit -}} +{{- if ge $limit 1 -}} +{{- $pages = $pages | first $limit -}} +{{- end -}} +{{- printf "" | safeHTML }} + + + {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} + {{ .Permalink }} + Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} + Hugo -- gohugo.io{{ with .Site.LanguageCode }} + {{.}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Author.email }} + {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}}{{ with .Site.Copyright }} + {{.}}{{end}}{{ if not .Date.IsZero }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{- with .OutputFormats.Get "RSS" -}} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{- end -}} + {{ range $pages }} + + {{ .Title }} + {{ .Permalink }} + {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{ with .Site.Author.email }}{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} + {{ .Permalink }} + {{ .Summary | html }} + {{ .Content | html }} + + {{ end }} + + diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html new file mode 100644 index 0000000..c5a72e6 --- /dev/null +++ b/layouts/_default/terms.html @@ -0,0 +1,22 @@ +{{ define "main" }} +
+

{{ .Title }}

+ {{ with .Content }} +
+ {{ . }} +
+ {{ end }} + +
+{{ end }} diff --git a/layouts/partials/comments.html b/layouts/partials/comments.html new file mode 100644 index 0000000..64f5a64 --- /dev/null +++ b/layouts/partials/comments.html @@ -0,0 +1,8 @@ + diff --git a/layouts/partials/cover.html b/layouts/partials/cover.html new file mode 100644 index 0000000..ea562ea --- /dev/null +++ b/layouts/partials/cover.html @@ -0,0 +1,24 @@ +{{- $cover := false -}} +{{- $autoCover := default $.Site.Params.autoCover false }} + +{{- if index .Params "cover" -}} + {{- if .Resources.GetMatch .Params.Cover }} + {{- $cover = (.Resources.GetMatch .Params.Cover).RelPermalink -}} + {{- else -}} + {{- $cover = absURL .Params.Cover -}} + {{- end -}} +{{- else if $.Site.Params.AutoCover -}} + {{- if (not .Params.Cover) -}} + {{- if .Resources.GetMatch "cover.*" -}} + {{- $cover = (.Resources.GetMatch "cover.*").RelPermalink -}} + {{- end -}} + {{- end -}} +{{- end -}} + +{{if $cover -}} + + {{ .Title | plainify | default +{{- end }} diff --git a/layouts/partials/extended_footer.html b/layouts/partials/extended_footer.html new file mode 100644 index 0000000..1ef9361 --- /dev/null +++ b/layouts/partials/extended_footer.html @@ -0,0 +1,4 @@ + diff --git a/layouts/partials/extended_head.html b/layouts/partials/extended_head.html new file mode 100644 index 0000000..69baf1f --- /dev/null +++ b/layouts/partials/extended_head.html @@ -0,0 +1,4 @@ + diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..9352d88 --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,94 @@ + + + + +{{ if .Params.noindex }} + {{ if or (eq (.Param "noindex") true) (eq (.Param "noindex") "true") }} + + {{ end }} +{{ else }} + +{{ end }} + + +{{ template "_internal/google_analytics.html" . }} + +{{ $defaultStyles := resources.Get "css/style.scss" }} + +{{ if and (isset .Params "color") (not (eq .Params.color "")) }} + {{ $localColorCss := resources.Get (printf "css/color/%s.scss" .Params.color) }} + {{ $localCss := slice $localColorCss $defaultStyles | resources.Concat (printf "css/%s-local.scss" .Params.color) }} + {{ $localColorStyles := $localCss | resources.ToCSS }} + +{{ else }} + + {{ $colorCss := resources.Get (printf "css/color/%s.scss" ($.Site.Params.ThemeColor | default "orange")) }} + {{ $css := slice $colorCss $defaultStyles | resources.Concat "css/base.scss" }} + {{ $options := (dict "targetPath" "styles.css" "outputStyle" "compressed" "enableSourceMap" true "precision" 6 "includePaths" (slice "node_modules")) }} + {{ $styles := $css | resources.ToCSS $options }} + +{{ end }} + + +{{ if (fileExists "static/style.css") -}} + +{{- end }} + + +{{ if isset $.Site.Params "favicon" }} + +{{ else }} + + +{{ end }} + + + +{{ if (isset $.Site.Params "twitter") }} + {{ if (isset $.Site.Params.Twitter "site") }} + + {{ end }} + +{{ end }} + + + + + + + + +{{ if (isset .Params "cover") }} + {{ $pageCover := .Param "cover" }} + {{ with (.Resources.GetMatch (.Param "cover")) }} + {{ $pageCover = .RelPermalink }} + {{ end }} + +{{ else }} + {{ if isset $.Site.Params "favicon" }} + + {{ else }} + + {{ end }} +{{ end }} + + +{{ range .Params.categories }} + +{{ end }} +{{ if isset .Params "date" }} + +{{ end }} + + +{{ with .OutputFormats.Get "RSS" }} + +{{ end }} + + +{{ with .OutputFormats.Get "json" }} + +{{ end }} + + +{{ partial "extended_head.html" . }} diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..b43e320 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,16 @@ +
+
+ + {{ if len $.Site.Menus }} + {{ partial "mobile-menu.html" . }} + {{ end }} + {{ if and $.Site.Params.showLanguageSelector (len $.Site.Home.AllTranslations) }} + {{ partial "language-menu.html" . }} + {{ end }} +
+ {{ if len $.Site.Menus }} + {{ partial "menu.html" . }} + {{ end }} +
diff --git a/layouts/partials/language-menu.html b/layouts/partials/language-menu.html new file mode 100644 index 0000000..c9f7c66 --- /dev/null +++ b/layouts/partials/language-menu.html @@ -0,0 +1,10 @@ + diff --git a/layouts/partials/logo.html b/layouts/partials/logo.html new file mode 100644 index 0000000..8a1bf1f --- /dev/null +++ b/layouts/partials/logo.html @@ -0,0 +1,5 @@ + + + diff --git a/layouts/partials/menu.html b/layouts/partials/menu.html new file mode 100644 index 0000000..33c9a89 --- /dev/null +++ b/layouts/partials/menu.html @@ -0,0 +1,33 @@ +