{{- 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 "twitter-card" -}} {{- $params := .Scratch.Get "params" -}} {{ $twitterImage := ""}} {{- with .Resources.GetMatch "featured-image" -}} {{- if lt 4095 .Width -}} {{- $twitterImage = (.Resize "4095x q100").Permalink -}} {{- else -}} {{- $twitterImage = .Permalink -}} {{- end -}} {{- end -}} {{- with $params.Images -}} {{- $twitterImage = index . 0 -}} {{- end -}} {{- with ($params.twitter | default .Site.Params.Social.Twitter ) -}} {{- 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 := "" }} {{- $authorPath := print "data/authors/" $authorName ".json" -}} {{ if (fileExists $authorPath) -}} {{ $author = index .Site.Data.authors $authorName }} {{ end }} {{ $postArticle := $params.seo.postArticle | default true }} {{ if $postArticle }}
{{ end }}
{{ if eq $pageTheme "hero" }} {{- $heroImage := "" -}} {{- with .Resources.GetMatch "featured-image" -}} {{- if lt 2000 .Width -}} {{- $heroImage = (.Resize "2000x q100").Permalink -}} {{- else -}} {{- $heroImage = .Permalink -}} {{- end -}} {{- end -}}

{{ $.Title }}

{{ $params.subtitle }}

{{ with $author }} {{ end }}
{{ 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 2000 .Width -}} {{- $fullImage = (.Resize "2000x 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 -}} {{- /* 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 -}}
{{- if not $params.hiddenFooter -}}
{{- /* Footer Post */ -}} {{- partial "single/footer.html" . -}}
{{- end -}}
{{ if $postArticle }}
{{ end }} {{- if not $params.hiddenUnderPost -}} {{- partial "under-post.html" . -}} {{- end -}} {{- $comment := .Site.Params.Comment -}} {{- if ($params.comment.enable | default $comment.enable) -}}

Комментарии

{{- $authorComment := $params.authorComment -}} {{- if $authorComment -}} {{- with $author -}}
{{ .full_name }}
{{ .full_name }}
{{ $authorComment }}
{{- end -}} {{- end -}} {{- /* Comment */ -}} {{- partial "comment.html" . -}}
{{- end -}}
{{ if ne $viewCounter nil }} {{- end -}} {{- end -}}