From ffd3ccd0721f3edcb607b5e5b9f15fa017f375a2 Mon Sep 17 00:00:00 2001 From: David Karlsson <35727626+dvdksn@users.noreply.github.com> Date: Thu, 10 Oct 2024 10:31:34 +0200 Subject: [PATCH] hugo: use render hook for markdown tables Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com> --- assets/css/typography.css | 5 --- hugo_stats.json | 2 ++ layouts/_default/_markup/render-table.html | 39 ++++++++++++++++++++++ 3 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 layouts/_default/_markup/render-table.html diff --git a/assets/css/typography.css b/assets/css/typography.css index a0c6511e59..008e7af704 100644 --- a/assets/css/typography.css +++ b/assets/css/typography.css @@ -73,10 +73,5 @@ @apply text-lg; line-height: 1.75; } - table { - display: block; - overflow-x: auto; - max-width: 100%; - } } } diff --git a/hugo_stats.json b/hugo_stats.json index 4ea6d584b2..a94d109722 100644 --- a/hugo_stats.json +++ b/hugo_stats.json @@ -155,6 +155,7 @@ "bg-gradient-to-br", "bg-gradient-to-r", "bg-gradient-to-t", + "bg-gray-dark-200", "bg-gray-light-100", "bg-gray-light-200", "bg-gray-light-400", @@ -416,6 +417,7 @@ "outline-none", "overflow-clip", "overflow-hidden", + "overflow-x-auto", "overflow-x-hidden", "overflow-y-auto", "p-1", diff --git a/layouts/_default/_markup/render-table.html b/layouts/_default/_markup/render-table.html new file mode 100644 index 0000000000..1a32125cc1 --- /dev/null +++ b/layouts/_default/_markup/render-table.html @@ -0,0 +1,39 @@ +
+ + + {{- range .THead }} + + {{- range . }} + + {{- end }} + + {{- end }} + + + {{- range .TBody }} + + {{- range . }} + + {{- end }} + + {{- end }} + +
+ {{- .Text -}} +
+ {{- .Text -}} +
+