Merge pull request #74 from dillonzq/feature/custom_home_page
Feature/custom home page
This commit is contained in:
11
.babelrc
Normal file
11
.babelrc
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"presets": [
|
||||||
|
[
|
||||||
|
"@babel/preset-env",
|
||||||
|
{
|
||||||
|
"targets": "> 0.25%, not dead"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"minify"
|
||||||
|
]
|
||||||
|
}
|
||||||
7
.gitignore
vendored
7
.gitignore
vendored
@@ -1,7 +1,8 @@
|
|||||||
# Hugo default output directory
|
# Hugo default output directory
|
||||||
public
|
public/
|
||||||
/exampleSite/resources
|
/exampleSite/resources/
|
||||||
/exampleSite/zh/resources
|
/exampleSite/zh/resources/
|
||||||
|
node_modules/
|
||||||
|
|
||||||
## OS Files
|
## OS Files
|
||||||
# Windows
|
# Windows
|
||||||
|
|||||||
@@ -1,25 +1,24 @@
|
|||||||
---
|
---
|
||||||
author: ""
|
|
||||||
author_link: ""
|
|
||||||
title: "{{ replace .TranslationBaseName "-" " " | title }}"
|
title: "{{ replace .TranslationBaseName "-" " " | title }}"
|
||||||
date: {{ .Date }}
|
date: {{ .Date }}
|
||||||
lastmod: {{ .Date }}
|
lastmod: {{ .Date }}
|
||||||
draft: true
|
draft: true
|
||||||
|
author: ""
|
||||||
|
authorLink: ""
|
||||||
description: ""
|
description: ""
|
||||||
show_in_homepage: true
|
|
||||||
description_as_summary: false
|
|
||||||
license: ""
|
license: ""
|
||||||
|
|
||||||
tags: []
|
tags: []
|
||||||
categories: []
|
categories: []
|
||||||
|
hiddenFromHomePage: false
|
||||||
|
|
||||||
featured_image: ""
|
featuredImage: ""
|
||||||
featured_image_preview: ""
|
featuredImagePreview: ""
|
||||||
|
|
||||||
comment: true
|
|
||||||
toc: false
|
toc: false
|
||||||
auto_collapse_toc: true
|
autoCollapseToc: true
|
||||||
math: false
|
math: false
|
||||||
|
comment: true
|
||||||
---
|
---
|
||||||
|
|
||||||
<!--more-->
|
<!--more-->
|
||||||
@@ -1,14 +1,9 @@
|
|||||||
@charset 'utf-8';
|
@charset 'utf-8';
|
||||||
|
|
||||||
{{- if eq .Site.Params.home_mode "post" -}}
|
$home-profile: {{- if .Site.Params.home.profile.enable -}}true{{ else }}false{{ end }};
|
||||||
$home-profile: true;
|
$home-posts: {{- if .Site.Params.home.posts.enable -}}true{{ else }}false{{ end }};
|
||||||
$home-posts: true;
|
|
||||||
{{- else -}}
|
|
||||||
$home-profile: true;
|
|
||||||
$home-posts: false;
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- if eq .Site.Params.desktopHeaderMode "normal" -}}
|
{{- if eq .Site.Params.header.desktopMode "normal" -}}
|
||||||
$header-position-desktop: static;
|
$header-position-desktop: static;
|
||||||
$page-padding-top-desktop: 1rem;
|
$page-padding-top-desktop: 1rem;
|
||||||
$post-toc-top: 7rem;
|
$post-toc-top: 7rem;
|
||||||
@@ -18,7 +13,7 @@
|
|||||||
$post-toc-top: 12rem;
|
$post-toc-top: 12rem;
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- if eq .Site.Params.mobileHeaderMode "normal" -}}
|
{{- if eq .Site.Params.header.mobileMode "normal" -}}
|
||||||
$header-position-mobile: static;
|
$header-position-mobile: static;
|
||||||
$page-padding-top-mobile: 1rem;
|
$page-padding-top-mobile: 1rem;
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
|
|||||||
@@ -112,84 +112,47 @@ dateFormatToUse = "2006-01-02"
|
|||||||
keywords = ["Theme", "Hugo"]
|
keywords = ["Theme", "Hugo"]
|
||||||
# site default theme ("light", "dark", "auto")
|
# site default theme ("light", "dark", "auto")
|
||||||
defaultTheme = "auto"
|
defaultTheme = "auto"
|
||||||
# desktop header mode ("fixed", "normal", "auto")
|
|
||||||
desktopHeaderMode = "fixed"
|
|
||||||
# mobile header mode ("fixed", "normal", "auto")
|
|
||||||
mobileHeaderMode = "auto"
|
|
||||||
|
|
||||||
# Home Page Info
|
|
||||||
##home mode ("post", "other")
|
|
||||||
home_mode = "post"
|
|
||||||
## special amount of posts in each home post page
|
|
||||||
home_paginate = 6
|
|
||||||
## URL of avatar shown in home page
|
|
||||||
avatar = "images/avatar.png"
|
|
||||||
## subtitle shown in home page
|
|
||||||
subtitle = "A Clean, Elegant but Advanced Hugo Theme"
|
|
||||||
|
|
||||||
# whether to show social share links in post page
|
|
||||||
socialShare = true
|
|
||||||
|
|
||||||
# Footer CopyRight Info
|
|
||||||
## Site creation time
|
|
||||||
since = 2019
|
|
||||||
## ICP info only in China (HTML format is allowed)
|
|
||||||
icp = ""
|
|
||||||
## license info (HTML format is allowed)
|
|
||||||
license= '<a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a>'
|
|
||||||
|
|
||||||
# public git repo url to link lastmod git commit only then enableGitInfo is true
|
# public git repo url to link lastmod git commit only then enableGitInfo is true
|
||||||
gitRepo = ""
|
gitRepo = ""
|
||||||
|
|
||||||
# mathematical formulas (KaTeX)
|
# Header info
|
||||||
[params.math]
|
[params.header]
|
||||||
enable = true
|
# desktop header mode ("fixed", "normal", "auto")
|
||||||
block_left_delimiter = ""
|
desktopMode = "fixed"
|
||||||
block_right_delimiter = ""
|
# mobile header mode ("fixed", "normal", "auto")
|
||||||
inline_left_delimiter = "$"
|
mobileMode = "auto"
|
||||||
inline_right_delimiter = "$"
|
|
||||||
# KaTeX extension copy_tex
|
|
||||||
copy_tex = true
|
|
||||||
# KaTeX extension mhchem
|
|
||||||
mhchem = true
|
|
||||||
|
|
||||||
# whether to show link to Raw Markdown content of the post
|
# Footer Copyright Info
|
||||||
linkToMarkdown = true
|
[params.footer]
|
||||||
|
# Site creation time
|
||||||
|
since = 2019
|
||||||
|
# ICP info only in China (HTML format is allowed)
|
||||||
|
icp = ""
|
||||||
|
# license info (HTML format is allowed)
|
||||||
|
license= '<a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a>'
|
||||||
|
|
||||||
# site verification code for Google/Bing/Yandex/Pinterest/Baidu
|
# Home Page Info
|
||||||
google_verification = ""
|
[params.home]
|
||||||
bing_verification = ""
|
# Home Page Profile
|
||||||
yandex_verification = ""
|
[params.home.profile]
|
||||||
pinterest_verification = ""
|
enable = true
|
||||||
baidu_verification = ""
|
# Gravatar Email for preferred avatar in home page
|
||||||
|
gravatarEmail = ""
|
||||||
# CSS and JS Files CDN
|
# URL of avatar shown in home page
|
||||||
[params.cdn]
|
avatarURL = "images/avatar.png"
|
||||||
## for example '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.10.1/css/all.min.css" integrity="sha256-fdcFNFiBMrNfWL6OcAGQz6jDgNTRxnrLEd4vJYFWScE=" crossorigin="anonymous">'
|
# subtitle shown in home page
|
||||||
fontawesome_free_css = ''
|
subtitle = "A Clean, Elegant but Advanced Hugo Theme"
|
||||||
animate_css = ''
|
# whether to use typeit animation for subtitle
|
||||||
gitalk_css = ''
|
typeit = true
|
||||||
gitalk_js = ''
|
# whether to show social links
|
||||||
valine_js = ''
|
social = true
|
||||||
lazysizes_js = ''
|
# Home Page Posts
|
||||||
smooth_scroll_js = ''
|
[params.home.posts]
|
||||||
katex_css = ''
|
enable = true
|
||||||
katex_js = ''
|
# special amount of posts in each home posts page
|
||||||
katex_auto_render_js = ''
|
paginate = 6
|
||||||
katex_copy_tex_css = ''
|
# default behavior when you don't set "hiddenFromHomePage" in front matter
|
||||||
katex_copy_tex_js = ''
|
defaultHiddenFromHomePage = false
|
||||||
katex_mhchem_js = ''
|
|
||||||
mermaid_js = ''
|
|
||||||
echarts_js = ''
|
|
||||||
echarts_macarons_js = ''
|
|
||||||
typeit_js = ''
|
|
||||||
aplayer_css = ''
|
|
||||||
aplayer_js = ''
|
|
||||||
meting_js = ''
|
|
||||||
|
|
||||||
# Gravatar Info for preferred avatar in home page
|
|
||||||
[params.gravatar]
|
|
||||||
email = ""
|
|
||||||
|
|
||||||
# Social Info in home page
|
# Social Info in home page
|
||||||
[params.social]
|
[params.social]
|
||||||
@@ -257,6 +220,13 @@ dateFormatToUse = "2006-01-02"
|
|||||||
#XMPP = "xxxx"
|
#XMPP = "xxxx"
|
||||||
#Matrix ="xxxx"
|
#Matrix ="xxxx"
|
||||||
|
|
||||||
|
# Page config
|
||||||
|
[params.page]
|
||||||
|
# whether to show social share links in post page
|
||||||
|
socialShare = true
|
||||||
|
# whether to show link to Raw Markdown content of the post
|
||||||
|
linkToMarkdown = true
|
||||||
|
|
||||||
# Social Share Links in post page
|
# Social Share Links in post page
|
||||||
[params.share]
|
[params.share]
|
||||||
enable = true
|
enable = true
|
||||||
@@ -271,6 +241,50 @@ dateFormatToUse = "2006-01-02"
|
|||||||
#VKontakte = true
|
#VKontakte = true
|
||||||
#Weibo = true
|
#Weibo = true
|
||||||
|
|
||||||
|
# mathematical formulas (KaTeX)
|
||||||
|
[params.math]
|
||||||
|
enable = true
|
||||||
|
blockLeftDelimiter = ""
|
||||||
|
blockRightDelimiter = ""
|
||||||
|
inlineLeftDelimiter = "$"
|
||||||
|
inlineRightDelimiter = "$"
|
||||||
|
# KaTeX extension copy_tex
|
||||||
|
copyTex = true
|
||||||
|
# KaTeX extension mhchem
|
||||||
|
mhchem = true
|
||||||
|
|
||||||
|
# CSS and JS Files CDN
|
||||||
|
[params.cdn]
|
||||||
|
## for example '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.10.1/css/all.min.css" integrity="sha256-fdcFNFiBMrNfWL6OcAGQz6jDgNTRxnrLEd4vJYFWScE=" crossorigin="anonymous">'
|
||||||
|
fontawesomeFreeCSS = ''
|
||||||
|
animateCSS = ''
|
||||||
|
gitalkCSS = ''
|
||||||
|
gitalkJS = ''
|
||||||
|
valineJS = ''
|
||||||
|
lazysizesJS = ''
|
||||||
|
smoothScrollJS = ''
|
||||||
|
katexCSS = ''
|
||||||
|
katexJS = ''
|
||||||
|
katexAutoRenderJS = ''
|
||||||
|
katexCopyTexCSS = ''
|
||||||
|
katexCopyTexJS = ''
|
||||||
|
katexMhchemJS = ''
|
||||||
|
mermaidJS = ''
|
||||||
|
echartsJS = ''
|
||||||
|
echartsMacaronsJS = ''
|
||||||
|
typeitJS = ''
|
||||||
|
aplayerCSS = ''
|
||||||
|
aplayerJS = ''
|
||||||
|
metingJS = ''
|
||||||
|
|
||||||
|
# site verification code for Google/Bing/Yandex/Pinterest/Baidu
|
||||||
|
[params.verification]
|
||||||
|
google = ""
|
||||||
|
bing = ""
|
||||||
|
yandex = ""
|
||||||
|
pinterest = ""
|
||||||
|
baidu = ""
|
||||||
|
|
||||||
# Publisher Info just for SEO
|
# Publisher Info just for SEO
|
||||||
[params.publisher]
|
[params.publisher]
|
||||||
name = "xxxx"
|
name = "xxxx"
|
||||||
@@ -291,39 +305,43 @@ dateFormatToUse = "2006-01-02"
|
|||||||
width = 800
|
width = 800
|
||||||
height = 600
|
height = 600
|
||||||
|
|
||||||
# Disqus Comment Config (https://disqus.com/)
|
# Comment Config
|
||||||
[params.disqus]
|
[params.comment]
|
||||||
# Disqus shortname to use Disqus in posts
|
enable = true
|
||||||
shortname = "dillonzq"
|
|
||||||
|
|
||||||
# Gittalk Comment Config (https://github.com/gitalk/gitalk)
|
# Disqus Comment Config (https://disqus.com/)
|
||||||
[params.gitalk]
|
[params.comment.disqus]
|
||||||
owner = ""
|
# Disqus shortname to use Disqus in posts
|
||||||
repo = ""
|
shortname = "dillonzq"
|
||||||
clientId = ""
|
|
||||||
clientSecret = ""
|
|
||||||
|
|
||||||
# Valine Comment Config (https://github.com/xCss/Valine)
|
# Gittalk Comment Config (https://github.com/gitalk/gitalk)
|
||||||
[params.valine]
|
[params.comment.gitalk]
|
||||||
enable = false
|
owner = ""
|
||||||
appId = ""
|
repo = ""
|
||||||
appKey = ""
|
clientId = ""
|
||||||
placeholder = "Your comment ..."
|
clientSecret = ""
|
||||||
notify = false
|
|
||||||
verify = true
|
|
||||||
avatar = "mp"
|
|
||||||
#meta= ""
|
|
||||||
pageSize = 10
|
|
||||||
visitor = true
|
|
||||||
recordIP = true
|
|
||||||
|
|
||||||
# Facebook Comment Config (https://developers.facebook.com/docs/plugins/comments)
|
# Valine Comment Config (https://github.com/xCss/Valine)
|
||||||
[params.facebook]
|
[params.comment.valine]
|
||||||
enable = false
|
enable = false
|
||||||
width = "100%"
|
appId = ""
|
||||||
numPosts = 10
|
appKey = ""
|
||||||
appId = ""
|
placeholder = "Your comment ..."
|
||||||
languageCode = "en_US"
|
notify = false
|
||||||
|
verify = true
|
||||||
|
avatar = "mp"
|
||||||
|
#meta= ""
|
||||||
|
pageSize = 10
|
||||||
|
visitor = true
|
||||||
|
recordIP = true
|
||||||
|
|
||||||
|
# Facebook Comment Config (https://developers.facebook.com/docs/plugins/comments)
|
||||||
|
[params.comment.facebook]
|
||||||
|
enable = false
|
||||||
|
width = "100%"
|
||||||
|
numPosts = 10
|
||||||
|
appId = ""
|
||||||
|
languageCode = "en_US"
|
||||||
|
|
||||||
# Privacy Info (https://gohugo.io/about/hugo-and-gdpr/)
|
# Privacy Info (https://gohugo.io/about/hugo-and-gdpr/)
|
||||||
[privacy]
|
[privacy]
|
||||||
|
|||||||
@@ -1,29 +1,24 @@
|
|||||||
---
|
---
|
||||||
author: "Hugo Authors"
|
|
||||||
author_link: "https://gohugo.io/"
|
|
||||||
title: "Emoji Support"
|
title: "Emoji Support"
|
||||||
date: 2019-10-01T17:55:28+08:00
|
date: 2019-10-01T17:55:28+08:00
|
||||||
lastmod: 2019-10-01T17:55:28+08:00
|
lastmod: 2019-10-01T17:55:28+08:00
|
||||||
draft: false
|
draft: false
|
||||||
|
author: "Hugo Authors"
|
||||||
|
authorLink: "https://gohugo.io/"
|
||||||
description: "Guide to emoji usage in Hugo"
|
description: "Guide to emoji usage in Hugo"
|
||||||
show_in_homepage: true
|
|
||||||
description_as_summary: false
|
|
||||||
license: ""
|
license: ""
|
||||||
|
|
||||||
tags: [
|
tags: ["emoji"]
|
||||||
"emoji",
|
categories: ["theme"]
|
||||||
]
|
hiddenFromHomePage: false
|
||||||
categories: [
|
|
||||||
"theme",
|
|
||||||
]
|
|
||||||
|
|
||||||
featured_image: /images/emoji.jpg
|
featuredImage: /images/emoji.jpg
|
||||||
featured_image_preview: ""
|
featuredImagePreview: ""
|
||||||
|
|
||||||
comment: true
|
|
||||||
toc: false
|
toc: false
|
||||||
auto_collapse_toc: true
|
autoCollapseToc: true
|
||||||
math: false
|
math: false
|
||||||
|
comment: true
|
||||||
---
|
---
|
||||||
|
|
||||||
Emoji can be enabled in a Hugo project in a number of ways.
|
Emoji can be enabled in a Hugo project in a number of ways.
|
||||||
|
|||||||
@@ -1,31 +1,24 @@
|
|||||||
---
|
---
|
||||||
author: "Hugo Authors"
|
|
||||||
author_link: "https://gohugo.io/"
|
|
||||||
title: "Markdown Syntax Guide"
|
title: "Markdown Syntax Guide"
|
||||||
date: 2019-12-01T21:57:40+08:00
|
date: 2019-12-01T21:57:40+08:00
|
||||||
lastmod: 2020-01-01T16:45:40+08:00
|
lastmod: 2020-01-01T16:45:40+08:00
|
||||||
draft: false
|
draft: false
|
||||||
|
author: "Hugo Authors"
|
||||||
|
authorLink: "https://gohugo.io/"
|
||||||
description: "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
|
description: "Sample article showcasing basic Markdown syntax and formatting for HTML elements."
|
||||||
show_in_homepage: true
|
|
||||||
description_as_summary: false
|
|
||||||
license: ""
|
license: ""
|
||||||
|
|
||||||
tags: [
|
tags: ["markdown", "css", "html"]
|
||||||
"markdown",
|
categories: ["theme"]
|
||||||
"css",
|
hiddenFromHomePage: false
|
||||||
"html",
|
|
||||||
]
|
|
||||||
categories: [
|
|
||||||
"theme",
|
|
||||||
]
|
|
||||||
|
|
||||||
featured_image: /images/markdown.png
|
featuredImage: /images/markdown.png
|
||||||
featured_image_preview: ""
|
featuredImagePreview: ""
|
||||||
|
|
||||||
comment: true
|
|
||||||
toc: true
|
toc: true
|
||||||
auto_collapse_toc: true
|
autoCollapseToc: true
|
||||||
math: true
|
math: true
|
||||||
|
comment: true
|
||||||
---
|
---
|
||||||
|
|
||||||
This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.
|
This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme.
|
||||||
|
|||||||
@@ -1,30 +1,24 @@
|
|||||||
---
|
---
|
||||||
author: "Hugo Authors"
|
|
||||||
author_link: "https://gohugo.io/"
|
|
||||||
title: "Placeholder Text"
|
title: "Placeholder Text"
|
||||||
date: 2019-08-01T18:02:41+08:00
|
date: 2019-08-01T18:02:41+08:00
|
||||||
lastmod: 2019-08-01T18:02:41+08:00
|
lastmod: 2019-08-01T18:02:41+08:00
|
||||||
draft: false
|
draft: false
|
||||||
|
author: "Hugo Authors"
|
||||||
|
authorLink: "https://gohugo.io/"
|
||||||
description: "Lorem Ipsum Dolor Si Amet"
|
description: "Lorem Ipsum Dolor Si Amet"
|
||||||
show_in_homepage: true
|
|
||||||
description_as_summary: false
|
|
||||||
license: ""
|
license: ""
|
||||||
|
|
||||||
tags: [
|
tags: ["markdown", "text"]
|
||||||
"markdown",
|
categories: ["theme"]
|
||||||
"text",
|
hiddenFromHomePage: false
|
||||||
]
|
|
||||||
categories: [
|
|
||||||
"theme",
|
|
||||||
]
|
|
||||||
|
|
||||||
featured_image: ""
|
featuredImage: ""
|
||||||
featured_image_preview: ""
|
featuredImagePreview: ""
|
||||||
|
|
||||||
comment: true
|
|
||||||
toc: false
|
toc: false
|
||||||
auto_collapse_toc: true
|
autoCollapseToc: true
|
||||||
math: false
|
math: false
|
||||||
|
comment: true
|
||||||
---
|
---
|
||||||
|
|
||||||
Lorem est tota propiore conpellat pectoribus de
|
Lorem est tota propiore conpellat pectoribus de
|
||||||
|
|||||||
@@ -1,30 +1,24 @@
|
|||||||
---
|
---
|
||||||
author: "Hugo Authors"
|
|
||||||
author_link: "https://gohugo.io/"
|
|
||||||
title: "Rich Content"
|
title: "Rich Content"
|
||||||
date: 2019-09-01T18:06:32+08:00
|
date: 2019-09-01T18:06:32+08:00
|
||||||
lastmod: 2019-09-01T18:06:32+08:00
|
lastmod: 2019-09-01T18:06:32+08:00
|
||||||
draft: false
|
draft: false
|
||||||
|
author: "Hugo Authors"
|
||||||
|
authorLink: "https://gohugo.io/"
|
||||||
description: "A brief description of Hugo Shortcodes"
|
description: "A brief description of Hugo Shortcodes"
|
||||||
show_in_homepage: true
|
|
||||||
description_as_summary: false
|
|
||||||
license: ""
|
license: ""
|
||||||
|
|
||||||
tags: [
|
tags: ["shortcodes", "privacy"]
|
||||||
"shortcodes",
|
categories: ["theme"]
|
||||||
"privacy",
|
hiddenFromHomePage: false
|
||||||
]
|
|
||||||
categories: [
|
|
||||||
"theme",
|
|
||||||
]
|
|
||||||
|
|
||||||
featured_image: /images/hugo.png
|
featuredImage: /images/hugo.png
|
||||||
featured_image_preview: ""
|
featuredImagePreview: ""
|
||||||
|
|
||||||
comment: true
|
|
||||||
toc: false
|
toc: false
|
||||||
auto_collapse_toc: true
|
autoCollapseToc: true
|
||||||
math: false
|
math: false
|
||||||
|
comment: true
|
||||||
---
|
---
|
||||||
|
|
||||||
Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugo-s-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.
|
Hugo ships with several [Built-in Shortcodes](https://gohugo.io/content-management/shortcodes/#use-hugo-s-built-in-shortcodes) for rich content, along with a [Privacy Config](https://gohugo.io/about/hugo-and-gdpr/) and a set of Simple Shortcodes that enable static and no-JS versions of various social media embeds.
|
||||||
|
|||||||
@@ -112,84 +112,47 @@ dateFormatToUse = "2006-01-02"
|
|||||||
keywords = ["Theme", "Hugo"]
|
keywords = ["Theme", "Hugo"]
|
||||||
# 网站默认主题 ("light", "dark", "auto")
|
# 网站默认主题 ("light", "dark", "auto")
|
||||||
defaultTheme = "auto"
|
defaultTheme = "auto"
|
||||||
# 桌面端导航栏模式 ("fixed", "normal", "auto")
|
|
||||||
desktopHeaderMode = "fixed"
|
|
||||||
# 移动端导航栏模式 ("fixed", "normal", "auto")
|
|
||||||
mobileHeaderMode = "auto"
|
|
||||||
|
|
||||||
# 主页信息设置
|
|
||||||
## 主页模式 ("post", "other")
|
|
||||||
home_mode = "post"
|
|
||||||
## 主页在 post 模式下每页 post 显示数量
|
|
||||||
home_paginate = 6
|
|
||||||
## 主页显示头像的 URL
|
|
||||||
avatar = "images/avatar.png"
|
|
||||||
## 主页显示的网站副标题
|
|
||||||
subtitle = "一个简洁、优雅且高效的 Hugo 主题"
|
|
||||||
|
|
||||||
# 在文章页面是否使用分享功能
|
|
||||||
socialShare = true
|
|
||||||
|
|
||||||
# 页面底部版权信息设置
|
|
||||||
## 网站创立年份
|
|
||||||
since = 2019
|
|
||||||
## ICP 备案信息,仅在中国使用 (允许使用 HTML 格式)
|
|
||||||
icp = ""
|
|
||||||
## 许可协议信息 (允许使用 HTML 格式)
|
|
||||||
license= '<a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a>'
|
|
||||||
|
|
||||||
# 用于生成文章上次修改时间的公共 git 仓库路径,仅在 enableGitInfo 设为 true 时有效
|
# 用于生成文章上次修改时间的公共 git 仓库路径,仅在 enableGitInfo 设为 true 时有效
|
||||||
gitRepo = ""
|
gitRepo = ""
|
||||||
|
|
||||||
# 数学公式 (KaTeX https://katex.org/)
|
# 页面头部导航栏信息
|
||||||
[params.math]
|
[params.header]
|
||||||
enable = true
|
# 桌面端导航栏模式 ("fixed", "normal", "auto")
|
||||||
block_left_delimiter = ""
|
desktopMode = "fixed"
|
||||||
block_right_delimiter = ""
|
# 移动端导航栏模式 ("fixed", "normal", "auto")
|
||||||
inline_left_delimiter = "$"
|
mobileMode = "auto"
|
||||||
inline_right_delimiter = "$"
|
|
||||||
# KaTeX 插件 copy_tex
|
|
||||||
copy_tex = true
|
|
||||||
# KaTeX 插件 mhchem
|
|
||||||
mhchem = true
|
|
||||||
|
|
||||||
# 是否在文章页面显示原始 Markdown 文档链接
|
# 页面底部版权信息设置
|
||||||
linkToMarkdown = true
|
[params.footer]
|
||||||
|
# 网站创立年份
|
||||||
|
since = 2019
|
||||||
|
# ICP 备案信息,仅在中国使用 (允许使用 HTML 格式)
|
||||||
|
icp = ""
|
||||||
|
# 许可协议信息 (允许使用 HTML 格式)
|
||||||
|
license= '<a rel="license external nofollow noopener noreffer" href="https://creativecommons.org/licenses/by-nc/4.0/" target="_blank">CC BY-NC 4.0</a>'
|
||||||
|
|
||||||
# 网站验证代码,用于 Google/Bing/Yandex/Pinterest/Baidu
|
# 主页信息设置
|
||||||
google_verification = ""
|
[params.home]
|
||||||
bing_verification = ""
|
# 主页个人信息
|
||||||
yandex_verification = ""
|
[params.home.profile]
|
||||||
pinterest_verification = ""
|
enable = true
|
||||||
baidu_verification = ""
|
# Gravatar 邮箱,用于优先在主页显示的头像
|
||||||
|
gravatarEmail = ""
|
||||||
# CSS 和 JS 文件的 CDN 设置
|
# 主页显示头像的 URL
|
||||||
[params.cdn]
|
avatarURL = "images/avatar.png"
|
||||||
## 例如 '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.10.1/css/all.min.css" integrity="sha256-fdcFNFiBMrNfWL6OcAGQz6jDgNTRxnrLEd4vJYFWScE=" crossorigin="anonymous">'
|
# 主页显示的网站副标题
|
||||||
fontawesome_free_css = ''
|
subtitle = "一个简洁、优雅且高效的 Hugo 主题"
|
||||||
animate_css = ''
|
# 是否为副标题显示打字机动画
|
||||||
gitalk_css = ''
|
typeit = true
|
||||||
gitalk_js = ''
|
# 是否显示社交账号
|
||||||
valine_js = ''
|
social = true
|
||||||
lazysizes_js = ''
|
# 主页文章列表
|
||||||
smooth_scroll_js = ''
|
[params.home.posts]
|
||||||
katex_css = ''
|
enable = true
|
||||||
katex_js = ''
|
# 主页每页显示文章数量
|
||||||
katex_auto_render_js = ''
|
paginate = 6
|
||||||
katex_copy_tex_css = ''
|
# 当你没有在文章前面设置 "hiddenFromHomePage" 时的默认行为
|
||||||
katex_copy_tex_js = ''
|
defaultHiddenFromHomePage = false
|
||||||
katex_mhchem_js = ''
|
|
||||||
mermaid_js = ''
|
|
||||||
echarts_js = ''
|
|
||||||
echarts_macarons_js = ''
|
|
||||||
typeit_js = ''
|
|
||||||
aplayer_css = ''
|
|
||||||
aplayer_js = ''
|
|
||||||
meting_js = ''
|
|
||||||
|
|
||||||
# Gravatar 信息,用于优先在主页显示的头像
|
|
||||||
[params.gravatar]
|
|
||||||
email = ""
|
|
||||||
|
|
||||||
# 主页的社交信息设置
|
# 主页的社交信息设置
|
||||||
[params.social]
|
[params.social]
|
||||||
@@ -257,6 +220,13 @@ dateFormatToUse = "2006-01-02"
|
|||||||
#XMPP = "xxxx"
|
#XMPP = "xxxx"
|
||||||
#Matrix ="xxxx"
|
#Matrix ="xxxx"
|
||||||
|
|
||||||
|
# 文章页面配置
|
||||||
|
[params.page]
|
||||||
|
# 在文章页面是否使用分享功能
|
||||||
|
socialShare = true
|
||||||
|
# 是否在文章页面显示原始 Markdown 文档链接
|
||||||
|
linkToMarkdown = true
|
||||||
|
|
||||||
# 文章页面的分享信息设置
|
# 文章页面的分享信息设置
|
||||||
[params.share]
|
[params.share]
|
||||||
enable = true
|
enable = true
|
||||||
@@ -271,6 +241,50 @@ dateFormatToUse = "2006-01-02"
|
|||||||
#VKontakte = true
|
#VKontakte = true
|
||||||
#Weibo = true
|
#Weibo = true
|
||||||
|
|
||||||
|
# 数学公式 (KaTeX https://katex.org/)
|
||||||
|
[params.math]
|
||||||
|
enable = true
|
||||||
|
blockLeftDelimiter = ""
|
||||||
|
blockRightDelimiter = ""
|
||||||
|
inlineLeftDelimiter = "$"
|
||||||
|
inlineRightDelimiter = "$"
|
||||||
|
# KaTeX 插件 copy_tex
|
||||||
|
copyTex = true
|
||||||
|
# KaTeX 插件 mhchem
|
||||||
|
mhchem = true
|
||||||
|
|
||||||
|
# CSS 和 JS 文件的 CDN 设置
|
||||||
|
[params.cdn]
|
||||||
|
## 例如 '<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.10.1/css/all.min.css" integrity="sha256-fdcFNFiBMrNfWL6OcAGQz6jDgNTRxnrLEd4vJYFWScE=" crossorigin="anonymous">'
|
||||||
|
fontawesomeFreeCSS = ''
|
||||||
|
animateCSS = ''
|
||||||
|
gitalkCSS = ''
|
||||||
|
gitalkJS = ''
|
||||||
|
valineJS = ''
|
||||||
|
lazysizesJS = ''
|
||||||
|
smoothScrollJS = ''
|
||||||
|
katexCSS = ''
|
||||||
|
katexJS = ''
|
||||||
|
katexAutoRenderJS = ''
|
||||||
|
katexCopyTexCSS = ''
|
||||||
|
katexCopyTexJS = ''
|
||||||
|
katexMhchemJS = ''
|
||||||
|
mermaidJS = ''
|
||||||
|
echartsJS = ''
|
||||||
|
echartsMacaronsJS = ''
|
||||||
|
typeitJS = ''
|
||||||
|
aplayerCSS = ''
|
||||||
|
aplayerJS = ''
|
||||||
|
metingJS = ''
|
||||||
|
|
||||||
|
# 网站验证代码,用于 Google/Bing/Yandex/Pinterest/Baidu
|
||||||
|
[params.verification]
|
||||||
|
google = ""
|
||||||
|
bing = ""
|
||||||
|
yandex = ""
|
||||||
|
pinterest = ""
|
||||||
|
baidu = ""
|
||||||
|
|
||||||
# 出版者信息,仅用于 SEO
|
# 出版者信息,仅用于 SEO
|
||||||
[params.publisher]
|
[params.publisher]
|
||||||
name = "xxxx"
|
name = "xxxx"
|
||||||
@@ -291,39 +305,43 @@ dateFormatToUse = "2006-01-02"
|
|||||||
width = 800
|
width = 800
|
||||||
height = 600
|
height = 600
|
||||||
|
|
||||||
# Disqus 评论系统设置 (https://disqus.com/)
|
# 评论系统设置
|
||||||
[params.disqus]
|
[params.comment]
|
||||||
# Disqus 的用户名,用来在文章中启用 Disqus 评论系统
|
enable = true
|
||||||
shortname = "dillonzq"
|
|
||||||
|
|
||||||
# Gittalk 评论系统设置 (https://github.com/gitalk/gitalk)
|
# Disqus 评论系统设置 (https://disqus.com/)
|
||||||
[params.gitalk]
|
[params.comment.disqus]
|
||||||
owner = ""
|
# Disqus 的用户名,用来在文章中启用 Disqus 评论系统
|
||||||
repo = ""
|
shortname = "dillonzq"
|
||||||
clientId = ""
|
|
||||||
clientSecret = ""
|
|
||||||
|
|
||||||
# Valine 评论系统设置 (https://github.com/xCss/Valine)
|
# Gittalk 评论系统设置 (https://github.com/gitalk/gitalk)
|
||||||
[params.valine]
|
[params.comment.gitalk]
|
||||||
enable = false
|
owner = ""
|
||||||
appId = ""
|
repo = ""
|
||||||
appKey = ""
|
clientId = ""
|
||||||
placeholder = "你的评论 ..."
|
clientSecret = ""
|
||||||
notify = false
|
|
||||||
verify = true
|
|
||||||
avatar = "mp"
|
|
||||||
#meta= ""
|
|
||||||
pageSize = 10
|
|
||||||
visitor = true
|
|
||||||
recordIP = true
|
|
||||||
|
|
||||||
# Facebook 评论系统设置 (https://developers.facebook.com/docs/plugins/comments)
|
# Valine 评论系统设置 (https://github.com/xCss/Valine)
|
||||||
[params.facebook]
|
[params.comment.valine]
|
||||||
enable = false
|
enable = false
|
||||||
width = "100%"
|
appId = ""
|
||||||
numPosts = 10
|
appKey = ""
|
||||||
appId = ""
|
placeholder = "你的评论 ..."
|
||||||
languageCode = "en_US"
|
notify = false
|
||||||
|
verify = true
|
||||||
|
avatar = "mp"
|
||||||
|
#meta= ""
|
||||||
|
pageSize = 10
|
||||||
|
visitor = true
|
||||||
|
recordIP = true
|
||||||
|
|
||||||
|
# Facebook 评论系统设置 (https://developers.facebook.com/docs/plugins/comments)
|
||||||
|
[params.comment.facebook]
|
||||||
|
enable = false
|
||||||
|
width = "100%"
|
||||||
|
numPosts = 10
|
||||||
|
appId = ""
|
||||||
|
languageCode = "en_US"
|
||||||
|
|
||||||
# 隐私信息设置 (https://gohugo.io/about/hugo-and-gdpr/)
|
# 隐私信息设置 (https://gohugo.io/about/hugo-and-gdpr/)
|
||||||
[privacy]
|
[privacy]
|
||||||
|
|||||||
@@ -1,30 +1,24 @@
|
|||||||
---
|
---
|
||||||
author: ""
|
|
||||||
author_link: ""
|
|
||||||
title: "Markdown 基本语法预览"
|
title: "Markdown 基本语法预览"
|
||||||
date: 2019-08-25T16:22:42+08:00
|
date: 2019-08-25T16:22:42+08:00
|
||||||
lastmod: 2019-08-25T16:22:42+08:00
|
lastmod: 2019-08-25T16:22:42+08:00
|
||||||
draft: false
|
draft: false
|
||||||
|
author: ""
|
||||||
|
authorLink: ""
|
||||||
description: "这是一篇用于预览 Markdown 基本语法的文章。"
|
description: "这是一篇用于预览 Markdown 基本语法的文章。"
|
||||||
show_in_homepage: true
|
|
||||||
description_as_summary: false
|
|
||||||
license: ""
|
license: ""
|
||||||
|
|
||||||
tags: [
|
tags: ["Hugo", "主题"]
|
||||||
"Hugo",
|
categories: ["预览"]
|
||||||
"主题",
|
|
||||||
]
|
|
||||||
categories: [
|
|
||||||
"预览",
|
|
||||||
]
|
|
||||||
|
|
||||||
featured_image: ""
|
featuredImage: ""
|
||||||
featured_image_preview: ""
|
featuredImagePreview: ""
|
||||||
|
hiddenFromHomePage: false
|
||||||
|
|
||||||
comment: true
|
|
||||||
toc: true
|
toc: true
|
||||||
auto_collapse_toc: true
|
autoCollapseToc: true
|
||||||
math: true
|
math: true
|
||||||
|
comment: true
|
||||||
---
|
---
|
||||||
|
|
||||||
这是一篇用于预览 :(fab fa-markdown): Markdown 基本语法的文章。
|
这是一篇用于预览 :(fab fa-markdown): Markdown 基本语法的文章。
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<article class="single summary" itemscope itemtype="http://schema.org/Article">
|
<article class="single summary" itemscope itemtype="http://schema.org/Article">
|
||||||
{{- /* Featured image */ -}}
|
{{- /* Featured image */ -}}
|
||||||
{{- with .Params.featured_image -}}
|
{{- with .Params.featuredImage -}}
|
||||||
<div class="featured-image-preview">
|
<div class="featured-image-preview">
|
||||||
{{- $image := $.Params.featured_image_preview | default . -}}
|
{{- $image := $.Params.featuredImagePreview | default . -}}
|
||||||
{{- partial "hook/image" $image -}}
|
{{- partial "hook/image" $image -}}
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@@ -15,8 +15,8 @@
|
|||||||
{{- /* Meta */ -}}
|
{{- /* Meta */ -}}
|
||||||
<div class="meta">
|
<div class="meta">
|
||||||
{{- $author := .Params.author | default .Site.Author.name -}}
|
{{- $author := .Params.author | default .Site.Author.name -}}
|
||||||
{{- $author_link := .Params.author_link | default .Site.Author.link | default .Site.BaseURL -}}
|
{{- $authorLink := .Params.authorLink | default .Site.Author.link | default .Site.BaseURL -}}
|
||||||
<a class="author" href="{{ $author_link }}" rel="author" target="_blank">
|
<a class="author" href="{{ $authorLink }}" rel="author" target="_blank">
|
||||||
<i class="fas fa-user-circle fa-fw"></i>{{ $author }}
|
<i class="fas fa-user-circle fa-fw"></i>{{ $author }}
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
@@ -39,13 +39,7 @@
|
|||||||
|
|
||||||
{{- /* Summary content */ -}}
|
{{- /* Summary content */ -}}
|
||||||
<div class="content">
|
<div class="content">
|
||||||
{{- if .Params.description_as_summary -}}
|
{{- partial "hook/content.html" .Summary | safeHTML -}}
|
||||||
<p>
|
|
||||||
{{- .Params.description -}}
|
|
||||||
</p>
|
|
||||||
{{- else -}}
|
|
||||||
{{- partial "hook/content.html" .Summary | safeHTML -}}
|
|
||||||
{{- end -}}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{- /* Footer */ -}}
|
{{- /* Footer */ -}}
|
||||||
|
|||||||
@@ -1,14 +1,20 @@
|
|||||||
{{- define "content" -}}
|
{{- define "content" -}}
|
||||||
<div class="page home">
|
<div class="page home">
|
||||||
{{- /* Home mode [post] */ -}}
|
{{- /* Profile */ -}}
|
||||||
{{- if eq .Site.Params.home_mode "post" -}}
|
{{- if .Site.Params.home.profile.enable -}}
|
||||||
{{- /* Profile */ -}}
|
|
||||||
{{- partial "home/profile.html" . -}}
|
{{- partial "home/profile.html" . -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- /* Posts */ -}}
|
||||||
|
{{- if .Site.Params.home.posts.enable -}}
|
||||||
{{- /* Paginate */ -}}
|
{{- /* Paginate */ -}}
|
||||||
{{- $paginator := where .Site.RegularPages "Type" "posts" -}}
|
{{- $paginator := where .Site.RegularPages "Type" "posts" -}}
|
||||||
{{- $paginator = where $paginator "Params.show_in_homepage" "!=" false -}}
|
{{- if ne .Site.Params.home.posts.mode.defaultHiddenFromHomePage false -}}
|
||||||
{{- with .Site.Params.home_paginate -}}
|
{{- $paginator = where $paginator "Params.hiddenfromhomepage" "!=" true -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $paginator = where $paginator "Params.hiddenfromhomepage" false -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- with .Site.Params.home.posts.paginate -}}
|
||||||
{{- $paginator = $.Paginate $paginator . -}}
|
{{- $paginator = $.Paginate $paginator . -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $paginator = $.Paginate $paginator -}}
|
{{- $paginator = $.Paginate $paginator -}}
|
||||||
@@ -17,11 +23,6 @@
|
|||||||
{{- .Render "summary" -}}
|
{{- .Render "summary" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- partial "paginator.html" . -}}
|
{{- partial "paginator.html" . -}}
|
||||||
|
|
||||||
{{- /* Home mode [other] */ -}}
|
|
||||||
{{- else -}}
|
|
||||||
{{- /* Profile */ -}}
|
|
||||||
{{- partial "home/profile.html" . -}}
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{{- if .Scratch.Get "production" | and .IsPage | and (ne .Params.comment false) -}}
|
{{- if .Scratch.Get "production" | and .IsPage | and (ne .Site.Params.comment.enable false) | and (ne .Params.comment false) -}}
|
||||||
{{- $CDN := .Scratch.Get "CDN" -}}
|
{{- $CDN := .Scratch.Get "CDN" -}}
|
||||||
|
|
||||||
{{- /* Disqus Comment System */ -}}
|
{{- /* Disqus Comment System */ -}}
|
||||||
{{- with .Site.Params.disqus.shortname -}}
|
{{- with .Site.Params.comment.disqus.shortname -}}
|
||||||
<div id="disqus_thread"></div>
|
<div id="disqus_thread"></div>
|
||||||
{{- $script := printf `<script src="https://%s.disqus.com/embed.js"></script>` . -}}
|
{{- $script := printf `<script src="https://%s.disqus.com/embed.js"></script>` . -}}
|
||||||
{{- slice $script | $.Scratch.Add "scriptCDN" -}}
|
{{- slice $script | $.Scratch.Add "scriptCDN" -}}
|
||||||
@@ -12,14 +12,15 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- /* Gitalk Comment System */ -}}
|
{{- /* Gitalk Comment System */ -}}
|
||||||
{{- if .Site.Params.gitalk.owner -}}
|
{{- if .Site.Params.comment.gitalk.owner -}}
|
||||||
|
{{- $gitalk := .Site.Params.comment.gitalk -}}
|
||||||
<div id="gitalk"></div>
|
<div id="gitalk"></div>
|
||||||
{{- with $CDN.gitalk_css -}}
|
{{- with $CDN.gitalkCSS -}}
|
||||||
{{- slice . | $.Scratch.Add "linkCDN" -}}
|
{{- slice . | $.Scratch.Add "linkCDN" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- slice "css/lib/gitalk/gitalk.css" | .Scratch.Add "linkLocal" -}}
|
{{- slice "css/lib/gitalk/gitalk.css" | .Scratch.Add "linkLocal" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with $CDN.gitalk_js -}}
|
{{- with $CDN.gitalkJS -}}
|
||||||
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- slice "css/lib/gitalk/gitalk.min.js" | .Scratch.Add "scriptLocal" -}}
|
{{- slice "css/lib/gitalk/gitalk.min.js" | .Scratch.Add "scriptLocal" -}}
|
||||||
@@ -29,11 +30,11 @@
|
|||||||
var gitalk = new Gitalk({
|
var gitalk = new Gitalk({
|
||||||
id: '{{ .Date }}',
|
id: '{{ .Date }}',
|
||||||
title: '{{ .Title }}',
|
title: '{{ .Title }}',
|
||||||
clientID: '{{ .Site.Params.gitalk.clientId }}',
|
clientID: '{{ $gitalk.clientId }}',
|
||||||
clientSecret: '{{ .Site.Params.gitalk.clientSecret }}',
|
clientSecret: '{{ $gitalk.clientSecret }}',
|
||||||
repo: '{{ .Site.Params.gitalk.repo }}',
|
repo: '{{ $gitalk.repo }}',
|
||||||
owner: '{{ .Site.Params.gitalk.owner }}',
|
owner: '{{ $gitalk.owner }}',
|
||||||
admin: ['{{ .Site.Params.gitalk.owner }}'],
|
admin: ['{{ $gitalk.owner }}'],
|
||||||
body: decodeURI(location.href),
|
body: decodeURI(location.href),
|
||||||
});
|
});
|
||||||
gitalk.render('gitalk');
|
gitalk.render('gitalk');
|
||||||
@@ -45,10 +46,11 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- /* Valine Comment System */ -}}
|
{{- /* Valine Comment System */ -}}
|
||||||
{{- if .Site.Params.valine.enable -}}
|
{{- if .Site.Params.comment.valine.enable -}}
|
||||||
|
{{- $valine := .Site.Params.comment.valine -}}
|
||||||
<div id="valine"></div>
|
<div id="valine"></div>
|
||||||
{{- slice "css/lib/valine/dark.scss" | .Scratch.Add "linkLocal" -}}
|
{{- slice "css/lib/valine/dark.scss" | .Scratch.Add "linkLocal" -}}
|
||||||
{{- with $CDN.valine_js -}}
|
{{- with $CDN.valineJS -}}
|
||||||
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- slice "js/lib/valine/Valine.min.js" | .Scratch.Add "scriptLocal" -}}
|
{{- slice "js/lib/valine/Valine.min.js" | .Scratch.Add "scriptLocal" -}}
|
||||||
@@ -57,31 +59,31 @@
|
|||||||
document.addEventListener("DOMContentLoaded", function(event) {
|
document.addEventListener("DOMContentLoaded", function(event) {
|
||||||
new Valine({
|
new Valine({
|
||||||
el: '#valine',
|
el: '#valine',
|
||||||
appId: '{{ .Site.Params.valine.appId }}',
|
appId: '{{ $valine.appId }}',
|
||||||
appKey: '{{ .Site.Params.valine.appKey }}',
|
appKey: '{{ $valine.appKey }}',
|
||||||
{{- with .Site.Params.valine.placeholder -}}
|
{{- with $valine.placeholder -}}
|
||||||
placeholder: '{{ . }}',
|
placeholder: '{{ . }}',
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if .Site.Params.valine.notify -}}
|
{{- if $valine.notify -}}
|
||||||
notify: true,
|
notify: true,
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if .Site.Params.valine.verify -}}
|
{{- if $valine.verify -}}
|
||||||
verify: true,
|
verify: true,
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with .Site.Params.valine.avatar -}}
|
{{- with $valine.avatar -}}
|
||||||
avatar: '{{ . }}',
|
avatar: '{{ . }}',
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with .Site.Params.valine.meta -}}
|
{{- with $valine.meta -}}
|
||||||
meta: {{ . | safeJS }},
|
meta: {{ . | safeJS }},
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with .Site.Params.valine.pageSize -}}
|
{{- with $valine.pageSize -}}
|
||||||
pageSize: {{ . | safeJS }},
|
pageSize: {{ . | safeJS }},
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
lang: '{{ T "valineLang" }}',
|
lang: '{{ T "valineLang" }}',
|
||||||
{{- if .Site.Params.valine.visitor -}}
|
{{- if $valine.visitor -}}
|
||||||
visitor: true,
|
visitor: true,
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if .Site.Params.valine.recordIP -}}
|
{{- if $valine.recordIP -}}
|
||||||
recordIP: true,
|
recordIP: true,
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
});
|
});
|
||||||
@@ -93,16 +95,17 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- /* Facebook Comment System */ -}}
|
{{- /* Facebook Comment System */ -}}
|
||||||
{{- if .Site.Params.facebook.enable -}}
|
{{- if .Site.Params.comment.facebook.enable -}}
|
||||||
|
{{- $facebook := .Site.Params.comment.facebook -}}
|
||||||
<div id="fb-root"></div>
|
<div id="fb-root"></div>
|
||||||
<div
|
<div
|
||||||
class="fb-comments"
|
class="fb-comments"
|
||||||
data-href="{{ .Site.Params.baseURL }}{{ .Permalink | absURL }}"
|
data-href="{{ .Site.Params.baseURL }}{{ .Permalink | absURL }}"
|
||||||
data-width="{{ .Site.Params.facebook.width }}"
|
data-width="{{ $facebook.width }}"
|
||||||
data-numposts="{{ .Site.Params.facebook.numPosts }}"
|
data-numposts="{{ $facebook.numPosts }}"
|
||||||
></div>
|
></div>
|
||||||
{{- $script := `<script src="https://connect.facebook.net/%s/sdk.js#xfbml=1&version=v5.0&appId=%s&autoLogAppEvents=1" crossorigin="anonymous"></script>` -}}
|
{{- $script := `<script src="https://connect.facebook.net/%s/sdk.js#xfbml=1&version=v5.0&appId=%s&autoLogAppEvents=1" crossorigin="anonymous"></script>` -}}
|
||||||
{{- $script = printf $script .Site.Params.facebook.languageCode .Site.Params.facebook.appId -}}
|
{{- $script = printf $script $facebook.languageCode $facebook.appId -}}
|
||||||
{{- slice $script | .Scratch.Add "scriptCDN" -}}
|
{{- slice $script | .Scratch.Add "scriptCDN" -}}
|
||||||
<noscript>
|
<noscript>
|
||||||
Please enable JavaScript to view the <a href="https://developers.facebook.com/docs/plugins/comments/">comments powered by Facebook.</a>
|
Please enable JavaScript to view the <a href="https://developers.facebook.com/docs/plugins/comments/">comments powered by Facebook.</a>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<div class="copyright-line">
|
<div class="copyright-line">
|
||||||
{{- /* Copyright year */ -}}
|
{{- /* Copyright year */ -}}
|
||||||
<i class="far fa-copyright fa-fw"></i>
|
<i class="far fa-copyright fa-fw"></i>
|
||||||
{{- with .Site.Params.since -}}
|
{{- with .Site.Params.footer.since -}}
|
||||||
<span itemprop="copyrightYear">
|
<span itemprop="copyrightYear">
|
||||||
{{- if lt . now.Year }}{{ . }} - {{ end }}{{ now.Year -}}
|
{{- if lt . now.Year }}{{ . }} - {{ end }}{{ now.Year -}}
|
||||||
</span>
|
</span>
|
||||||
@@ -22,12 +22,12 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- /* License */ -}}
|
{{- /* License */ -}}
|
||||||
{{- with .Site.Params.license -}}
|
{{- with .Site.Params.footer.license -}}
|
||||||
| <span class="license">{{ . | safeHTML }}</span>
|
| <span class="license">{{ . | safeHTML }}</span>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- /* ICP */ -}}
|
{{- /* ICP */ -}}
|
||||||
{{- with .Site.Params.icp -}}
|
{{- with .Site.Params.footer.icp -}}
|
||||||
<span class="icp-splitter"> | </span><br class="icp-br"/>
|
<span class="icp-splitter"> | </span><br class="icp-br"/>
|
||||||
<span class="icp">{{ . | safeHTML }}</span>
|
<span class="icp">{{ . | safeHTML }}</span>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
|
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
|
||||||
|
|
||||||
{{- /* Font Awesome https://fontawesome.com/ */ -}}
|
{{- /* Font Awesome https://fontawesome.com/ */ -}}
|
||||||
{{- with $CDN.fontawesome_free_css -}}
|
{{- with $CDN.fontawesomeFreeCSS -}}
|
||||||
{{- . | safeHTML -}}
|
{{- . | safeHTML -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $res := resources.Get "css/lib/fontawesome-free/all.min.css" -}}
|
{{- $res := resources.Get "css/lib/fontawesome-free/all.min.css" -}}
|
||||||
@@ -43,7 +43,7 @@
|
|||||||
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
|
<link rel="stylesheet" href="{{ $res.RelPermalink }}">
|
||||||
|
|
||||||
{{- /* Animate.css https://github.com/daneden/animate.css */ -}}
|
{{- /* Animate.css https://github.com/daneden/animate.css */ -}}
|
||||||
{{- with $CDN.animate_css -}}
|
{{- with $CDN.animateCSS -}}
|
||||||
{{- . | safeHTML -}}
|
{{- . | safeHTML -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{ $res := resources.Get "css/lib/animate/animate.min.css" -}}
|
{{ $res := resources.Get "css/lib/animate/animate.min.css" -}}
|
||||||
|
|||||||
@@ -1,19 +1,3 @@
|
|||||||
{{- with .Site.Params.google_verification -}}
|
|
||||||
<meta name="google-site-verification" content="{{ . }}" />
|
|
||||||
{{- end -}}
|
|
||||||
{{- with .Site.Params.bing_verification -}}
|
|
||||||
<meta name="msvalidate.01" content="{{ . }}" />
|
|
||||||
{{- end -}}
|
|
||||||
{{- with .Site.Params.yandex_verification -}}
|
|
||||||
<meta name="yandex-verification" content="{{ . }}" />
|
|
||||||
{{- end -}}
|
|
||||||
{{- with .Site.Params.pinterest_verification -}}
|
|
||||||
<meta name="p:domain_verify" content="{{ . }}" />
|
|
||||||
{{- end -}}
|
|
||||||
{{- with .Site.Params.baidu_verification -}}
|
|
||||||
<meta name="baidu-site-verification" content="{{ . }}" />
|
|
||||||
{{- end -}}
|
|
||||||
|
|
||||||
{{- template "_internal/opengraph.html" . -}}
|
{{- template "_internal/opengraph.html" . -}}
|
||||||
{{- template "_internal/twitter_cards.html" . -}}
|
{{- template "_internal/twitter_cards.html" . -}}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,19 @@
|
|||||||
|
{{- with .Site.Params.verification.google -}}
|
||||||
|
<meta name="google-site-verification" content="{{ . }}" />
|
||||||
|
{{- end -}}
|
||||||
|
{{- with .Site.Params.verification.bing -}}
|
||||||
|
<meta name="msvalidate.01" content="{{ . }}" />
|
||||||
|
{{- end -}}
|
||||||
|
{{- with .Site.Params.verification.yandex -}}
|
||||||
|
<meta name="yandex-verification" content="{{ . }}" />
|
||||||
|
{{- end -}}
|
||||||
|
{{- with .Site.Params.verification.pinterest -}}
|
||||||
|
<meta name="p:domain_verify" content="{{ . }}" />
|
||||||
|
{{- end -}}
|
||||||
|
{{- with .Site.Params.verification.baidu -}}
|
||||||
|
<meta name="baidu-site-verification" content="{{ . }}" />
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
{{- /* Home SEO */ -}}
|
{{- /* Home SEO */ -}}
|
||||||
{{- if .IsHome -}}
|
{{- if .IsHome -}}
|
||||||
<script type="application/ld+json">
|
<script type="application/ld+json">
|
||||||
|
|||||||
@@ -44,6 +44,6 @@
|
|||||||
</header>
|
</header>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
window.desktopHeaderMode = {{ .Site.Params.desktopHeaderMode }};
|
window.desktopHeaderMode = {{ .Site.Params.header.desktopMode }};
|
||||||
window.mobileHeaderMode = {{ .Site.Params.mobileHeaderMode }};
|
window.mobileHeaderMode = {{ .Site.Params.header.mobileMode }};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,34 +1,38 @@
|
|||||||
<div class="home-profile">
|
<div class="home-profile">
|
||||||
{{- $avatar := "" -}}
|
{{- $avatar := .Site.Params.home.profile.avatarURL -}}
|
||||||
{{- if .Site.Params.gravatar.email -}}
|
{{- with .Site.Params.home.profile.gravatarEmail -}}
|
||||||
{{- $avatar = (printf "https://www.gravatar.com/avatar/%s?s=240&d=mp" (md5 .Site.Params.gravatar.email)) -}}
|
{{- $avatar = md5 . | printf "https://www.gravatar.com/avatar/%s?s=240&d=mp" -}}
|
||||||
{{- else if .Site.Params.avatar -}}
|
|
||||||
{{- $avatar = .Site.Params.avatar -}}
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if $avatar -}}
|
{{- with $avatar -}}
|
||||||
<div class="home-avatar">
|
<div class="home-avatar">
|
||||||
<a href="/posts">
|
<a href="/posts">
|
||||||
<img src={{ $avatar | relURL }} alt="avatar" title="{{ T "home" }}">
|
<img src={{ . | relURL }} alt="avatar" title="{{ T "home" }}">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- with .Site.Params.subtitle -}}
|
{{- with .Site.Params.home.profile.subtitle -}}
|
||||||
<h2 class="home-description">
|
<h2 class="home-description">
|
||||||
{{- $id := md5 . | printf "tp-%s" -}}
|
{{- if $.Site.Params.home.profile.typeit -}}
|
||||||
<div id={{ printf "r%s" $id }} hidden=true>
|
{{- $id := md5 . | printf "tp-%s" -}}
|
||||||
{{- . | safeHTML -}}
|
<div id={{ printf "r%s" $id }} hidden=true>
|
||||||
</div>
|
{{- . | safeHTML -}}
|
||||||
<div id={{ $id }} class="typeit"></div>
|
</div>
|
||||||
{{- with $.Scratch.Get "typeitMap" -}}
|
<div id={{ $id }} class="typeit"></div>
|
||||||
{{- $.Scratch.Set "typeitMap" (dict $id (slice $id) | merge .) -}}
|
{{- with $.Scratch.Get "typeitMap" -}}
|
||||||
|
{{- $.Scratch.Set "typeitMap" (dict $id (slice $id) | merge .) -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $.Scratch.Set "typeitMap" (dict $id (slice $id)) -}}
|
||||||
|
{{- end -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $.Scratch.Set "typeitMap" (dict $id (slice $id)) -}}
|
{{- . | safeHTML -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</h2>
|
</h2>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
<div class="home-social-links">
|
<div class="home-social-links">
|
||||||
{{- partial "home/social.html" . -}}
|
{{- if .Site.Params.home.profile.social -}}
|
||||||
|
{{- partial "home/social.html" . -}}
|
||||||
|
{{- end -}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="post-info-line">
|
<div class="post-info-line">
|
||||||
<div class="post-info-md">
|
<div class="post-info-md">
|
||||||
{{- if .Site.Params.linkToMarkdown -}}
|
{{- if .Site.Params.page.linkToMarkdown -}}
|
||||||
{{- with .OutputFormats.Get "markdown" -}}
|
{{- with .OutputFormats.Get "markdown" -}}
|
||||||
<span>
|
<span>
|
||||||
<a class="link-to-markdown" href="{{ .Permalink }}" target="_blank">
|
<a class="link-to-markdown" href="{{ .Permalink }}" target="_blank">
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
</div>
|
</div>
|
||||||
<div class="post-info-share">
|
<div class="post-info-share">
|
||||||
{{- if and ( .Param "socialShare" ) (gt (len (.Param "share")) 0) -}}
|
{{- if .Site.Params.page.socialShare -}}
|
||||||
<span>
|
<span>
|
||||||
{{- partial "post/share.html" . -}}
|
{{- partial "post/share.html" . -}}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
|
|
||||||
{{- /* Share on Weibo */ -}}
|
{{- /* Share on Weibo */ -}}
|
||||||
{{- if .Params.Share.Weibo | default .Site.Params.Share.Weibo | eq true -}}
|
{{- if .Params.Share.Weibo | default .Site.Params.Share.Weibo | eq true -}}
|
||||||
<a href="//service.weibo.com/share/share.php?url={{ .Permalink }}&appkey=&title={{ .Title }}{{ with $.Params.featured_image }}&pic={{ . }}{{- end -}}" target="_blank" title="{{ T "share" }} Weibo">
|
<a href="//service.weibo.com/share/share.php?url={{ .Permalink }}&appkey=&title={{ .Title }}{{ with $.Params.featuredImage }}&pic={{ . }}{{- end -}}" target="_blank" title="{{ T "share" }} Weibo">
|
||||||
<i class="fab fa-weibo fa-fw"></i>
|
<i class="fab fa-weibo fa-fw"></i>
|
||||||
</a>
|
</a>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|||||||
@@ -6,14 +6,14 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- /* lazysizes https://github.com/aFarkas/lazysizes */ -}}
|
{{- /* lazysizes https://github.com/aFarkas/lazysizes */ -}}
|
||||||
{{- with $CDN.lazysizes_js -}}
|
{{- with $CDN.lazysizesJS -}}
|
||||||
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- slice "js/lib/lazysizes/lazysizes.min.js" | .Scratch.Add "scriptLocal" -}}
|
{{- slice "js/lib/lazysizes/lazysizes.min.js" | .Scratch.Add "scriptLocal" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- /* Smooth Scroll https://github.com/cferdinandi/smooth-scroll */ -}}
|
{{- /* Smooth Scroll https://github.com/cferdinandi/smooth-scroll */ -}}
|
||||||
{{- with $CDN.smooth_scroll_js -}}
|
{{- with $CDN.smoothScrollJS -}}
|
||||||
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- slice "js/lib/smooth-scroll/smooth-scroll.polyfills.min.js" | .Scratch.Add "scriptLocal" -}}
|
{{- slice "js/lib/smooth-scroll/smooth-scroll.polyfills.min.js" | .Scratch.Add "scriptLocal" -}}
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
{{- /* TypeIt https://github.com/alexmacarthur/typeit */ -}}
|
{{- /* TypeIt https://github.com/alexmacarthur/typeit */ -}}
|
||||||
{{- with .Scratch.Get "typeitMap" -}}
|
{{- with .Scratch.Get "typeitMap" -}}
|
||||||
{{- with $CDN.typeit_js -}}
|
{{- with $CDN.typeitJS -}}
|
||||||
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- slice "js/lib/typeit/typeit.min.js" | $.Scratch.Add "scriptLocal" -}}
|
{{- slice "js/lib/typeit/typeit.min.js" | $.Scratch.Add "scriptLocal" -}}
|
||||||
@@ -36,36 +36,36 @@
|
|||||||
|
|
||||||
{{- /* KaTeX https://github.com/KaTeX/KaTeX */ -}}
|
{{- /* KaTeX https://github.com/KaTeX/KaTeX */ -}}
|
||||||
{{- if .Site.Params.math.enable | and (ne .Params.math false) -}}
|
{{- if .Site.Params.math.enable | and (ne .Params.math false) -}}
|
||||||
{{- with $CDN.katex_css -}}
|
{{- with $CDN.katexCSS -}}
|
||||||
{{- slice . | $.Scratch.Add "linkCDN" -}}
|
{{- slice . | $.Scratch.Add "linkCDN" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- slice "css/lib/katex/katex.min.css" | .Scratch.Add "linkLocal" -}}
|
{{- slice "css/lib/katex/katex.min.css" | .Scratch.Add "linkLocal" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with $CDN.katex_js -}}
|
{{- with $CDN.katexJS -}}
|
||||||
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- slice "js/lib/katex/katex.min.js" | .Scratch.Add "scriptLocal" -}}
|
{{- slice "js/lib/katex/katex.min.js" | .Scratch.Add "scriptLocal" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with $CDN.katex_auto_render_js -}}
|
{{- with $CDN.katexAutoRenderJS -}}
|
||||||
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- slice "js/lib/katex/auto-render.min.js" | .Scratch.Add "scriptLocal" -}}
|
{{- slice "js/lib/katex/auto-render.min.js" | .Scratch.Add "scriptLocal" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $math := .Site.Params.math -}}
|
{{- $math := .Site.Params.math -}}
|
||||||
{{- if $math.copy_tex -}}
|
{{- if $math.copyTex -}}
|
||||||
{{- with $CDN.katex_copy_tex_css -}}
|
{{- with $CDN.katexCopyTexCSS -}}
|
||||||
{{- slice . | $.Scratch.Add "linkCDN" -}}
|
{{- slice . | $.Scratch.Add "linkCDN" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- slice "css/lib/katex/copy-tex.min.css" | .Scratch.Add "linkLocal" -}}
|
{{- slice "css/lib/katex/copy-tex.min.css" | .Scratch.Add "linkLocal" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with $CDN.katex_copy_tex_js -}}
|
{{- with $CDN.katexCopyTexJS -}}
|
||||||
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- slice "js/lib/katex/copy-tex.min.js" | .Scratch.Add "scriptLocal" -}}
|
{{- slice "js/lib/katex/copy-tex.min.js" | .Scratch.Add "scriptLocal" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if $math.mhchem -}}
|
{{- if $math.mhchem -}}
|
||||||
{{- with $CDN.katex_mhchem_js -}}
|
{{- with $CDN.katexMhchemJS -}}
|
||||||
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- slice "js/lib/katex/mhchem.min.js" | .Scratch.Add "scriptLocal" -}}
|
{{- slice "js/lib/katex/mhchem.min.js" | .Scratch.Add "scriptLocal" -}}
|
||||||
@@ -78,11 +78,11 @@
|
|||||||
{ left: "$$", right: "$$", display: true },
|
{ left: "$$", right: "$$", display: true },
|
||||||
{ left: "\\(", right: "\\)", display: false },
|
{ left: "\\(", right: "\\)", display: false },
|
||||||
{ left: "\\[", right: "\\]", display: true },
|
{ left: "\\[", right: "\\]", display: true },
|
||||||
{{- if and $math.block_left_delimiter $math.block_right_delimiter -}}
|
{{- if and $math.blockLeftDelimiter $math.blockRightDelimiter -}}
|
||||||
{ left: "{{ $math.block_left_delimiter }}", right: "{{ $math.block_right_delimiter }}", display: true },
|
{ left: "{{ $math.blockLeftDelimiter }}", right: "{{ $math.blockRightDelimiter }}", display: true },
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if and $math.inline_left_delimiter $math.inline_right_delimiter -}}
|
{{- if and $math.inlineLeftDelimiter $math.inlineRightDelimiter -}}
|
||||||
{ left: "{{ $math.inline_left_delimiter }}", right: "{{ $math.inline_right_delimiter }}", display: false },
|
{ left: "{{ $math.inlineLeftDelimiter }}", right: "{{ $math.inlineRightDelimiter }}", display: false },
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
|
|
||||||
{{- /* mermaid https://github.com/knsv/mermaid */ -}}
|
{{- /* mermaid https://github.com/knsv/mermaid */ -}}
|
||||||
{{- with .Scratch.Get "mermaidMap" -}}
|
{{- with .Scratch.Get "mermaidMap" -}}
|
||||||
{{- with $CDN.mermaid_js -}}
|
{{- with $CDN.mermaidJS -}}
|
||||||
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- slice "js/lib/mermaid/mermaid.min.js" | $.Scratch.Add "scriptLocal" -}}
|
{{- slice "js/lib/mermaid/mermaid.min.js" | $.Scratch.Add "scriptLocal" -}}
|
||||||
@@ -106,20 +106,20 @@
|
|||||||
{{- /* Music */ -}}
|
{{- /* Music */ -}}
|
||||||
{{- if .Scratch.Get "music" -}}
|
{{- if .Scratch.Get "music" -}}
|
||||||
{{- /* APlayer https://github.com/MoePlayer/APlayer */ -}}
|
{{- /* APlayer https://github.com/MoePlayer/APlayer */ -}}
|
||||||
{{- with $CDN.aplayer_css -}}
|
{{- with $CDN.aplayerCSS -}}
|
||||||
{{- slice . | $.Scratch.Add "linkCDN" -}}
|
{{- slice . | $.Scratch.Add "linkCDN" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- slice "css/lib/aplayer/APlayer.min.css" | .Scratch.Add "linkLocal" -}}
|
{{- slice "css/lib/aplayer/APlayer.min.css" | .Scratch.Add "linkLocal" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- slice "css/lib/aplayer/dark.scss" | .Scratch.Add "linkLocal" -}}
|
{{- slice "css/lib/aplayer/dark.scss" | .Scratch.Add "linkLocal" -}}
|
||||||
{{- with $CDN.aplayer_js -}}
|
{{- with $CDN.aplayerJS -}}
|
||||||
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- slice "js/lib/aplayer/APlayer.min.js" | .Scratch.Add "scriptLocal" -}}
|
{{- slice "js/lib/aplayer/APlayer.min.js" | .Scratch.Add "scriptLocal" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- /* MetingJS https://github.com/metowolf/MetingJS */ -}}
|
{{- /* MetingJS https://github.com/metowolf/MetingJS */ -}}
|
||||||
{{- with $CDN.meting_js -}}
|
{{- with $CDN.metingJS -}}
|
||||||
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- slice "js/lib/meting/Meting.min.js" | .Scratch.Add "scriptLocal" -}}
|
{{- slice "js/lib/meting/Meting.min.js" | .Scratch.Add "scriptLocal" -}}
|
||||||
@@ -130,12 +130,12 @@
|
|||||||
{{- if .Params.dev -}}
|
{{- if .Params.dev -}}
|
||||||
{{- /* ECharts https://github.com/apache/incubator-echarts */ -}}
|
{{- /* ECharts https://github.com/apache/incubator-echarts */ -}}
|
||||||
{{- with .Scratch.Get "echartsMap" -}}
|
{{- with .Scratch.Get "echartsMap" -}}
|
||||||
{{- with $CDN.echarts_js -}}
|
{{- with $CDN.echartsJS -}}
|
||||||
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- slice "js/lib/echarts/echarts.min.js" | $.Scratch.Add "scriptLocal" -}}
|
{{- slice "js/lib/echarts/echarts.min.js" | $.Scratch.Add "scriptLocal" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with $CDN.echarts_macarons_js -}}
|
{{- with $CDN.echartsMacaronsJS -}}
|
||||||
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
{{- slice . | $.Scratch.Add "scriptCDN" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- slice "js/lib/echarts/macarons.js" | $.Scratch.Add "scriptLocal" -}}
|
{{- slice "js/lib/echarts/macarons.js" | $.Scratch.Add "scriptLocal" -}}
|
||||||
@@ -151,9 +151,6 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- /* Theme script */ -}}
|
|
||||||
{{- slice "js/theme.js" | .Scratch.Add "scriptLocal" -}}
|
|
||||||
|
|
||||||
{{- range .Scratch.Get "linkCDN" -}}
|
{{- range .Scratch.Get "linkCDN" -}}
|
||||||
{{- safeHTML . -}}
|
{{- safeHTML . -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
@@ -178,3 +175,6 @@
|
|||||||
{{- end -}}
|
{{- end -}}
|
||||||
<script src="{{ $res.RelPermalink }}"></script>
|
<script src="{{ $res.RelPermalink }}"></script>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- /* Theme script */ -}}
|
||||||
|
<script src=/js/theme.min.js></script>
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
<div class="meta">
|
<div class="meta">
|
||||||
<div class="meta-line">
|
<div class="meta-line">
|
||||||
{{- $author := .Params.author | default .Site.Author.name -}}
|
{{- $author := .Params.author | default .Site.Author.name -}}
|
||||||
{{- $author_link := .Params.author_link | default .Site.Author.link | default .Site.BaseURL -}}
|
{{- $authorLink := .Params.authorLink | default .Site.Author.link | default .Site.BaseURL -}}
|
||||||
<a class="author" href="{{ $author_link }}" rel="author" target="_blank">
|
<a class="author" href="{{ $authorLink }}" rel="author" target="_blank">
|
||||||
<i class="fas fa-user-circle fa-fw"></i>{{ $author }}
|
<i class="fas fa-user-circle fa-fw"></i>{{ $author }}
|
||||||
</a>
|
</a>
|
||||||
{{- with .Params.categories -}}
|
{{- with .Params.categories -}}
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{- /* Featured image */ -}}
|
{{- /* Featured image */ -}}
|
||||||
{{- with .Params.featured_image -}}
|
{{- with .Params.featuredImage -}}
|
||||||
<div class="featured-image">
|
<div class="featured-image">
|
||||||
{{- partial "hook/image" . -}}
|
{{- partial "hook/image" . -}}
|
||||||
</div>
|
</div>
|
||||||
@@ -49,8 +49,8 @@
|
|||||||
{{- if or .Params.toc (and .Site.Params.toc (ne .Params.toc false)) -}}
|
{{- if or .Params.toc (and .Site.Params.toc (ne .Params.toc false)) -}}
|
||||||
<div class="post-toc" id="post-toc">
|
<div class="post-toc" id="post-toc">
|
||||||
<h2 class="post-toc-title">{{ T "toc" }}</h2>
|
<h2 class="post-toc-title">{{ T "toc" }}</h2>
|
||||||
{{- $globalAutoCollapseToc := .Site.Params.auto_collapse_toc | default true }}
|
{{- $globalAutoCollapseToc := .Site.Params.autoCollapseToc | default true }}
|
||||||
<div class="post-toc-content{{ if not (and $globalAutoCollapseToc (ne .Params.auto_collapse_toc false)) }} always-active{{ end }}">
|
<div class="post-toc-content{{ if not (and $globalAutoCollapseToc (ne .Params.autoCollapseToc false)) }} always-active{{ end }}">
|
||||||
{{- .TableOfContents -}}
|
{{- .TableOfContents -}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
3905
package-lock.json
generated
Normal file
3905
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
39
package.json
Normal file
39
package.json
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
"name": "loveit-src",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "LoveIt theme source file",
|
||||||
|
"main": "index.js",
|
||||||
|
"dependencies": {},
|
||||||
|
"devDependencies": {
|
||||||
|
"@babel/cli": "^7.8.4",
|
||||||
|
"@babel/core": "^7.8.4",
|
||||||
|
"@babel/preset-env": "^7.8.4",
|
||||||
|
"babel-preset-minify": "^0.5.1",
|
||||||
|
"husky": "^4.2.3"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"build": "npx babel src --out-file static/js/theme.min.js --source-maps",
|
||||||
|
"start": "hugo server --source=exampleSite --themesDir=../.. --disableFastRender -D",
|
||||||
|
"copy": "HUGO_ENV=production hugo -v --source=exampleSite --themesDir=../.. -D --gc --minify && rm -rf resources && cp -rf exampleSite/resources resources"
|
||||||
|
},
|
||||||
|
"husky": {
|
||||||
|
"hooks": {
|
||||||
|
"pre-commit": "npm run build && npm run copy && git add .",
|
||||||
|
"pre-push": "npm run build && npm run copy && git add ."
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/dillonzq/LoveIt.git"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"hugo",
|
||||||
|
"theme"
|
||||||
|
],
|
||||||
|
"author": "Dillon",
|
||||||
|
"license": "MIT",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/dillonzq/LoveIt/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/dillonzq/LoveIt#readme"
|
||||||
|
}
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
.dark-theme .aplayer{background:#212121}.dark-theme .aplayer.aplayer-withlist .aplayer-info{border-bottom-color:#5c5c5c}.dark-theme .aplayer.aplayer-fixed .aplayer-list{border-color:#5c5c5c}.dark-theme .aplayer .aplayer-body{background-color:#212121}.dark-theme .aplayer .aplayer-info{border-top-color:#212121}.dark-theme .aplayer .aplayer-info .aplayer-music .aplayer-title{color:#fff}.dark-theme .aplayer .aplayer-info .aplayer-music .aplayer-author{color:#fff}.dark-theme .aplayer .aplayer-info .aplayer-controller .aplayer-time{color:#eee}.dark-theme .aplayer .aplayer-info .aplayer-controller .aplayer-time .aplayer-icon path{fill:#eee}.dark-theme .aplayer .aplayer-list{background-color:#212121}.dark-theme .aplayer .aplayer-list::-webkit-scrollbar-thumb{background-color:#999}.dark-theme .aplayer .aplayer-list::-webkit-scrollbar-thumb:hover{background-color:#bbb}.dark-theme .aplayer .aplayer-list li{color:#fff;border-top-color:#666}.dark-theme .aplayer .aplayer-list li:hover{background:#4e4e4e}.dark-theme .aplayer .aplayer-list li.aplayer-list-light{background:#6c6c6c}.dark-theme .aplayer .aplayer-list li .aplayer-list-index{color:#ddd}.dark-theme .aplayer .aplayer-list li .aplayer-list-author{color:#ddd}.dark-theme .aplayer .aplayer-lrc{text-shadow:-1px -1px 0 #666}.dark-theme .aplayer .aplayer-lrc:before{background:-moz-linear-gradient(top, #212121 0%, rgba(33,33,33,0) 100%);background:-webkit-linear-gradient(top, #212121 0%, rgba(33,33,33,0) 100%);background:linear-gradient(to bottom, #212121 0%, rgba(33,33,33,0) 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#212121', endColorstr='#00212121',GradientType=0 )}.dark-theme .aplayer .aplayer-lrc:after{background:-moz-linear-gradient(top, rgba(33,33,33,0) 0%, rgba(33,33,33,0.8) 100%);background:-webkit-linear-gradient(top, rgba(33,33,33,0) 0%, rgba(33,33,33,0.8) 100%);background:linear-gradient(to bottom, rgba(33,33,33,0) 0%, rgba(33,33,33,0.8) 100%);filter:progid:DXImageTransform.Microsoft.gradient( startColorstr='#00212121', endColorstr='#cc212121',GradientType=0 )}.dark-theme .aplayer .aplayer-lrc p{color:#fff}.dark-theme .aplayer .aplayer-miniswitcher{background:#484848}.dark-theme .aplayer .aplayer-miniswitcher .aplayer-icon path{fill:#eee}
|
|
||||||
|
|
||||||
/*# sourceMappingURL=dark.css.map */
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{"Target":"css/lib/aplayer/dark.css","MediaType":"text/css","Data":{}}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
.dark-theme .v *,.dark-theme .v .vwrap input,.dark-theme .v .vwrap input::placeholder,.dark-theme .v .veditor,.dark-theme .v .veditor::placeholder,.dark-theme .v a,.dark-theme .v a:hover{color:rgba(255,255,255,0.75);opacity:1}.dark-theme .v .vbtn{color:rgba(255,255,255,0.75);background:#333;border:none}.dark-theme .v .vbtn:hover{color:#3090e4;border-color:#3090e4}.dark-theme .v .vlist .vcard .vhead .vsys{background:#333}.dark-theme .v code,.dark-theme .v pre{background:#272C34}.v code,.v pre{text-align:left}
|
|
||||||
|
|
||||||
/*# sourceMappingURL=dark.css.map */
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{"Target":"css/lib/valine/dark.css","MediaType":"text/css","Data":{}}
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
{"Target":"css/mermaid.css","MediaType":"text/css","Data":{}}
|
|
||||||
4
static/js/theme.min.js
vendored
Normal file
4
static/js/theme.min.js
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
"use strict";function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function _defineProperties(a,b){for(var c,d=0;d<b.length;d++)c=b[d],c.enumerable=c.enumerable||!1,c.configurable=!0,"value"in c&&(c.writable=!0),Object.defineProperty(a,c.key,c)}function _createClass(a,b,c){return b&&_defineProperties(a.prototype,b),c&&_defineProperties(a,c),a}(function(){'use strict';var a=/*#__PURE__*/function(){function a(){_classCallCheck(this,a)}return _createClass(a,[{key:"forEach",value:function forEach(a,b){a=a||[];for(var c=0;c<a.length;c++)b(a[c])}},{key:"getScrollTop",value:function getScrollTop(){return document.documentElement&&document.documentElement.scrollTop||document.body.scrollTop}}]),a}(),b=/*#__PURE__*/function(){function b(){_classCallCheck(this,b),this.util=new a,this.scrollTop=0,this.scrollEvents=[]}return _createClass(b,[{key:"initMobileMenu",value:function initMobileMenu(){document.getElementById("menu-toggle").onclick=function(){document.getElementById("menu-toggle").classList.toggle("active"),document.getElementById("menu-mobile").classList.toggle("active")}}},{key:"initSwitchTheme",value:function initSwitchTheme(){var a=this;this.util.forEach(document.getElementsByClassName("theme-switch"),function(b){b.onclick=function(){document.body.classList.toggle("dark-theme"),window.isDark=!window.isDark,window.localStorage&&window.localStorage.setItem("theme",window.isDark?"dark":"light"),a.initEcharts()}})}},{key:"initHighlight",value:function initHighlight(){this.util.forEach(document.querySelectorAll(".highlight > .chroma"),function(a){var b=a.querySelectorAll("pre.chroma > code"),c=b[b.length-1],d=c?c.className.toLowerCase():"";a.className+=" "+d}),this.util.forEach(document.querySelectorAll(".highlight > pre.chroma"),function(a){var b=document.createElement("div");b.className=a.className;var c=document.createElement("table");b.appendChild(c);var d=document.createElement("tbody");c.appendChild(d);var e=document.createElement("tr");d.appendChild(e);var f=document.createElement("td");e.appendChild(f),a.parentElement.replaceChild(b,a),f.appendChild(a)})}},{key:"initTable",value:function initTable(){this.util.forEach(document.querySelectorAll(".content table"),function(a){var b=document.createElement("div");b.className="table-wrapper",a.parentElement.replaceChild(b,a),b.appendChild(a)})}},{key:"initHeaderLink",value:function initHeaderLink(){for(var a=1;6>=a;a++)this.util.forEach(document.querySelectorAll(".content > h"+a),function(a){a.classList.add("headerLink"),a.innerHTML="<a href=\"#".concat(a.id,"\"></a>").concat(a.innerHTML)})}},{key:"_refactorToc",value:function _refactorToc(a){this.util.forEach(a.querySelectorAll("a:first-child"),function(a){a.classList.add("toc-link")});for(// when headings do not start with `h1`
|
||||||
|
var b,c=a.children[0],d=c;1===d.children.length&&"UL"===(b=d.children[0].children[0]).tagName;)d=b;d!==c&&a.replaceChild(d,c)}},{key:"_initTocState",value:function _initTocState(a){var b=this;if("none"!==window.getComputedStyle(a,null).display){var c="normal"!==window.desktopHeaderMode,d=document.getElementById("header-desktop").getBoundingClientRect().height,e=20+(c?d:0),f=a.offsetTop,g=f-e+(c?0:d),h=document.getElementById("post-footer").offsetTop,j=a.getElementsByClassName("toc-link"),k=document.getElementsByClassName("headerLink")||[],l=a.querySelectorAll(".post-toc-content li"),m=5+(c?d:0),n=function(){var n=b.util.getScrollTop(),o=h-a.getBoundingClientRect().height,p=o-e+(c?0:d);n<g?(a.style.position="absolute",a.style.top="".concat(f,"px")):n>p?(a.style.position="absolute",a.style.top="".concat(o,"px")):(a.style.position="fixed",a.style.top="".concat(e,"px")),b.util.forEach(j,function(a){a.classList.remove("active")}),b.util.forEach(l,function(a){a.classList.remove("has-active")});for(var q=k.length-1,r=0;r<k.length-1;r++){var s=k[r].getBoundingClientRect().top,t=k[r+1].getBoundingClientRect().top;if(0==r&&s>m||s<=m&&t>m){q=r;break}}if(-1!==q){j[q].classList.add("active");for(var u=j[q].parentElement;"NAV"!==u.tagName;)u.classList.add("has-active"),u=u.parentElement.parentElement}};n(),this._initTocOnce||(this.scrollEvents.push(n),this._initTocOnce=!0)}}},{key:"initToc",value:function initToc(){var a=this,b=document.getElementById("post-toc");if(null!==b){var c=document.getElementById("TableOfContents");null===c?b.parentElement.removeChild(b):(this._refactorToc(c),this._initTocState(b),window.addEventListener("resize",function(){window.setTimeout(function(){a._initTocState(b)},0)},!1))}}},{key:"initMermaid",value:function initMermaid(){window.mermaidMap&&(mermaid.initialize({startOnLoad:!1,theme:null}),Object.keys(mermaidMap).forEach(function(a){var b=document.getElementById(a);mermaid.mermaidAPI.render("d"+a,mermaidMap[a],function(a){b.innerHTML=a;var c=b.firstChild;c.style.width="100%"},b)}))}},{key:"initEcharts",value:function initEcharts(){if(window.echartsMap){for(var a=0;a<echartsArr.length;a++)echartsArr[a].dispose();echartsArr=[],Object.keys(echartsMap).forEach(function(a){var b=echarts.init(document.getElementById(a),window.isDark?"dark":"macarons",{renderer:"svg"});b.setOption(echartsMap[a]),echartsArr.push(b)}),window.addEventListener("resize",function(){this.setTimeout(function(){for(var a=0;a<echartsArr.length;a++)echartsArr[a].resize()},0)},!1)}}},{key:"initTypeit",value:function initTypeit(){if(window.typeitArr)for(var a=function(a){var b=typeitArr[a];(function a(c){var d=document.getElementById("r".concat(b[c])).innerHTML;if(c===b.length-1)return void new TypeIt("#".concat(b[c]),{strings:d}).go();var e=new TypeIt("#".concat(b[c]),{strings:d,afterComplete:function afterComplete(){e.destroy(),a(c+1)}}).go()})(0)},b=0;b<typeitArr.length;b++)a(b)}},{key:"initScroll",value:function initScroll(){for(var a=this,b=0;b<this.scrollEvents.length;b++)document.addEventListener("scroll",this.scrollEvents[b],!1);var c=function(){var a=window.matchMedia("only screen and (max-width: 560px)").matches;!a&&"normal"===window.desktopHeaderMode||a&&"normal"===window.mobileHeaderMode?new SmoothScroll("[href^=\"#\"]",{speed:300,speedAsDuration:!0}):new SmoothScroll("[href^=\"#\"]",{speed:300,speedAsDuration:!0,header:"#header-desktop"})};c(),window.addEventListener("resize",function(){window.setTimeout(function(){c()},0)},!1);var d=[];"auto"===window.desktopHeaderMode&&d.push(document.getElementById("header-desktop")),"auto"===window.mobileHeaderMode&&d.push(document.getElementById("header-mobile")),this.util.forEach(d,function(a){a.classList.add("animated"),a.classList.add("faster")});var e=document.getElementById("dynamic-to-top");document.addEventListener("scroll",function(){var b=a.util.getScrollTop();a.util.forEach(d,function(c){a.scrollTop<b?!c.classList.contains("fadeOutUp")&&(c.classList.remove("fadeInDown"),c.classList.add("fadeOutUp")):!c.classList.contains("fadeInDown")&&(c.classList.remove("fadeOutUp"),c.classList.add("fadeInDown")),600<b?a.scrollTop<b?!e.classList.contains("fadeOut")&&(e.classList.remove("fadeIn"),e.classList.add("fadeOut")):(e.style.display="block",!e.classList.contains("fadeIn")&&(e.classList.remove("fadeOut"),e.classList.add("fadeIn"))):e.style.display="none"}),a.scrollTop=b},!1)}},{key:"init",value:function init(){this.initMobileMenu(),this.initSwitchTheme(),this.initHighlight(),this.initTable(),this.initHeaderLink(),this.initMermaid(),this.initEcharts(),this.initTypeit(),this.initToc(),this.initScroll()}}]),b}(),c=function(){var a=new b;a.init()};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",c,!1):c()})();
|
||||||
|
|
||||||
|
//# sourceMappingURL=theme.min.js.map
|
||||||
1
static/js/theme.min.js.map
Normal file
1
static/js/theme.min.js.map
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user