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

github.com/wlh320/hugo-theme-hulga.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzilcH40 <wlh233@live.com>2022-09-14 19:21:52 +0300
committerzilcH40 <wlh233@live.com>2022-09-14 19:21:52 +0300
commit84a7aca340d301ea15700035d5a611a0ad9207d9 (patch)
treec4c645fad4b9f25145a939c56b0f9eade0bae7b3
parentc6535284e9a632d58670f26a4e7689c73e868a8c (diff)
fix small bugs
- revert wrong toc logic in last commit - fix display extra character in title when subtitle is not set - fix unnecessary hover effect of fake button on navbar
-rw-r--r--README.md21
-rw-r--r--assets/css/common.scss1
-rw-r--r--layouts/_default/term.html2
-rw-r--r--layouts/partials/head.html4
-rw-r--r--layouts/partials/post.html2
5 files changed, 17 insertions, 13 deletions
diff --git a/README.md b/README.md
index b04d064..0ad5d2d 100644
--- a/README.md
+++ b/README.md
@@ -73,31 +73,34 @@ theme = "hulga"
# copyright text on footer
copyright = "Copyright © 2020 wlh. All rights reserved."
- # enable katex rendering on every post page
- math = true
+ # enable katex rendering on every post page, default false
+ math = false
- # enable postcss, mainly for css purge (129kB->20kB->4.8kB gzipped, but this makes build slower)
+ # enable postcss, mainly for css purge (129kB->20kB->4.8kB gzipped, but this makes build slower), default false
postcss = true
# enable showing content summary below post title in home page, default false
showSummary = true
- # enable toc on every post page
+ # set paginate on taxonomy term page (tags or categories), default 10
+ termPaginate = 3
+
+ # enable toc on every post page, default false
toc = true
- # enable TOC auto collapse
+ # enable TOC auto collapse, default false
autoCollapseToc = true
- # enable prefers-color-scheme:dark
+ # enable prefers-color-scheme:dark, default false
darkMedia = true
- # enable hero section's is-bold effect
+ # enable hero section's is-bold effect, default false
heroBold = false
- # enable hero section that looks like steam deck's home page
+ # enable hero section that looks like steam deck's home page, default false
heroSteamDeck = false
- # enable PWA, prepare your icons and DON'T forget to modify manifest.json
+ # enable PWA, prepare your icons and DON'T forget to modify manifest.json, default false
pwa = true
# disable jsdelivr cdn, default false
diff --git a/assets/css/common.scss b/assets/css/common.scss
index 8c42822..542ea07 100644
--- a/assets/css/common.scss
+++ b/assets/css/common.scss
@@ -67,6 +67,7 @@ body {
}
.fake-text {
color: transparent !important;
+ pointer-events: none;
}
.shadow-hero {
box-shadow: 0 0 1.2rem 0 rgba(0, 0, 0, 0.25);
diff --git a/layouts/_default/term.html b/layouts/_default/term.html
index 94de3c4..d55f674 100644
--- a/layouts/_default/term.html
+++ b/layouts/_default/term.html
@@ -22,7 +22,7 @@
</nav>
{{ end }}
<div class="post-lists">
- {{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
+ {{ $paginator := .Paginate (where .Data.Pages "Type" "post") (.Site.Params.termPaginate | default 10) }}
{{ range $paginator.Pages }}
<div class="box post-box">
<div class="post-box-title">
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index be8e90f..c1b9d50 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -8,8 +8,8 @@
<meta name="theme-color" content="{{.Site.Params.primaryColor}}">
{{- end -}}
{{- if .IsHome -}}
- <title>{{ .Site.Title }} | {{ .Site.Params.subtitle }}</title>
- <meta property="og:title" content="{{ .Site.Title }} | {{ .Site.Params.subtitle }}">
+ <title>{{ .Site.Title }} {{- if .Site.Params.subtitle }} | {{ .Site.Params.subtitle }} {{- end -}}</title>
+ <meta property="og:title" content="{{ .Site.Title }} {{- if .Site.Params.subtitle }} | {{ .Site.Params.subtitle }} {{- end -}}">
<meta property="og:type" content="website">
{{ if .Site.Params.keywords }}
<meta name="keywords" content="{{.Site.Params.keywords}}">
diff --git a/layouts/partials/post.html b/layouts/partials/post.html
index 0d27aee..63c9d7c 100644
--- a/layouts/partials/post.html
+++ b/layouts/partials/post.html
@@ -1,5 +1,5 @@
{{ partial "post-header.html" . }}
-{{- $setToc := or .Params.toc .Site.Params.toc -}}
+{{- $setToc := or .Params.toc (and .Site.Params.toc (ne .Params.toc false)) -}}
{{- $headers := findRE "<h[1-3].*?>(.|\n])+?</h[1-3]>" .Content -}}
{{- $hasToc := ge (len $headers) 1 -}}
{{- $showToc := and $setToc $hasToc -}}