From 3e7f1e28b0932483ac7f257b3e51a46ab0cf560e Mon Sep 17 00:00:00 2001 From: Jaemin Choi <1dotolee@gmail.com> Date: Sun, 12 Nov 2023 14:16:24 +0900 Subject: [PATCH] feat: customize main avatar animation --- layouts/_default/list.html | 92 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 layouts/_default/list.html diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..e209516 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,92 @@ +{{ define "main" }} + + +{{ if and .Title (eq .Type "tags") }} +

#{{ .Title }}

+{{ end }} + + +{{ $pages := union .RegularPages .Sections }} +{{ if .IsHome }} +{{ $pages = where site.RegularPages "Type" "in" site.Params.mainSections }} +{{ end }} + + +{{ $paginator := .Paginate $pages }} {{ range $index, $page := $paginator.Pages +}} + + +{{ if and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) }} + +{{ $avatar_url := $.Scratch.Get "avatar_url" }} +{{ if or $avatar_url site.Params.name }} +
+ {{ if $avatar_url }} +
+ {{ site.Params.name | default site.Title }} + +
+ {{ end }} + {{ if site.Params.name }} +
+

{{ site.Params.name }}

+
+ {{ site.Params.bio | default (print `A personal blog by ` + site.Params.name) }} +
+
+ {{ end }} +
+{{ end }} + +{{ end }} + +
+ {{ if gt .Weight 0 }} + Featured + {{ end }} +

{{ .Title }}

+ + {{ .Title }} +
+{{ end }} + + +{{ if gt $paginator.TotalPages 1 }} + +{{ end }} + +{{ end }}