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

github.com/wangchucheng/hugo-eureka.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWang Chucheng <me@wangchucheng.com>2021-01-18 18:46:25 +0300
committerWang Chucheng <me@wangchucheng.com>2021-01-18 18:46:25 +0300
commita8872ba648f449db7d9500813ad28ac533fce709 (patch)
treeb9dfe736e6deb2f3f21808d85ff67d6c5435695c /layouts
parent4b342ebeba8aeccc95cde1845bab3019871e16eb (diff)
style: author page
Diffstat (limited to 'layouts')
-rw-r--r--layouts/_default/baseof.html40
-rw-r--r--layouts/authors/list.html68
-rw-r--r--layouts/index.html2
-rw-r--r--layouts/partials/components/post-author.html2
-rw-r--r--layouts/partials/widgets/about.html86
5 files changed, 76 insertions, 122 deletions
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" . }}
<body class="flex flex-col min-h-screen">
- <header class="fixed flex items-center w-full min-h-16 pl-scrollbar z-50 bg-secondary-bg shadow-sm">
- <div class="w-full max-w-screen-xl mx-auto">
- {{- partial "header" . -}}
- </div>
- </header>
- <main class="flex-grow pt-16">
- {{- if .IsHome }}
+ <header class="fixed flex items-center w-full min-h-16 pl-scrollbar z-50 bg-secondary-bg shadow-sm">
+ <div class="w-full max-w-screen-xl mx-auto">
+ {{- partial "header" . -}}
+ </div>
+ </header>
+ <main class="flex-grow pt-16">
+ {{- if or .IsHome (eq .Type "authors") }}
+ {{- block "main" . }}{{- end }}
+ {{- else }}
+ <div class="pl-scrollbar">
+ <div class="w-full max-w-screen-xl lg:px-4 xl:px-8 mx-auto">
{{- block "main" . }}{{- end }}
- {{- else }}
- <div class="pl-scrollbar">
- <div class="w-full max-w-screen-xl lg:px-4 xl:px-8 mx-auto">
- {{- block "main" . }}{{- end }}
- </div>
- </div>
- {{ end }}
- </main>
- <footer class="pl-scrollbar">
- <div class="w-full max-w-screen-xl mx-auto">
- {{- partial "footer" . -}}
- </div>
- </footer>
+ </div>
+ </div>
+ {{ end }}
+ </main>
+ <footer class="pl-scrollbar">
+ <div class="w-full max-w-screen-xl mx-auto">
+ {{- partial "footer" . -}}
+ </div>
+ </footer>
</body>
</html> \ 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" }}
-<div class="lg:pt-12">
- <div class="bg-secondary-bg rounded primary-text px-6 md:px-16 lg:px-32">
- <div class="flex flex-col lg:flex-row items-center justify-center py-12">
- {{ $img := partial "utils/get-image" (dict "context" . "url" .Params.avatar "keyword" "*avatar*")}}
- {{ with $img }}
- <div class="w-48 mx-auto lg:-my-8 lg:ml-0 lg:mr-8 lg:pr-8 lg:py-8 lg:border-r">
- <img src="{{ . }}" class="rounded-full" alt="Avatar">
- </div>
- {{ end }}
- <div class="flex-grow mt-4 md:mt-0">
- <div class="text-3xl leading-tight py-4">{{ .Title }}</div>
- <div class="w-3/12 xl:w-2/12 border-b"></div>
-
- <div class="flex items-center pt-4">
- {{ with or (.Params.role) (.Params.organizations)}}
- <i class="fas fa-user-tag"></i>
- {{ end }}
- <div class="flex flex-wrap">
- {{ with .Params.role }}
- <span class="pl-4">{{ . }}</span>
- {{ end }}
-
- {{ with .Params.organization }}
- <a href="{{ .url }}" class="pl-4">{{ .name }}</a>
- {{ end }}
- </div>
-
- </div>
-
- {{ with .Params.bio }}
- <div class="py-8 text-lg leading-normal">
- {{ . }}
- </div>
- {{ end }}
- </div>
- <div class="flex lg:flex-col justify-center items-end ml-8">
- {{ $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 }}
- <div class="pb-2 pr-4 lg:pr-0 pt-4 lg:pt-0">
- <a href="{{ .url }}"><i class="{{ print $src }}"></i></a>
- </div>
- {{ end }}
- </div>
- </div>
- <div class="content pb-20">
- {{ .Content }}
- </div>
+<div class="pl-scrollbar bg-secondary-bg">
+ <div class="max-w-screen-xl mx-auto">
+ <div class="lg:w-3/4 mx-auto px-6 md:px-8 xl:px-12 py-12">
+ {{ partial "widgets/about" . }}
</div>
- {{ $pages := .Pages }}
- {{ partial "components/masonry" $pages }}
+ </div>
+</div>
+<div class="pl-scrollbar bg-primary-bg">
+ <div class="max-w-screen-xl mx-auto">
+ <div class="lg:w-3/4 mx-auto px-6 md:px-8 xl:px-12 py-12">
+ {{ partial "components/summary-list-plain" .Pages }}
+ </div>
+ </div>
</div>
{{ 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") }}
<div class="flex flex-col {{ if eq $sidebar.position "right" -}} lg:flex-row-reverse {{- else -}} lg:flex-row {{- end }}">
- {{ if $sidebar.position }}
<div class="flex-none {{ with $scaleClass -}}{{ partial "utils/standardize-classes" . }}{{- end }} {{ if eq $sidebar.position "left" -}} lg:mr-4 {{- else -}} lg:ml-4 {{- end }}">
<h2 class="font-bold text-3xl my-4">{{ .Params.Title }}</h2>
</div>
- {{ end }}
<div class="flex-grow {{ if eq $sidebar.position "right" -}} lg:mr-4 {{- else -}} lg:ml-4 {{- end }}">
{{ partial (printf "widgets/%s" .Params.widget.handler) . }}
</div>
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 }}
<a href="{{ .url }}" class="mr-1">
<i class="{{ print $src }}"></i>
</a>
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 @@
-<div class="flex flex-col lg:flex-row items-center justify-center py-12">
- {{ $img := partial "utils/get-image" (dict "context" . "url" .Params.avatar "keyword" "*avatar*")}}
- {{ with $img }}
- <div class="w-48 mx-auto lg:-my-8 lg:ml-0 lg:mr-8 lg:pr-8 lg:py-8 lg:border-r">
- <img src="{{ . }}" class="rounded-full" alt="Avatar">
+<div class="flex flex-col md:flex-row items-center justify-center mb-12">
+ {{ $img := partial "utils/get-image" (dict "context" . "url" .Params.avatar "keyword" "*avatar*")}}
+ {{ with $img }}
+ <div class="flex-none w-48 mx-auto md:ml-0 md:mr-8 md:pr-8 md:border-r">
+ <img src="{{ . }}" class="rounded-full" alt="Avatar">
</div>
- {{ end }}
- <div class="flex-grow mt-4 md:mt-0">
- <div class="text-3xl leading-tight py-4">{{ .Title }}</div>
- <div class="w-3/12 xl:w-2/12 border-b"></div>
-
- <div class="flex items-center pt-4">
- {{ with or (.Params.role) (.Params.organizations)}}
- <i class="fas fa-user-tag"></i>
- {{ end }}
- <div class="flex flex-wrap">
- {{ with .Params.role }}
- <span class="pl-4">{{ . }}</span>
- {{ end }}
-
- {{ with .Params.organization }}
- <a href="{{ .url }}" class="pl-4">{{ .name }}</a>
- {{ end }}
- </div>
+ {{ end }}
+ <div class="flex-grow mt-4 md:mt-0">
+ <div class="text-3xl py-4">{{ .Title }}</div>
+ <div class="w-3/12 xl:w-2/12 border-b"></div>
- </div>
+ <div class="flex items-center pt-4">
+ {{ with or (.Params.role) (.Params.organizations)}}
+ <i class="fas fa-user"></i>
+ {{ end }}
+ <div class="flex flex-wrap">
+ {{ with .Params.role }}
+ <span class="pl-4">{{ . }}</span>
+ {{ end }}
- {{ with .Params.bio }}
- <div class="py-8 text-lg leading-normal">
- {{ . }}
- </div>
+ {{ with .Params.organization }}
+ <a href="{{ .url }}" class="pl-4">{{ .name }}</a>
{{ end }}
+ </div>
+
</div>
- <div class="flex lg:flex-col justify-center items-end ml-8">
- {{ $brand := $.Param "social"}}
- {{ range $brand }}
- {{/* Deprecation warning(v1.0.0) starts */}}
- {{ if .icon_pack }}
+
+ {{ with .Params.bio }}
+ <div class="py-8 text-lg leading-normal">
+ {{ . }}
+ </div>
+ {{ end }}
+ </div>
+ <div class="flex md:flex-col justify-center items-end ml-8">
+ {{ $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 }}
- <div class="pb-2 pr-4 lg:pr-0 pt-4 lg:pt-0">
- <a href="{{ .url }}"><i class="{{ print $src }}"></i></a>
- </div>
- {{ end }}
- </div>
+ {{ end }}
+ {{ $iconPack := .iconPack | default .icon_pack }}
+ {{/* Deprecation warning(v1.0.0) ends */}}
+ {{ $src := print $iconPack " fa-" .icon }}
+ <div class="pb-2 pr-4 md:pr-0 pt-4 md:pt-0">
+ <a href="{{ .url }}"><i class="{{ print $src }}"></i></a>
+ </div>
+ {{ end }}
+ </div>
</div>
<div class="content">
- {{ .Content }}
+ {{ .Content }}
</div> \ No newline at end of file