From 5567510750095f83ac535665dd37f6ee96396519 Mon Sep 17 00:00:00 2001 From: Hang Jiang Date: Sun, 5 Mar 2017 12:21:02 +0800 Subject: [PATCH 1/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e523a6c..5a6a166 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Cactus Plus -[English Documention](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/README.md) | [中文文档](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/README_zh-cn.md) +[English Document](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/README.md) | [中文文档](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/README_zh-cn.md) Cactus Plus is a minimalistic theme for bloggers based on the theme named [Cactus](https://github.com/digitalcraftsman/hugo-cactus-theme). From 145ebcb9916d4676a7cf29e59a888fa7722dc730 Mon Sep 17 00:00:00 2001 From: nodejh Date: Tue, 7 Mar 2017 22:46:14 +0800 Subject: [PATCH 2/6] update README.md --- README.md | 37 ++++++++++++++++++++++++++++++++++++- README_zh-cn.md | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5a6a166..b2215b6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,27 @@ -# Cactus Plus + + +- [Cactus Plus](#cactus-plus) + - [Screenshot](#screenshot) + - [Installation](#installation) + - [Example Site](#example-site) + - [The config file](#the-config-file) + - [About page](#about-page) + - [Tags page](#tags-page) + - [Avatar](#avatar) + - [Hide pages](#hide-pages) + - [Disqus](#disqus) + - [Duoshuo](#duoshuo) + - [Disable Comment](#disable-comment) + - [Google Analytics](#google-analytics) + - [Baidu Tongji](#baidu-tongji) + - [Social link icons](#social-link-icons) + - [Nearly finished](#nearly-finished) + - [License](#license) + - [Acknowledgements](#acknowledgements) + + +# Cactus Plus [English Document](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/README.md) | [中文文档](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/README_zh-cn.md) @@ -53,6 +75,19 @@ To use it, copy the [`config.toml`](https://github.com/nodejh/hugo-theme-cactus- Use the about page to introduce yourself to your visitors. You can customize the content as you like in the `/content/about/index.md`. +## Tags page + +Use the tags page to show all post's tags. You can create the file `/content/tags/index.md` and set `hidden = true`. + +For example: + +```markdown ++++ +date = "2015-06-20T14:02:37+02:00" +title = "Tags" +hidden = true ++++ + ## Avatar Furthermore, you should replace the [avatar placeholder](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/static/images/) with a great image of yourself. diff --git a/README_zh-cn.md b/README_zh-cn.md index 2dc7b2c..41bd470 100644 --- a/README_zh-cn.md +++ b/README_zh-cn.md @@ -1,3 +1,26 @@ + + +- [Cactus Plus](#cactus-plus) + - [截图](#截图) + - [安装](#安装) + - [示例站点](#示例站点) + - [配置文件](#配置文件) + - [关于页面](#关于页面) + - [标签页](#标签页) + - [头像](#头像) + - [隐藏页面](#隐藏页面) + - [Disqus 评论](#disqus-评论) + - [多说评论](#多说评论) + - [不使用评论系统](#不使用评论系统) + - [Google Analytics](#google-analytics) + - [百度统计](#百度统计) + - [社交链接](#社交链接) + - [部署主题](#部署主题) + - [License](#license) + - [鸣谢](#鸣谢) + + + # Cactus Plus @@ -57,6 +80,19 @@ $ git clone https://github.com/nodejh/hugo-theme-cactus-plus.git 你也可以参考本主题示例站点中的关于页:[`exampleSite/content/about/index.md`](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/exampleSite/content/about/index.md)。 +## 标签页 + +本主题也提供了 `标签页` 功能。 + +在 `content` 目录下新建一个名为 `tags` 的目录,然后在次目录创建一个名为 `index.md` 的文件,写入下面的内容,注意设置 `hidden = true` 即可: + +```markdown ++++ +date = "2015-06-20T14:02:37+02:00" +title = "Tags" +hidden = true ++++ +``` ## 头像 From 050de56dbe622e7a9b0a90b63a30616d58cd27e3 Mon Sep 17 00:00:00 2001 From: nodejh Date: Tue, 7 Mar 2017 22:50:00 +0800 Subject: [PATCH 3/6] update README.md --- README.md | 4 ++-- README_zh-cn.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b2215b6..26c2615 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ - [Screenshot](#screenshot) - [Installation](#installation) - [Example Site](#example-site) - - [The config file](#the-config-file) + - [The config file](#the-config-file) - [About page](#about-page) - [Tags page](#tags-page) - [Avatar](#avatar) @@ -65,7 +65,7 @@ For more information read the official [setup guide](//gohugo.io/overview/instal There is an example site with config file and markdown files in [`exampleSite`](https://github.com/nodejh/hugo-theme-cactus-plus/tree/master/exampleSite) directory. -### The config file +## The config file Take a look inside the [`exampleSite`](https://github.com/nodejh/hugo-theme-cactus-plus/tree/master/exampleSite) folder of this theme. You'll find a file called [`config.toml`](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/exampleSite/config.toml). diff --git a/README_zh-cn.md b/README_zh-cn.md index 41bd470..fa529e0 100644 --- a/README_zh-cn.md +++ b/README_zh-cn.md @@ -4,7 +4,7 @@ - [截图](#截图) - [安装](#安装) - [示例站点](#示例站点) - - [配置文件](#配置文件) + - [配置文件](#配置文件) - [关于页面](#关于页面) - [标签页](#标签页) - [头像](#头像) @@ -67,7 +67,7 @@ $ git clone https://github.com/nodejh/hugo-theme-cactus-plus.git [`exampleSite`](https://github.com/nodejh/hugo-theme-cactus-plus/tree/master/exampleSite) 是本主题的一个示例站点,里面有配置文件、关于页面的一些示例。 -### 配置文件 +## 配置文件 本主题提供了一个示例配置文件是 [`exampleSite`](https://github.com/nodejh/hugo-theme-cactus-plus/tree/master/exampleSite) 目录里的 [`config.toml`](https://github.com/nodejh/hugo-theme-cactus-plus/blob/master/exampleSite/config.toml) 文件。 From e8c0d92137359ab25cd72f001f5474204d0ca936 Mon Sep 17 00:00:00 2001 From: nodejh Date: Tue, 7 Mar 2017 22:52:10 +0800 Subject: [PATCH 4/6] update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 26c2615..1c63605 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,7 @@ date = "2015-06-20T14:02:37+02:00" title = "Tags" hidden = true +++ +``` ## Avatar From 4a476bbd82e5f24b7783fed4bd546b17535a16db Mon Sep 17 00:00:00 2001 From: Zihao Zhang Date: Sat, 18 Mar 2017 20:18:33 -0700 Subject: [PATCH 5/6] Use wrapper class instead of id --- layouts/404.html | 2 +- layouts/_default/list.html | 2 +- layouts/_default/single.html | 2 +- layouts/about/single.html | 2 +- layouts/index.html | 2 +- layouts/partials/profile.html | 20 +++++++++----------- layouts/tags/single.html | 2 +- static/css/style.css | 10 +++++----- 8 files changed, 20 insertions(+), 22 deletions(-) diff --git a/layouts/404.html b/layouts/404.html index d5b27a6..06246e4 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -2,7 +2,7 @@ {{ partial "nav.html" . }} -
+

{{ with .Site.Params.title404 }}{{ . }}{{ else }}404 - Page not found{{ end }}

diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 860a629..5539d55 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -3,7 +3,7 @@ {{ partial "nav.html" . }} {{ partial "profile.html" . }} -
+
{{ range .Data.Pages.GroupByDate "2006" }}

{{ .Key }}

diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 6dbb01a..b274288 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -2,7 +2,7 @@ {{ partial "nav.html" . }} -
+

diff --git a/layouts/about/single.html b/layouts/about/single.html index 4933005..6e131de 100644 --- a/layouts/about/single.html +++ b/layouts/about/single.html @@ -3,7 +3,7 @@ {{ partial "nav.html" . }} {{ partial "profile.html" . }} -
+
{{ .Content }} {{ if .Site.Params.enableDisqus }} diff --git a/layouts/index.html b/layouts/index.html index 74411da..273b5a9 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -4,7 +4,7 @@ {{ partial "profile.html" . }} -
+
{{ partial "post-list.html" . }} {{ partial "pagination.html" . }} {{ partial "footer.html" . }} diff --git a/layouts/partials/profile.html b/layouts/partials/profile.html index d58f285..ec80961 100644 --- a/layouts/partials/profile.html +++ b/layouts/partials/profile.html @@ -1,11 +1,9 @@ -
-
- -
-
\ No newline at end of file +
+ +
diff --git a/layouts/tags/single.html b/layouts/tags/single.html index d03d7a0..a16f3d4 100644 --- a/layouts/tags/single.html +++ b/layouts/tags/single.html @@ -3,7 +3,7 @@ {{ partial "nav.html" . }} {{ partial "profile.html" . }} -
+
{{ range $name, $taxonomy := .Site.Taxonomies.tags }} diff --git a/static/css/style.css b/static/css/style.css index 8de4f4f..06aa687 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -134,7 +134,7 @@ h2 { color: #bbb; } -.profile #wrapper { +.wrapper.profile { padding: 100px 40px 0px; max-width: 600px; margin: 0 auto; @@ -200,13 +200,13 @@ nav.main-nav a.cta { margin-left: 12px; } -#wrapper { +.wrapper { max-width: 600px; margin: 0 auto; padding: 60px 40px 100px 40px; } -#wrapper.home { +.wrapper.home { max-width: 600px; margin: 0 auto; padding: 0px 40px 20px 40px; @@ -747,7 +747,7 @@ h2.month { /* Media Queries */ @media screen and (max-width: 540px) { - #wrapper { + .wrapper { padding: 20px 20px 20px 20px; } #header { @@ -871,7 +871,7 @@ code { * tags page */ -#wrapper.tags { +.wrapper.tags { padding: 0px 40px 20px 40px; } .page-tags { From 72b335765dc3a7879b355ed1c143c3fec348907e Mon Sep 17 00:00:00 2001 From: Hang Jiang Date: Fri, 24 Mar 2017 01:48:56 +0800 Subject: [PATCH 6/6] Revert "Use wrapper class instead of id" --- layouts/404.html | 2 +- layouts/_default/list.html | 2 +- layouts/_default/single.html | 2 +- layouts/about/single.html | 2 +- layouts/index.html | 2 +- layouts/partials/profile.html | 20 +++++++++++--------- layouts/tags/single.html | 2 +- static/css/style.css | 10 +++++----- 8 files changed, 22 insertions(+), 20 deletions(-) diff --git a/layouts/404.html b/layouts/404.html index 06246e4..d5b27a6 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -2,7 +2,7 @@ {{ partial "nav.html" . }} -
+

{{ with .Site.Params.title404 }}{{ . }}{{ else }}404 - Page not found{{ end }}

diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 5539d55..860a629 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -3,7 +3,7 @@ {{ partial "nav.html" . }} {{ partial "profile.html" . }} -
+
{{ range .Data.Pages.GroupByDate "2006" }}

{{ .Key }}

diff --git a/layouts/_default/single.html b/layouts/_default/single.html index b274288..6dbb01a 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -2,7 +2,7 @@ {{ partial "nav.html" . }} -
+

diff --git a/layouts/about/single.html b/layouts/about/single.html index 6e131de..4933005 100644 --- a/layouts/about/single.html +++ b/layouts/about/single.html @@ -3,7 +3,7 @@ {{ partial "nav.html" . }} {{ partial "profile.html" . }} -
+
{{ .Content }} {{ if .Site.Params.enableDisqus }} diff --git a/layouts/index.html b/layouts/index.html index 273b5a9..74411da 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -4,7 +4,7 @@ {{ partial "profile.html" . }} -
+
{{ partial "post-list.html" . }} {{ partial "pagination.html" . }} {{ partial "footer.html" . }} diff --git a/layouts/partials/profile.html b/layouts/partials/profile.html index ec80961..d58f285 100644 --- a/layouts/partials/profile.html +++ b/layouts/partials/profile.html @@ -1,9 +1,11 @@ -
- -
+
+
+ +
+
\ No newline at end of file diff --git a/layouts/tags/single.html b/layouts/tags/single.html index a16f3d4..d03d7a0 100644 --- a/layouts/tags/single.html +++ b/layouts/tags/single.html @@ -3,7 +3,7 @@ {{ partial "nav.html" . }} {{ partial "profile.html" . }} -
+
{{ range $name, $taxonomy := .Site.Taxonomies.tags }} diff --git a/static/css/style.css b/static/css/style.css index 06aa687..8de4f4f 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -134,7 +134,7 @@ h2 { color: #bbb; } -.wrapper.profile { +.profile #wrapper { padding: 100px 40px 0px; max-width: 600px; margin: 0 auto; @@ -200,13 +200,13 @@ nav.main-nav a.cta { margin-left: 12px; } -.wrapper { +#wrapper { max-width: 600px; margin: 0 auto; padding: 60px 40px 100px 40px; } -.wrapper.home { +#wrapper.home { max-width: 600px; margin: 0 auto; padding: 0px 40px 20px 40px; @@ -747,7 +747,7 @@ h2.month { /* Media Queries */ @media screen and (max-width: 540px) { - .wrapper { + #wrapper { padding: 20px 20px 20px 20px; } #header { @@ -871,7 +871,7 @@ code { * tags page */ -.wrapper.tags { +#wrapper.tags { padding: 0px 40px 20px 40px; } .page-tags {