diff options
author | Chen Xianmin <xianmin12@gmail.com> | 2022-08-25 04:52:40 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-25 04:52:40 +0300 |
commit | 600eba872e953001cda4bc2ebda5da51bce57482 (patch) | |
tree | 62279bd6e8de800afa561432ffce1d73398ad082 | |
parent | 41271dbd41410aaa68927dc82731cdd5020db5fb (diff) | |
parent | c5b222d0eb00f29be75744f8fdd5c0ebe64ae30a (diff) |
Merge pull request #339 from Darthagnon/pull-request-01
-rw-r--r-- | .gitmodules | 0 | ||||
-rw-r--r-- | archetypes/default.md | 8 | ||||
-rw-r--r-- | archetypes/post.md | 31 | ||||
-rw-r--r-- | exampleSite/config.toml | 2 | ||||
-rw-r--r-- | exampleSite/full-config.toml | 4 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 2 | ||||
-rw-r--r-- | layouts/partials/head.html | 12 |
7 files changed, 57 insertions, 2 deletions
diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/.gitmodules diff --git a/archetypes/default.md b/archetypes/default.md index dd9dc12..4eb707b 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -9,6 +9,8 @@ tags: [] categories: [] author: "" +# Uncomment to pin article to front page +# weight: 1 # You can also close(false) or open(true) something for this content. # P.S. comment can only be closed comment: false @@ -18,6 +20,12 @@ autoCollapseToc: false contentCopyright: false reward: false mathjax: false + +# Uncomment to add to the homepage's dropdown menu; weight = order of article +# menu: +# main: +# parent: "docs" +# weight: 1 --- <!--more--> diff --git a/archetypes/post.md b/archetypes/post.md new file mode 100644 index 0000000..4eb707b --- /dev/null +++ b/archetypes/post.md @@ -0,0 +1,31 @@ +--- +title: "{{ replace .TranslationBaseName "-" " " | title }}" +date: {{ .Date }} +lastmod: {{ .Date }} +draft: true +keywords: [] +description: "" +tags: [] +categories: [] +author: "" + +# Uncomment to pin article to front page +# weight: 1 +# You can also close(false) or open(true) something for this content. +# P.S. comment can only be closed +comment: false +toc: false +autoCollapseToc: false +# You can also define another contentCopyright. e.g. contentCopyright: "This is another copyright." +contentCopyright: false +reward: false +mathjax: false + +# Uncomment to add to the homepage's dropdown menu; weight = order of article +# menu: +# main: +# parent: "docs" +# weight: 1 +--- + +<!--more--> diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 3986643..11b08fe 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -72,7 +72,7 @@ defaultContentLanguage = "en" # Default language to use toc = true # 是否开启目录 photoswipe = true # see https://github.com/dimsemenov/PhotoSwipe # 是否启用PhotoSwipe(图片可点击) contentCopyright = '<a rel="license noopener" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank">CC BY-NC-ND 4.0</a>' - + # Link custom CSS and JS assets # (relative to /static/css and /static/js respectively) customCSS = [] # if ['custom.css'], load '/static/css/custom.css' file diff --git a/exampleSite/full-config.toml b/exampleSite/full-config.toml index 28a9e01..2f847de 100644 --- a/exampleSite/full-config.toml +++ b/exampleSite/full-config.toml @@ -94,6 +94,10 @@ defaultContentLanguage = "en" # Default language to use showMenuLanguageChooser = true showAuthorInfo = true # show author info below the article + + # Optional custom wallpaper image URL. Can be a remote image or local /static/img/wallpaper.jpg (make sure it has a small filesize for quick site painting) + # wallpaper = "/static/img/wallpaper.jpg" + wallpaper = "https://followingmyfeet.com/wp-content/uploads/2018/02/825_2229-HDR.jpg" # 一些全局开关,你也可以在每一篇内容的 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`. diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index a3df1dc..9efa8bf 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -45,7 +45,7 @@ </header> <div id="mobile-panel"> - <main id="main" class="main bg-llight"> + <main id="main" class="main bg-llight wallpaper"> <div class="content-wrapper"> <div id="content" class="content container"> {{ block "content" . }}{{ end }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 3728b97..41fc462 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -78,6 +78,18 @@ <link rel="stylesheet" href="{{ $style.RelPermalink }}" integrity="{{ $style.Data.Integrity }}" media="screen" crossorigin="anonymous"> <!-- End --> +<!-- Custom wallpaper (optional) --> +{{- if .Site.Params.wallpaper }} +<style> + .wallpaper { + background-image: url('{{ .Site.Params.wallpaper }}'); + background-repeat: no-repeat; + background-attachment: fixed; + background-size: cover; + } +</style> +{{- end }} + <!-- custom css --> {{ range .Site.Params.customCSS }} <link rel="stylesheet" href="{{ "/css/" | relURL }}{{ . }}"> |