diff --git a/config.toml b/config.toml index 8acce04..6ea3420 100755 --- a/config.toml +++ b/config.toml @@ -1,5 +1,5 @@ baseurl = "/" -# languageCode = "ru-ru" +languageCode = "ru-ru" theme = "hugo-theme-terminal" paginate = 5 DefaultContentLanguage = "ru" @@ -48,7 +48,7 @@ DefaultContentLanguage = "ru" favicon = "/img/favicon.svg" # Provide a string as a prefix for the last update date. By default, it looks like this: 2020-xx-xx [Updated: 2020-xx-xx] :: Author - # updatedDatePrefix = "Обновлено/updated" + # updatedDatePrefix = "Обновлено" # set all headings to their default size (depending on browser settings) oneHeadingSize = false # default diff --git a/layouts/_default/index.html b/layouts/_default/index.html new file mode 100644 index 0000000..9cce932 --- /dev/null +++ b/layouts/_default/index.html @@ -0,0 +1,66 @@ +{{ define "main" }} + {{ if .Content }} +
+ {{ .Content }} +
+ {{ end }} +
+ {{ $isntDefault := not (or (eq (trim $.Site.Params.contentTypeName " ") "posts") (eq (trim $.Site.Params.contentTypeName " ") "")) }} + {{ $contentTypeName := cond $isntDefault (string $.Site.Params.contentTypeName) "posts" }} + + {{ $PageContext := . }} + {{ if .IsHome }} + {{ $PageContext = .Site }} + {{ end }} + {{ $paginator := .Paginate (where $PageContext.RegularPages "Type" $contentTypeName) }} + + {{ 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/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..cce3295 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,56 @@ +{{ 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/term.html b/layouts/_default/term.html new file mode 100644 index 0000000..f339207 --- /dev/null +++ b/layouts/_default/term.html @@ -0,0 +1,57 @@ +{{ define "main" }} +

Posts for: #{{ .Title }}

+ {{ 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/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..e6b751f --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,27 @@ + + + {{ $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/partials/mobile-menu.html b/layouts/partials/mobile-menu.html new file mode 100644 index 0000000..0ec8f33 --- /dev/null +++ b/layouts/partials/mobile-menu.html @@ -0,0 +1,20 @@ +