From 4cb800d4857403fd9ce12db37f9e5224627b4777 Mon Sep 17 00:00:00 2001 From: mark Date: Sat, 6 Jan 2024 05:57:34 +0100 Subject: [PATCH 1/6] Refine comments --- data/structures/table.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/structures/table.yml b/data/structures/table.yml index e24df2eb..f3fd0b40 100644 --- a/data/structures/table.yml +++ b/data/structures/table.yml @@ -23,7 +23,7 @@ arguments: class: type: string optional: true - comment: Class attribute of the table element, e.g. “table-striped-columns w-auto”. + comment: Class attribute of the table element, e.g. `table-striped-columns w-auto`. body: type: string optional: false From 4442833c1b88fe9b9943de3635129b9a4674532f Mon Sep 17 00:00:00 2001 From: mark Date: Sat, 6 Jan 2024 06:09:22 +0100 Subject: [PATCH 2/6] Fix breakpoint-specific responsive behavior --- layouts/shortcodes/table.html | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/layouts/shortcodes/table.html b/layouts/shortcodes/table.html index 3fa9569b..bba177f1 100644 --- a/layouts/shortcodes/table.html +++ b/layouts/shortcodes/table.html @@ -21,7 +21,6 @@ {{ else }} {{ $breakpoint = .Get 0 }} {{ end }} -{{ if eq $breakpoint "none" }}{{ $breakpoint = "" }}{{ end }} {{- $input := .Inner | .Page.RenderString }} @@ -32,6 +31,12 @@ {{- $new := printf "" $class -}} {{ $input := replace $input $old $new -}} -
-{{ $input | safeHTML }} -
\ No newline at end of file +{{ if not $error }} + {{ if eq $breakpoint "none" }} + {{ $input | safeHTML }} + {{ else }} +
+ {{ $input | safeHTML }} +
+ {{ end }} +{{ end }} \ No newline at end of file From 404a5500dfe4adca02e3bebef7b4ef23ad72385f Mon Sep 17 00:00:00 2001 From: mark Date: Sat, 6 Jan 2024 06:09:46 +0100 Subject: [PATCH 3/6] Bump package release --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1ee7f4c4..fb4ae779 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@gethinode/hinode", - "version": "0.22.1", + "version": "0.22.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@gethinode/hinode", - "version": "0.22.1", + "version": "0.22.2", "license": "MIT", "devDependencies": { "@fullhuman/postcss-purgecss": "^5.0.0", diff --git a/package.json b/package.json index afe4ce38..f22517b4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@gethinode/hinode", - "version": "0.22.1", + "version": "0.22.2", "description": "Hinode is a clean documentation and blog theme for Hugo, an open-source static site generator", "keywords": [ "hugo", From 999c7a8fff9db6a456f8b473c97465104b4c5754 Mon Sep 17 00:00:00 2001 From: mark Date: Sat, 6 Jan 2024 06:23:28 +0100 Subject: [PATCH 4/6] Add table shortcode example --- .../content/en/blog/bootstrap-elements.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/exampleSite/content/en/blog/bootstrap-elements.md b/exampleSite/content/en/blog/bootstrap-elements.md index 5e9bf254..826ff10e 100644 --- a/exampleSite/content/en/blog/bootstrap-elements.md +++ b/exampleSite/content/en/blog/bootstrap-elements.md @@ -404,6 +404,22 @@ As an example, the following shortcode displays superscript text. {{< /example >}} +## Table + +As an example, the following shortcode displays a responsive table. + + +{{< example lang="markdown" >}} +{{}} +| # | Heading | Heading | Heading | Heading | Heading | Heading | Heading | Heading | Heading | +|----|---------|---------|---------|---------|---------|---------|---------|---------|---------| +| 1. | cell | cel | cel | cel | cel | cel | cel | cel | cel | +| 2. | cell | cel | cel | cel | cel | cel | cel | cel | cel | +| 3. | cell | cel | cel | cel | cel | cel | cel | cel | cel | +{{}} +{{< /example >}} + + ## Timeline As an example, the following shortcode displays a timeline with the file `data/timeline.en.yml` as data. From 12f6e9e552d67f6a725869cdba7b3d10c66f6721 Mon Sep 17 00:00:00 2001 From: mark Date: Sat, 6 Jan 2024 06:23:39 +0100 Subject: [PATCH 5/6] Update build stats --- exampleSite/hugo_stats.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/exampleSite/hugo_stats.json b/exampleSite/hugo_stats.json index 8fd7d681..66765c1d 100644 --- a/exampleSite/hugo_stats.json +++ b/exampleSite/hugo_stats.json @@ -39,8 +39,14 @@ "sub", "sup", "svg", + "table", + "tbody", + "td", + "th", + "thead", "time", "title", + "tr", "ul", "use" ], @@ -373,6 +379,8 @@ "syntax-highlight", "tab-content", "tab-pane", + "table", + "table-responsive", "tag-link", "text-bg-body", "text-bg-body-tertiary", @@ -518,6 +526,7 @@ "spinner", "sub", "sup", + "table", "timeline", "toast", "toast-container", From 0d2f5cc553892929c56125f82e14d295a1feb303 Mon Sep 17 00:00:00 2001 From: mark Date: Sat, 6 Jan 2024 06:24:29 +0100 Subject: [PATCH 6/6] Fix linting issue --- exampleSite/content/en/blog/bootstrap-elements.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exampleSite/content/en/blog/bootstrap-elements.md b/exampleSite/content/en/blog/bootstrap-elements.md index 826ff10e..ee8e200c 100644 --- a/exampleSite/content/en/blog/bootstrap-elements.md +++ b/exampleSite/content/en/blog/bootstrap-elements.md @@ -404,7 +404,7 @@ As an example, the following shortcode displays superscript text. {{< /example >}} -## Table +## Table As an example, the following shortcode displays a responsive table.