diff --git a/assets/theme-css/tables.css b/assets/theme-css/tables.css index db49eb29..f2d46114 100644 --- a/assets/theme-css/tables.css +++ b/assets/theme-css/tables.css @@ -1,7 +1,5 @@ -/* Make wide tables scroll on their own, since the content column does not. */ -table { - display: block; - width: max-content; +/* Make wide content tables scroll on their own, since the content column does not. */ +.table-wrapper { max-width: 100%; overflow-x: auto; } diff --git a/layouts/_default/_markup/render-table.html b/layouts/_default/_markup/render-table.html new file mode 100644 index 00000000..50310a6b --- /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 -}} +
+
diff --git a/layouts/shortcodes/yamlToTable.html b/layouts/shortcodes/yamlToTable.html index 0260cf76..0270c093 100644 --- a/layouts/shortcodes/yamlToTable.html +++ b/layouts/shortcodes/yamlToTable.html @@ -39,6 +39,7 @@ {{- $id := printf "id%03d" $.Ordinal -}} {{ with $data }} +
{{- with .caption -}} @@ -72,4 +73,5 @@ {{ end }}
{{ . }}#
+
{{ end }}