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

github.com/xianmin/hugo-theme-jane.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChen Xianmin <xianmin12@gmail.com>2018-05-02 16:52:35 +0300
committerChen Xianmin <xianmin12@gmail.com>2018-05-02 16:52:35 +0300
commit4acec8167e3908945e1efa6d1020923088d52b09 (patch)
tree6ed871e326cae3324f36c66cf7348b337de86737
parentf4967d2ae78d0aab6f7cab77e92b2ac0f635f74f (diff)
conifg: default use photoswipe, compatibility both photoswipe & fancybox
-rw-r--r--dev-config.toml2
-rw-r--r--exampleSite/config.toml2
-rw-r--r--layouts/_default/baseof.html2
-rw-r--r--layouts/partials/scripts.html2
4 files changed, 4 insertions, 4 deletions
diff --git a/dev-config.toml b/dev-config.toml
index a94d0e9..2e98d0a 100644
--- a/dev-config.toml
+++ b/dev-config.toml
@@ -132,7 +132,7 @@ defaultContentLanguage = "en" # Default language to use (if you setup multiling
# 一些全局开关,你也可以在每一篇内容的 front matter 中针对单篇内容关闭或开启某些功能,在 archetypes/default.md 查看更多信息。
# Some global options, you can also close or open something in front matter for a single post, see more information from `archetypes/default.md`.
toc = true # 是否开启目录
- fancybox = true # see https://github.com/fancyapps/fancybox # 是否启用fancybox(图片可点击)
+ photoswipe = true # see https://github.com/dimsemenov/PhotoSwipe # 是否启用PhotoSwipe(图片可点击)
bootcdn = false # In china. @Deprecated: use [params.publicCDN] # 是否使用bootcdn(@Deprecated: 请使用[params.publicCDN])
mathjax = false # see https://www.mathjax.org/ # 是否使用mathjax(数学公式)
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 17e72db..04acb84 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -85,7 +85,7 @@ defaultContentLanguage = "en" # Default language to use
# 一些全局开关,你也可以在每一篇内容的 front matter 中针对单篇内容关闭或开启某些功能,在 archetypes/default.md 查看更多信息。
# Some global options, you can also close or open something in front matter for a single post, see more information from `archetypes/default.md`.
toc = true # 是否开启目录
- fancybox = true # see https://github.com/fancyapps/fancybox # 是否启用fancybox(图片可点击)
+ photoswipe = true # see https://github.com/dimsemenov/PhotoSwipe # 是否启用PhotoSwipe(图片可点击)
bootcdn = false # In china. @Deprecated: use [params.publicCDN] # 是否使用bootcdn(@Deprecated: 请使用[params.publicCDN])
mathjax = false # see https://www.mathjax.org/ # 是否使用mathjax(数学公式)
contentCopyright = '<a rel="license noopener" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank">CC BY-NC-ND 4.0</a>'
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index 3ead6bb..4383d01 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -12,7 +12,7 @@
</head>
<body>
{{ partial "slideout.html" . }}
- {{ if .Site.Params.fancybox }}
+ {{ if or .Site.Params.photoswipe .Site.Params.fancybox }}
{{ partial "photoswipe.html" }}
{{ end }}
<header id="header" class="header container">
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
index 24c1857..5ac2a26 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -67,7 +67,7 @@
{{- end }}
<!-- Load PhotoSwipe js if the load-photoswipe shortcode has been used -->
-{{ if .Site.Params.fancybox }}
+{{ if or .Site.Params.photoswipe .Site.Params.fancybox }}
{{ if .Site.Params.bootcdn }}
<script src="{{ " /js/load-photoswipe.js " | relURL }}"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/photoswipe/4.1.1/photoswipe.min.js" integrity="sha256-UplRCs9v4KXVJvVY+p+RSo5Q4ilAUXh7kpjyIP5odyc="