From ffb61b1f3a08e6008d39172c069f0f4fae985320 Mon Sep 17 00:00:00 2001 From: James Tharpe Date: Sat, 19 Aug 2017 17:26:23 -0400 Subject: [PATCH 01/12] Ignores .vscode directory --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..598ae79 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/.vscode From 4805248cdc6a936621f07970203d237106ee7c32 Mon Sep 17 00:00:00 2001 From: James Tharpe Date: Sat, 19 Aug 2017 17:27:12 -0400 Subject: [PATCH 02/12] Adds support for taxonomy pages (terms.html), based on list.html --- layouts/_default/list.html | 20 +------------------- layouts/_default/terms.html | 13 +++++++++++++ layouts/partials/paginator.html | 17 +++++++++++++++++ 3 files changed, 31 insertions(+), 19 deletions(-) create mode 100644 layouts/_default/terms.html create mode 100644 layouts/partials/paginator.html diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 864eea0..74f57fb 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -8,24 +8,6 @@ -{{ if or .Paginator.HasPrev .Paginator.HasNext }} - -
- - {{ if .Paginator.HasPrev }} - - {{ end }} - - {{ if .Paginator.HasNext }} - - {{ end }} - -
- -{{ end }} +{{ partial "paginator" . }} {{ partial "footer" . }} diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html new file mode 100644 index 0000000..74f57fb --- /dev/null +++ b/layouts/_default/terms.html @@ -0,0 +1,13 @@ +{{ partial "header" . }} + +
+ +

{{ .Title }}

+ + {{ range (.Paginator 5).Pages }} {{ partial "list-item" . }} {{ end }} + +
+ +{{ partial "paginator" . }} + +{{ partial "footer" . }} diff --git a/layouts/partials/paginator.html b/layouts/partials/paginator.html new file mode 100644 index 0000000..d6128f4 --- /dev/null +++ b/layouts/partials/paginator.html @@ -0,0 +1,17 @@ +{{ if or .Paginator.HasPrev .Paginator.HasNext }} + +
+ + {{ if .Paginator.HasPrev }} + + {{ end }} {{ if .Paginator.HasNext }} + + {{ end }} + +
+ +{{ end }} \ No newline at end of file From fa1838bc2214235040d1a48c83433d18b7a7c2de Mon Sep 17 00:00:00 2001 From: oneleaftea Date: Tue, 22 Aug 2017 01:48:48 -0700 Subject: [PATCH 03/12] Added ability to disable comments (#20) * Added ability to disable comments with front matter "disable_comments = true". * Replaced disable_comments with disableComments --- layouts/_default/single.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index b385aea..5e8fb92 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -19,7 +19,7 @@ -{{ if .Site.DisqusShortname }} +{{ if and .Site.DisqusShortname (not .Params.disableComments) }} {{ template "_internal/disqus.html" . }} {{ end }} From 33fabfb3369728589d7c779f8a83eb78db1ad865 Mon Sep 17 00:00:00 2001 From: Calin Tataru Date: Tue, 22 Aug 2017 15:39:25 +0100 Subject: [PATCH 04/12] Cleaned up comments section (#19) --- layouts/_default/single.html | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 5e8fb92..57be996 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -17,10 +17,14 @@ {{ end }} - + {{ if and .Site.DisqusShortname (not .Params.disableComments) }} + + + + {{ template "_internal/disqus" . }} -{{ if and .Site.DisqusShortname (not .Params.disableComments) }} - {{ template "_internal/disqus.html" . }} -{{ end }} + {{ end }} + + {{ partial "footer.html" . }} From 80930f757413b03cde2ffafd574a1d2482e4afd6 Mon Sep 17 00:00:00 2001 From: Calin Tataru Date: Tue, 22 Aug 2017 15:40:51 +0100 Subject: [PATCH 05/12] Added disqus to config of example site --- exampleSite/config.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 300e50d..ab5db12 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -2,6 +2,7 @@ baseURL = "http://example.com/" languageCode = "en-us" title = "Minimal" theme = "minimal" +disqusShortname = "username" # delete this to disable disqus comments [params] author = "Calin Tataru" From 556b30d3b418f545efa47f2052fba62eb9b120b1 Mon Sep 17 00:00:00 2001 From: Calin Tataru Date: Tue, 22 Aug 2017 15:52:44 +0100 Subject: [PATCH 06/12] Added script to collapse navigation bar on click (#12) --- layouts/partials/js.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/layouts/partials/js.html b/layouts/partials/js.html index c3fd50d..dcfe7ed 100644 --- a/layouts/partials/js.html +++ b/layouts/partials/js.html @@ -17,3 +17,6 @@ + + + From fc4d59bfd186a5af0a7e040b4355585d715ae12d Mon Sep 17 00:00:00 2001 From: middling Date: Tue, 22 Aug 2017 15:45:39 +0100 Subject: [PATCH 07/12] Fix invalid Rejigger order. The `charset` meta element must be in the [first 1024 bytes](https://www.w3.org/International/questions/qa-html-encoding-declarations#quickanswer) in order to validate. --- layouts/partials/header.html | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/layouts/partials/header.html b/layouts/partials/header.html index 3d09225..b8f9108 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -1,16 +1,10 @@ - - - {{ .Title }} - - {{ partial "css" . }} {{ partial "js" . }} {{ .Hugo.Generator }} - - - + {{ .Title }} + {{ partial "css" . }} {{ partial "js" . }} {{ .Hugo.Generator }} From 2ac9acc008de52f61cc79fe2f93e61ba62e17d3b Mon Sep 17 00:00:00 2001 From: oneleaftea Date: Tue, 22 Aug 2017 08:46:05 -0700 Subject: [PATCH 08/12] fixed disqus template ref --- layouts/_default/single.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 57be996..7a6ba5f 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -21,7 +21,7 @@ - {{ template "_internal/disqus" . }} + {{ template "_internal/disqus.html" . }} {{ end }} From 722ac1f819c63765e9958b89e3dcd1181378ce2e Mon Sep 17 00:00:00 2001 From: Mario Sangiorgio Date: Mon, 28 Aug 2017 01:08:44 +0100 Subject: [PATCH 09/12] Added RSS link I followed the instructions reported at https://gohugo.io/templates/rss/ --- layouts/partials/header.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/layouts/partials/header.html b/layouts/partials/header.html index b8f9108..5db3b6b 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -5,6 +5,10 @@ {{ .Title }} {{ partial "css" . }} {{ partial "js" . }} {{ .Hugo.Generator }} + {{ if .RSSLink }} + + + {{ end }} From d341780f552dccac6b6c7ecbe45b58c7fe46fc6f Mon Sep 17 00:00:00 2001 From: calintat Date: Tue, 29 Aug 2017 18:28:07 +0100 Subject: [PATCH 10/12] Support for custom links in the front matter --- layouts/partials/list-item.html | 1 + 1 file changed, 1 insertion(+) diff --git a/layouts/partials/list-item.html b/layouts/partials/list-item.html index 3d6f795..445eded 100644 --- a/layouts/partials/list-item.html +++ b/layouts/partials/list-item.html @@ -2,6 +2,7 @@ {{ $.Scratch.Set "link" .RelPermalink }} {{ with .Params.repo }} {{ printf "https://github.com/%s/%s/" $.Site.Params.githubUsername . | $.Scratch.Set "link" }} {{ end }} + {{ with .Params.link }} {{ $.Scratch.Set "link" . }} {{ end }} {{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006") | $.Scratch.Set "subtitle" }} {{ with .Description }} {{ $.Scratch.Set "subtitle" . }} {{ end }} From 230ecdc0d4009099cd4d499e027a1a5d6d113ca0 Mon Sep 17 00:00:00 2001 From: calintat Date: Thu, 31 Aug 2017 12:06:03 +0100 Subject: [PATCH 11/12] Support for gitlab and bitbucket repos --- layouts/partials/list-item.html | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/layouts/partials/list-item.html b/layouts/partials/list-item.html index 445eded..93a993b 100644 --- a/layouts/partials/list-item.html +++ b/layouts/partials/list-item.html @@ -1,7 +1,16 @@
{{ $.Scratch.Set "link" .RelPermalink }} - {{ with .Params.repo }} {{ printf "https://github.com/%s/%s/" $.Site.Params.githubUsername . | $.Scratch.Set "link" }} {{ end }} + {{ with .Params.repo }} + {{ $repoHost := default "github" $.Params.repoHost }} + {{ if eq "github" $repoHost }} + {{ printf "https://github.com/%s/%s/" $.Site.Params.githubUsername . | $.Scratch.Set "link" }} + {{ else if eq "gitlab" $repoHost }} + {{ printf "https://gitlab.com/%s/%s/" $.Site.Params.gitlabUsername . | $.Scratch.Set "link" }} + {{ else if eq "bitbucket" $repoHost }} + {{ printf "https://bitbucket.org/%s/%s/" $.Site.Params.bitbucketUsername . | $.Scratch.Set "link" }} + {{ end }} + {{ end }} {{ with .Params.link }} {{ $.Scratch.Set "link" . }} {{ end }} {{ .Date.Format (.Site.Params.dateFormat | default "January 2, 2006") | $.Scratch.Set "subtitle" }} From a1b371cf9ca00a61c77176d7f9963d81dde2b948 Mon Sep 17 00:00:00 2001 From: Mario Sangiorgio Date: Tue, 29 Aug 2017 00:48:13 +0100 Subject: [PATCH 12/12] Improved the responsiveness of img. Without this tweak, when the viewport is smaller than the image, the image overflows the page. With this commit it will be resized to fit the available width. --- static/css/main.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/css/main.css b/static/css/main.css index 726c843..70d8ac4 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -88,3 +88,7 @@ a:hover { footer { border-bottom: var(--border-width) solid var(--accent); } + +img { + max-width: 100%; +} \ No newline at end of file