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-09 18:32:20 +0300
committerWang Chucheng <me@wangchucheng.com>2021-01-09 18:32:20 +0300
commit4b342ebeba8aeccc95cde1845bab3019871e16eb (patch)
treefddbfda4c982b479c298ae106954b997ba978a46 /layouts
parent5dc7ff79f70f8a321a072f11b3bbaa85e4ac1f91 (diff)
fix: readMore link
Closes #28
Diffstat (limited to 'layouts')
-rw-r--r--layouts/partials/components/summary-card.html2
-rw-r--r--layouts/partials/components/summary-masonry.html2
-rw-r--r--layouts/partials/widgets/pages.html61
3 files changed, 34 insertions, 31 deletions
diff --git a/layouts/partials/components/summary-card.html b/layouts/partials/components/summary-card.html
index f38d6b7..4e9a1d5 100644
--- a/layouts/partials/components/summary-card.html
+++ b/layouts/partials/components/summary-card.html
@@ -1,3 +1,3 @@
-<div class="bg-secondary-bg rounded border shadow hover:shadow-lg transition ease-in-out duration-200 px-6 pt-6 pb-4">
+<div class="bg-secondary-bg rounded border hover:shadow-lg transition ease-in-out duration-200 px-6 pt-6 pb-4">
{{ partial "components/summary-plain" . }}
</div> \ No newline at end of file
diff --git a/layouts/partials/components/summary-masonry.html b/layouts/partials/components/summary-masonry.html
index 1ee347a..2e25854 100644
--- a/layouts/partials/components/summary-masonry.html
+++ b/layouts/partials/components/summary-masonry.html
@@ -1,4 +1,4 @@
-<div class="bg-secondary-bg rounded overflow-hidden border shadow hover:shadow-lg transition ease-in-out duration-200">
+<div class="bg-secondary-bg rounded overflow-hidden border hover:shadow-lg transition ease-in-out duration-200">
{{ $featured := partial "utils/get-featured" . }}
{{ with $featured }}
{{ . }}
diff --git a/layouts/partials/widgets/pages.html b/layouts/partials/widgets/pages.html
index be201b0..a995a61 100644
--- a/layouts/partials/widgets/pages.html
+++ b/layouts/partials/widgets/pages.html
@@ -1,49 +1,52 @@
{{ if not .Params.widget.sidebar.position }}
-<h2 class=" font-bold text-3xl my-4">{{ .Params.Title }}</h2>
+ <h2 class=" font-bold text-3xl my-4">{{ .Params.Title }}</h2>
{{ end }}
{{ if eq .Params.style "plain" }}
-{{ partial "widgets/pages-plain" . }}
+ {{ partial "widgets/pages-plain" . }}
{{ else if eq .Params.style "masonry" }}
-{{ partial "widgets/pages-masonry" . }}
+ {{ partial "widgets/pages-masonry" . }}
{{ else }}
-{{ partial "widgets/pages-card" . }}
+ {{ partial "widgets/pages-card" . }}
{{ end }}
{{ define "partials/widgets/pages-get" }}
-{{- $section := .Site.GetPage .Params.section }}
-{{ $pages := $section.Pages }}
-{{ $count := .Params.count | default 5 }}
-{{ with $count }}
-{{ $pages = first $count $pages }}
-{{ end }}
-{{ return $pages }}
+ {{- $section := .Site.GetPage .Params.section }}
+ {{ $pages := $section.Pages }}
+ {{ $count := .Params.count | default 5 }}
+ {{ with $count }}
+ {{ $pages = first $count $pages }}
+ {{ end }}
+ {{ return $pages }}
{{ end }}
{{ define "partials/widgets/pages-plain" }}
-{{ $pages := partial "widgets/pages-get" . }}
-{{ partial "components/summary-list-plain" $pages }}
-<div class="pt-2 hover:text-eureka">
- <a href="{{ .Permalink }}" class="font-semibold">{{ i18n "readMore" }}</a>
- <i class="fas fa-caret-right ml-1"></i>
-</div>
+ {{ $pages := partial "widgets/pages-get" . }}
+ {{ partial "components/summary-list-plain" $pages }}
+ <div class="pt-2 hover:text-eureka">
+ {{ partial "widgets/pages-readmore" . }}
+ </div>
{{ end }}
{{ define "partials/widgets/pages-card" }}
-{{ $pages := partial "widgets/pages-get" . }}
-<div class="overflow-hidden">
- {{ partial "components/summary-list-card" $pages }}
- <div class="px-8 pt-2 hover:text-eureka">
- <a href="{{ .Permalink }}" class="font-semibold">{{ i18n "readMore" }}</a>
- <i class="fas fa-caret-right ml-1"></i>
+ {{ $pages := partial "widgets/pages-get" . }}
+ <div class="overflow-hidden">
+ {{ partial "components/summary-list-card" $pages }}
+ <div class="px-8 pt-2 hover:text-eureka">
+ {{ partial "widgets/pages-readmore" . }}
+ </div>
</div>
-</div>
{{ end }}
{{ define "partials/widgets/pages-masonry" }}
-<div class="pb-2 text-right hover:text-eureka">
- <a href="{{ .Permalink }}" class="font-semibold">{{ i18n "readMore" }}</a>
+ <div class="pb-2 text-right hover:text-eureka">
+ {{ partial "widgets/pages-readmore" . }}
+ </div>
+ {{ $pages := partial "widgets/pages-get" . }}
+ {{ partial "components/summary-list-masonry" $pages }}
+{{ end }}
+
+{{ define "partials/widgets/pages-readmore" }}
+ {{- $section := .Site.GetPage .Params.section }}
+ <a href="{{ $section.Permalink }}" class="font-semibold">{{ i18n "readMore" }}</a>
<i class="fas fa-caret-right ml-1"></i>
-</div>
-{{ $pages := partial "widgets/pages-get" . }}
-{{ partial "components/summary-list-masonry" $pages }}
{{ end }} \ No newline at end of file