Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/uPagge/uBlogger.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/block')
-rw-r--r--layouts/partials/block/author.html17
-rw-r--r--layouts/partials/block/see-also.html15
2 files changed, 32 insertions, 0 deletions
diff --git a/layouts/partials/block/author.html b/layouts/partials/block/author.html
new file mode 100644
index 0000000..2dd7d10
--- /dev/null
+++ b/layouts/partials/block/author.html
@@ -0,0 +1,17 @@
+{{ $authorName := . }}
+{{ $author := "" }}
+{{- $authorPath := print "data/authors/" $authorName ".json" -}}
+{{ if (fileExists $authorPath) -}}
+{{ $author = index site.Data.authors $authorName }}
+{{ end }}
+{{- if ne $authorName " " -}}
+{{- with $author -}}
+<div class="block-author">
+ <div class="author-avatar"><a href="{{ with .link }} {{- . | safeHTML -}}{{ end }}" target="_blank"><img alt="{{ .about }}" src="{{ with .avatar }} {{- . | safeHTML -}}{{ end }}"></a></div>
+ <div class="author-info">
+ <div class="name"><a href="{{ with .link }} {{- . | safeHTML -}}{{ end }}" target="_blank">{{ .full_name }}</a></div>
+ <div class="number-posts">{{ .about }}</span></div>
+ </div>
+</div>
+{{- end -}}
+{{- end -}} \ No newline at end of file
diff --git a/layouts/partials/block/see-also.html b/layouts/partials/block/see-also.html
new file mode 100644
index 0000000..2c7f716
--- /dev/null
+++ b/layouts/partials/block/see-also.html
@@ -0,0 +1,15 @@
+{{ $posts := where site.RegularPages "Section" "blog"}}
+{{ $related := site.RegularPages.RelatedIndices . "tags" | first 3 }}
+{{ if eq (len $related) 0 }}
+{{ $related = $posts.ByDate | first 3 }}
+{{ end }}
+{{ with $related }}
+<aside class="see-also" style="margin:0">
+ <span class="see-title">{{ T `seeAlso` }}</span>
+ <ul>
+ {{ range . }}
+ <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
+ {{ end }}
+ </ul>
+ {{ end }}
+</aside> \ No newline at end of file