diff options
author | uPagge <git@upagge.ru> | 2021-03-03 15:41:06 +0300 |
---|---|---|
committer | uPagge <git@upagge.ru> | 2021-03-03 15:41:06 +0300 |
commit | b57bedd590c09a1079113325d8d40af0d3667912 (patch) | |
tree | fed5fb654fd97025e5d572bbbbbfb4aff5a47104 /layouts | |
parent | c6a02b03e1744f36dd4ffe31e710ff22805b37df (diff) |
poststyle
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/partials/plugin/share.html | 2 | ||||
-rw-r--r-- | layouts/partials/single/footer.html | 31 | ||||
-rw-r--r-- | layouts/posts/single.html | 23 |
3 files changed, 28 insertions, 28 deletions
diff --git a/layouts/partials/plugin/share.html b/layouts/partials/plugin/share.html index fc479ed..b32ff0f 100644 --- a/layouts/partials/plugin/share.html +++ b/layouts/partials/plugin/share.html @@ -1,8 +1,6 @@ {{- $share := (.Scratch.Get "params").share | default dict -}} {{- if $share.enable -}} - -<div class="share-text">Поделиться статьей</div> {{- /* 000: Telegram */ -}} {{- if $share.Telegram -}} <div class="share-link"> diff --git a/layouts/partials/single/footer.html b/layouts/partials/single/footer.html index b57cc45..2fb040e 100644 --- a/layouts/partials/single/footer.html +++ b/layouts/partials/single/footer.html @@ -1,27 +1,11 @@ {{- $params := .Scratch.Get "params" -}} {{- $pageTheme := $params.Theme | default .Site.Params.Page.theme | default "classic" -}} +{{ with $params.button }} <div class="post-info-share"> - {{- partial "plugin/share.html" . -}} - <a class="button button-big button-red" style="margin-top: 20px">Поблагодарить автора</a> + <a href="{{ .link }}" class="button button-big button-red">{{ .text }}</a> </div> - -{{- $authorName := $params.author | default .Site.Author.name | default " " -}} -{{- if and (not (eq $authorName " ")) (not (eq $pageTheme "hero")) -}} -{{ $author := index .Site.Data.authors $authorName }} -<div class="footer-post-author" {{- if not $author.ps -}} style="border-radius: 10px;border-bottom: solid 2px #DDD" {{- end -}}> - <div class="author-avatar"><a href="{{ with $author.link }} {{- . | safeHTML -}}{{ end }}" target="_blank"><img alt="" src="{{ with $author.avatar }} {{- . | safeHTML -}}{{ end }}" border="0"></a></div> - <div class="author-info"> - <div class="name"><a href="{{ with $author.link }} {{- . | safeHTML -}}{{ end }}" target="_blank">{{ $author.full_name }}</a></div> - <div class="number-posts">{{ $author.about }}</span></div> - </div> -</div> -{{- if $author.ps -}} -<div class="footer-donate"> - <div>{{- $author.ps | safeHTML -}}</div> -</div> -{{- end -}} -{{- end -}} +{{ end }} <div class="post-footer" id="post-footer"> {{- if and (or .PrevInSection .NextInSection) $params.showPostNav -}} @@ -39,3 +23,12 @@ </div> {{- end -}} </div> + +{{- with .Params.tags -}} +<div class="post-tags"> + {{- range $index, $value := . -}} + {{- $tag := partialCached "function/path.html" $value $value | printf "/tags/%v" | $.Site.GetPage -}} + <a href="{{ $tag.RelPermalink }}" class="tag">{{ $tag.Title }}</a> + {{- end -}} +</div> +{{- end -}} diff --git a/layouts/posts/single.html b/layouts/posts/single.html index c18eebe..9ea6944 100644 --- a/layouts/posts/single.html +++ b/layouts/posts/single.html @@ -196,6 +196,18 @@ {{- end -}} {{- end -}} + {{- $authorName := $params.author | default .Site.Author.name | default " " -}} + {{- if and (not (eq $authorName " ")) (not (eq $pageTheme "hero")) -}} + {{ $author := index .Site.Data.authors $authorName }} + <div class="footer-post-author"> + <div class="author-avatar"><a href="{{ with $author.link }} {{- . | safeHTML -}}{{ end }}" target="_blank"><img alt="" src="{{ with $author.avatar }} {{- . | safeHTML -}}{{ end }}" border="0"></a></div> + <div class="author-info"> + <div class="name"><a href="{{ with $author.link }} {{- . | safeHTML -}}{{ end }}" target="_blank">{{ $author.full_name }}</a></div> + <div class="number-posts">{{ $author.about }}</span></div> + </div> + </div> + {{- end -}} + {{- /* Static TOC */ -}} {{- if ne $toc.enable false -}} <div class="details toc" id="toc-static" data-kept="{{ if $toc.keepStatic }}true{{ end }}"> @@ -237,14 +249,11 @@ <div id="toc-final"></div> </article> -{{- with .Params.tags -}} - <div class="{{ if $toc.keepStatic }} post-tags {{ else }} post-tags post-tags-toc {{ end }}"> - {{- range $index, $value := . -}} - {{- $tag := partialCached "function/path.html" $value $value | printf "/tags/%v" | $.Site.GetPage -}} - <a href="{{ $tag.RelPermalink }}" class="tag">{{ $tag.Title }}</a> - {{- end -}} + + <div class="{{ if $toc.keepStatic }} post-share {{ else }} post-share post-share-toc {{ end }}"> + {{- partial "plugin/share.html" . -}} </div> -{{- end -}} + {{- $comment := .Site.Params.Comment -}} {{- if $comment.enable -}} |