From cae852186cb63abba78d7ff054d365cb3ffc537e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Thu, 24 Nov 2022 21:21:36 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=E2=9C=A8=20Different=20pagination=20style?= =?UTF-8?q?=20by=20@martinvisser?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exampleSite/config/_default/config.toml | 2 +- exampleSite/config/_default/menus.en.toml | 5 +- exampleSite/content/pagtest/_index.md | 19 ++++++ exampleSite/content/pagtest/file1 copy 10.md | 7 ++ exampleSite/content/pagtest/file1 copy 11.md | 7 ++ exampleSite/content/pagtest/file1 copy 12.md | 7 ++ exampleSite/content/pagtest/file1 copy 13.md | 7 ++ exampleSite/content/pagtest/file1 copy 14.md | 7 ++ exampleSite/content/pagtest/file1 copy 15.md | 7 ++ exampleSite/content/pagtest/file1 copy 16.md | 7 ++ exampleSite/content/pagtest/file1 copy 17.md | 7 ++ exampleSite/content/pagtest/file1 copy 18.md | 7 ++ exampleSite/content/pagtest/file1 copy 19.md | 7 ++ exampleSite/content/pagtest/file1 copy 2.md | 7 ++ exampleSite/content/pagtest/file1 copy 20.md | 7 ++ exampleSite/content/pagtest/file1 copy 21.md | 7 ++ exampleSite/content/pagtest/file1 copy 22.md | 7 ++ exampleSite/content/pagtest/file1 copy 23.md | 7 ++ exampleSite/content/pagtest/file1 copy 24.md | 7 ++ exampleSite/content/pagtest/file1 copy 25.md | 7 ++ exampleSite/content/pagtest/file1 copy 26.md | 7 ++ exampleSite/content/pagtest/file1 copy 27.md | 7 ++ exampleSite/content/pagtest/file1 copy 28.md | 7 ++ exampleSite/content/pagtest/file1 copy 3.md | 7 ++ exampleSite/content/pagtest/file1 copy 4.md | 7 ++ exampleSite/content/pagtest/file1 copy 5.md | 7 ++ exampleSite/content/pagtest/file1 copy 6.md | 7 ++ exampleSite/content/pagtest/file1 copy 7.md | 7 ++ exampleSite/content/pagtest/file1 copy 8.md | 7 ++ exampleSite/content/pagtest/file1 copy 9.md | 7 ++ exampleSite/content/pagtest/file1 copy.md | 7 ++ exampleSite/content/pagtest/file1.md | 7 ++ layouts/partials/pagination.html | 72 +++++++++++--------- 33 files changed, 268 insertions(+), 33 deletions(-) create mode 100644 exampleSite/content/pagtest/_index.md create mode 100644 exampleSite/content/pagtest/file1 copy 10.md create mode 100644 exampleSite/content/pagtest/file1 copy 11.md create mode 100644 exampleSite/content/pagtest/file1 copy 12.md create mode 100644 exampleSite/content/pagtest/file1 copy 13.md create mode 100644 exampleSite/content/pagtest/file1 copy 14.md create mode 100644 exampleSite/content/pagtest/file1 copy 15.md create mode 100644 exampleSite/content/pagtest/file1 copy 16.md create mode 100644 exampleSite/content/pagtest/file1 copy 17.md create mode 100644 exampleSite/content/pagtest/file1 copy 18.md create mode 100644 exampleSite/content/pagtest/file1 copy 19.md create mode 100644 exampleSite/content/pagtest/file1 copy 2.md create mode 100644 exampleSite/content/pagtest/file1 copy 20.md create mode 100644 exampleSite/content/pagtest/file1 copy 21.md create mode 100644 exampleSite/content/pagtest/file1 copy 22.md create mode 100644 exampleSite/content/pagtest/file1 copy 23.md create mode 100644 exampleSite/content/pagtest/file1 copy 24.md create mode 100644 exampleSite/content/pagtest/file1 copy 25.md create mode 100644 exampleSite/content/pagtest/file1 copy 26.md create mode 100644 exampleSite/content/pagtest/file1 copy 27.md create mode 100644 exampleSite/content/pagtest/file1 copy 28.md create mode 100644 exampleSite/content/pagtest/file1 copy 3.md create mode 100644 exampleSite/content/pagtest/file1 copy 4.md create mode 100644 exampleSite/content/pagtest/file1 copy 5.md create mode 100644 exampleSite/content/pagtest/file1 copy 6.md create mode 100644 exampleSite/content/pagtest/file1 copy 7.md create mode 100644 exampleSite/content/pagtest/file1 copy 8.md create mode 100644 exampleSite/content/pagtest/file1 copy 9.md create mode 100644 exampleSite/content/pagtest/file1 copy.md create mode 100644 exampleSite/content/pagtest/file1.md diff --git a/exampleSite/config/_default/config.toml b/exampleSite/config/_default/config.toml index a933db89..f5712daf 100644 --- a/exampleSite/config/_default/config.toml +++ b/exampleSite/config/_default/config.toml @@ -7,7 +7,7 @@ baseURL = "https://nunocoracao.github.io/blowfish" defaultContentLanguage = "en" enableRobotsTXT = true -paginate = 20 +paginate = 10 summaryLength = 30 buildDrafts = false diff --git a/exampleSite/config/_default/menus.en.toml b/exampleSite/config/_default/menus.en.toml index 3b71ca0c..fcfddb07 100644 --- a/exampleSite/config/_default/menus.en.toml +++ b/exampleSite/config/_default/menus.en.toml @@ -35,7 +35,10 @@ url = "http://tee.pub/lic/qwSlWVBL5zc" weight = 50 - +#[[main]] +# name = "Test" +# pageRef = "pagTest" +# weight = 1000 [[main]] identifier = "twitter" diff --git a/exampleSite/content/pagtest/_index.md b/exampleSite/content/pagtest/_index.md new file mode 100644 index 00000000..a2578a5c --- /dev/null +++ b/exampleSite/content/pagtest/_index.md @@ -0,0 +1,19 @@ +--- +title: "TEST" +date: 2022-06-13T20:55:37+01:00 +draft: true + +showDate : false +showDateUpdated : false +showHeadingAnchors : false +showPagination : false +showReadingTime : false +showTableOfContents : true +showTaxonomies : false +showWordCount : false +showSummary : false +sharingLinks : false + +cardView: false +--- + diff --git a/exampleSite/content/pagtest/file1 copy 10.md b/exampleSite/content/pagtest/file1 copy 10.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 10.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 11.md b/exampleSite/content/pagtest/file1 copy 11.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 11.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 12.md b/exampleSite/content/pagtest/file1 copy 12.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 12.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 13.md b/exampleSite/content/pagtest/file1 copy 13.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 13.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 14.md b/exampleSite/content/pagtest/file1 copy 14.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 14.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 15.md b/exampleSite/content/pagtest/file1 copy 15.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 15.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 16.md b/exampleSite/content/pagtest/file1 copy 16.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 16.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 17.md b/exampleSite/content/pagtest/file1 copy 17.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 17.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 18.md b/exampleSite/content/pagtest/file1 copy 18.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 18.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 19.md b/exampleSite/content/pagtest/file1 copy 19.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 19.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 2.md b/exampleSite/content/pagtest/file1 copy 2.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 2.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 20.md b/exampleSite/content/pagtest/file1 copy 20.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 20.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 21.md b/exampleSite/content/pagtest/file1 copy 21.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 21.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 22.md b/exampleSite/content/pagtest/file1 copy 22.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 22.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 23.md b/exampleSite/content/pagtest/file1 copy 23.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 23.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 24.md b/exampleSite/content/pagtest/file1 copy 24.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 24.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 25.md b/exampleSite/content/pagtest/file1 copy 25.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 25.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 26.md b/exampleSite/content/pagtest/file1 copy 26.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 26.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 27.md b/exampleSite/content/pagtest/file1 copy 27.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 27.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 28.md b/exampleSite/content/pagtest/file1 copy 28.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 28.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 3.md b/exampleSite/content/pagtest/file1 copy 3.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 3.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 4.md b/exampleSite/content/pagtest/file1 copy 4.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 4.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 5.md b/exampleSite/content/pagtest/file1 copy 5.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 5.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 6.md b/exampleSite/content/pagtest/file1 copy 6.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 6.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 7.md b/exampleSite/content/pagtest/file1 copy 7.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 7.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 8.md b/exampleSite/content/pagtest/file1 copy 8.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 8.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy 9.md b/exampleSite/content/pagtest/file1 copy 9.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy 9.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1 copy.md b/exampleSite/content/pagtest/file1 copy.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1 copy.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/exampleSite/content/pagtest/file1.md b/exampleSite/content/pagtest/file1.md new file mode 100644 index 00000000..6c1f9414 --- /dev/null +++ b/exampleSite/content/pagtest/file1.md @@ -0,0 +1,7 @@ +--- +title: "Charts" +date: 2019-03-06 +summary: "Blowfish includes Chart.js for powerful charts and data visualisations." +tags: ["chart", "sample", "graph", "shortcodes"] +showDate: false +--- \ No newline at end of file diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html index 8f4cf25d..c5233132 100644 --- a/layouts/partials/pagination.html +++ b/layouts/partials/pagination.html @@ -1,39 +1,49 @@ -{{ $paginator := .Paginator }} -{{ if gt $paginator.TotalPages 1 }} - -{{ end }} +{{- end -}} \ No newline at end of file From ee838f05902850c9cf96fdcb849d7d79a5f97fbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nuno=20Cora=C3=A7=C3=A3o?= Date: Thu, 24 Nov 2022 21:24:43 +0000 Subject: [PATCH 2/2] fixed bug --- exampleSite/config/_default/config.toml | 2 +- layouts/_default/list.html | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/exampleSite/config/_default/config.toml b/exampleSite/config/_default/config.toml index f5712daf..a933db89 100644 --- a/exampleSite/config/_default/config.toml +++ b/exampleSite/config/_default/config.toml @@ -7,7 +7,7 @@ baseURL = "https://nunocoracao.github.io/blowfish" defaultContentLanguage = "en" enableRobotsTXT = true -paginate = 10 +paginate = 20 summaryLength = 30 buildDrafts = false diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 05a88421..0919d81c 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -227,7 +227,6 @@ {{ end }} {{ end }} - {{ partial "pagination.html" . }} {{ end }} {{ else }} @@ -237,4 +236,8 @@

{{ end }} - {{ end }} \ No newline at end of file + + {{ partial "pagination.html" . }} + + {{ end }} + \ No newline at end of file