{{- define "title" }}{{ .Title }} | {{ .Site.Params.Title }}{{ end -}} {{- define "dnsPrefetch" -}} {{- $params := .Scratch.Get "params" -}} {{- with $params.Seo.dnsPrefetch -}} {{- range $index, $value := . -}} {{- end -}} {{- end -}} {{- with $.Site.Params.Seo.dnsPrefetch -}} {{- range $index, $value := . -}} {{- end -}} {{- end -}} {{- end -}} {{- define "no-content" -}} {{- $params := .Scratch.Get "params" -}} {{ $viewCounter := .Site.Params.ViewCounter }} {{- $toc := $params.toc -}} {{- if eq $toc true -}} {{- $toc = .Site.Params.page.toc | default dict -}} {{- else if eq $toc false -}} {{- $toc = dict "enable" false -}} {{- end -}} {{- $pageTheme := $params.Theme | default .Site.Params.Page.theme | default "classic" -}} {{ $params.UniqueId }}
{{- /* Auto TOC */ -}} {{- if ne $toc.enable false -}}
{{ T "contents" }}
{{- end -}} {{- /* Featured image */ -}} {{- $image := $params.featuredimage -}} {{- $pageImageHidden := $params.hiddenFeaturedImage -}} {{- with .Resources.GetMatch "featured-image" -}} {{- $image = .Permalink -}} {{- end -}} {{- $authorName := $params.author | default .Site.Author.name | default " " -}} {{ $author := index .Site.Data.authors $authorName }}
{{ if eq $pageTheme "hero" }} {{- $heroImage := "" -}} {{- with .Resources.GetMatch "featured-image" -}} {{- if lt 1600 .Width -}} {{- $heroImage = (.Resize "1600x q100").Permalink -}} {{- else -}} {{- $heroImage = .Permalink -}} {{- end -}} {{- end -}}

{{ $.Title }}

{{ $params.subtitle }}

{{ if ne $viewCounter nil}} {{ if ne $params.Views nil}} {{ $params.Views }} {{ else }} Нет просмотров {{ end }} {{- end -}} {{- with $.Site.Params.dateformat | default "2006-01-02" | $.PublishDate.Format -}} {{- $timeAgoDate:= $.Site.Params.TimeAgo.DateFormat | default "2006-01-02" | $.PublishDate.Format -}} {{- end -}} {{ T "wordCount" $.WordCount }} {{ T "readingTime" $.ReadingTime }}
{{ end }} {{ if not (eq $pageTheme "hero") }} {{ if or (eq $pageTheme "full") (eq $pageTheme "mega-full") }} {{- with $image -}} {{- $fullImage := $image -}} {{- if eq $pageTheme "full" -}} {{- with $.Resources.GetMatch "featured-image" -}} {{- if lt 1600 .Width -}} {{- $fullImage = (.Resize "1600x q100").Permalink -}} {{- else -}} {{- $fullImage = .Permalink -}} {{- end -}} {{- end -}} {{- end -}} {{- end -}} {{- end -}} {{- end -}}
{{- if and (or (eq $pageTheme "classic") (eq $pageTheme "wide")) (not $pageImageHidden) -}} {{- with $image -}}
{{- end -}} {{- end -}} {{ if eq ($params.authorHidden | default false) false }} {{- $authorName := $params.author | default .Site.Author.name | default " " -}} {{- if and (not (eq $authorName " ")) (not (eq $pageTheme "hero")) -}} {{ $author := index .Site.Data.authors $authorName }} {{- end -}} {{- end -}} {{- /* Static TOC */ -}} {{- if ne $toc.enable false -}}
{{ T "contents" }}
{{- dict "Content" .TableOfContents "Ruby" $params.ruby "Fraction" $params.fraction | partial "function/content.html" | safeHTML -}}
{{- end -}} {{- /* Content */ -}} {{- with .Site.Params.dateformat | default "2006-01-02" | .Lastmod.Format -}} {{- $updateDate := . -}} {{- if not (eq . ($.Site.Params.dateformat | default "2006-01-02" | $.PublishDate.Format)) -}} {{- with $params.upd -}}

{{- dict "Date" $updateDate | T "updatedOnDate" -}}: {{ $params.upd }}

{{- else -}} {{- dict "Date" . | T "updatedOnDate" -}} {{- end -}} {{- end -}} {{- end -}} {{- dict "Content" .Content "Ruby" $params.ruby "Fraction" $params.fraction | partial "function/content.html" | safeHTML -}}
{{- /* Footer Post */ -}} {{- partial "single/footer.html" . -}}
{{- partial "plugin/share.html" . -}}
{{- $comment := .Site.Params.Comment -}} {{- if ($params.comment.enable | default $comment.enable) -}}
{{- $authorComment := $params.authorComment -}} {{- if not (eq $authorName " ") -}} {{- if $authorComment -}}
{{ $author.full_name }}
{{ $authorComment }}
{{- end -}} {{- end -}} {{- /* Comment */ -}} {{- partial "comment.html" . -}}
{{- end -}}
{{ if ne $viewCounter nil}} {{- end -}} {{- end -}}