From a8872ba648f449db7d9500813ad28ac533fce709 Mon Sep 17 00:00:00 2001 From: Wang Chucheng Date: Mon, 18 Jan 2021 23:46:25 +0800 Subject: style: author page --- layouts/_default/baseof.html | 40 ++++++------- layouts/authors/list.html | 68 ++++------------------ layouts/index.html | 2 - layouts/partials/components/post-author.html | 2 +- layouts/partials/widgets/about.html | 86 ++++++++++++++-------------- 5 files changed, 76 insertions(+), 122 deletions(-) (limited to 'layouts') diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 37360b6..f3ecdce 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -3,27 +3,27 @@ {{- partial "head" . }} -
-
- {{- partial "header" . -}} -
-
-
- {{- if .IsHome }} +
+
+ {{- partial "header" . -}} +
+
+
+ {{- if or .IsHome (eq .Type "authors") }} + {{- block "main" . }}{{- end }} + {{- else }} +
+
{{- block "main" . }}{{- end }} - {{- else }} -
-
- {{- block "main" . }}{{- end }} -
-
- {{ end }} -
-
-
- {{- partial "footer" . -}} -
-
+ + + {{ end }} +
+ \ No newline at end of file diff --git a/layouts/authors/list.html b/layouts/authors/list.html index 90d5fb3..d8092c4 100644 --- a/layouts/authors/list.html +++ b/layouts/authors/list.html @@ -1,60 +1,16 @@ {{ define "main" }} -
-
-
- {{ $img := partial "utils/get-image" (dict "context" . "url" .Params.avatar "keyword" "*avatar*")}} - {{ with $img }} -
- Avatar -
- {{ end }} -
-
{{ .Title }}
-
- -
- {{ with or (.Params.role) (.Params.organizations)}} - - {{ end }} -
- {{ with .Params.role }} - {{ . }} - {{ end }} - - {{ with .Params.organization }} - {{ .name }} - {{ end }} -
- -
- - {{ with .Params.bio }} -
- {{ . }} -
- {{ end }} -
-
- {{ $brand := $.Param "social"}} - {{ range $brand }} - {{/* Deprecation warning(v1.0.0) starts */}} - {{ if .icon_pack }} - {{ warnf "Param 'icon_pack' in %q is deprecated and will be removed in Eureka v1.0.0. Use 'iconPack' instead." $.File.Path }} - {{ end }} - {{ $iconPack := .iconPack | default .icon_pack }} - {{/* Deprecation warning(v1.0.0) ends */}} - {{ $src := print $iconPack " fa-" .icon }} -
- -
- {{ end }} -
-
-
- {{ .Content }} -
+
+
+
+ {{ partial "widgets/about" . }}
- {{ $pages := .Pages }} - {{ partial "components/masonry" $pages }} +
+
+
+
+
+ {{ partial "components/summary-list-plain" .Pages }} +
+
{{ end }} \ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html index 84ab544..d648381 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -161,11 +161,9 @@ {{ $scaleOptions := dict "sm" "lg:w-1/5" "md" "lg:w-1/4" "lg" "lg:w-1/3" "xl" "lg:w-1/2" }} {{ $scaleClass := index $scaleOptions $sidebar.scale | default (index $scaleOptions "md") }}
- {{ if $sidebar.position }}

{{ .Params.Title }}

- {{ end }}
{{ partial (printf "widgets/%s" .Params.widget.handler) . }}
diff --git a/layouts/partials/components/post-author.html b/layouts/partials/components/post-author.html index 2695d97..22e4a77 100644 --- a/layouts/partials/components/post-author.html +++ b/layouts/partials/components/post-author.html @@ -16,7 +16,7 @@ {{/* Deprecation warning(v1.0.0) starts */}} {{ $iconPack := .iconPack | default .icon_pack }} {{/* Deprecation warning(v1.0.0) ends */}} - {{ $src := print .icon_pack " fa-" .icon }} + {{ $src := print $iconPack " fa-" .icon }} diff --git a/layouts/partials/widgets/about.html b/layouts/partials/widgets/about.html index e761c53..539c7c4 100644 --- a/layouts/partials/widgets/about.html +++ b/layouts/partials/widgets/about.html @@ -1,52 +1,52 @@ -
- {{ $img := partial "utils/get-image" (dict "context" . "url" .Params.avatar "keyword" "*avatar*")}} - {{ with $img }} -
- Avatar +
+ {{ $img := partial "utils/get-image" (dict "context" . "url" .Params.avatar "keyword" "*avatar*")}} + {{ with $img }} +
+ Avatar
- {{ end }} -
-
{{ .Title }}
-
- -
- {{ with or (.Params.role) (.Params.organizations)}} - - {{ end }} -
- {{ with .Params.role }} - {{ . }} - {{ end }} - - {{ with .Params.organization }} - {{ .name }} - {{ end }} -
+ {{ end }} +
+
{{ .Title }}
+
-
+
+ {{ with or (.Params.role) (.Params.organizations)}} + + {{ end }} +
+ {{ with .Params.role }} + {{ . }} + {{ end }} - {{ with .Params.bio }} -
- {{ . }} -
+ {{ with .Params.organization }} + {{ .name }} {{ end }} +
+
-
- {{ $brand := $.Param "social"}} - {{ range $brand }} - {{/* Deprecation warning(v1.0.0) starts */}} - {{ if .icon_pack }} + + {{ with .Params.bio }} +
+ {{ . }} +
+ {{ end }} +
+
+ {{ $brand := $.Param "social"}} + {{ range $brand }} + {{/* Deprecation warning(v1.0.0) starts */}} + {{ if .icon_pack }} {{ warnf "Param 'icon_pack' in %q is deprecated and will be removed in Eureka v1.0.0. Use 'iconPack' instead." $.File.Path }} - {{ end }} - {{ $iconPack := .iconPack | default .icon_pack }} - {{/* Deprecation warning(v1.0.0) ends */}} - {{ $src := print $iconPack " fa-" .icon }} -
- -
- {{ end }} -
+ {{ end }} + {{ $iconPack := .iconPack | default .icon_pack }} + {{/* Deprecation warning(v1.0.0) ends */}} + {{ $src := print $iconPack " fa-" .icon }} +
+ +
+ {{ end }} +
- {{ .Content }} + {{ .Content }}
\ No newline at end of file -- cgit v1.2.3