2020-04-14 02:53:06 +02:00
|
|
|
{{- /*
|
2021-01-16 20:51:12 +01:00
|
|
|
Usage: `bs-table "class class-foo"`, where class can be any string
|
2020-04-14 02:53:06 +02:00
|
|
|
*/ -}}
|
|
|
|
|
2020-10-22 08:32:46 +02:00
|
|
|
{{- $css_class := .Get 0 | default "table" -}}
|
|
|
|
{{- $html_table := .Inner | markdownify -}}
|
2022-03-14 08:38:04 +01:00
|
|
|
{{- $html_table = replace $html_table "<table>" (printf `<div class="table-responsive"><table class="%s">` $css_class) -}}
|
|
|
|
{{- $html_table = replace $html_table "</table>" "</table></div>" -}}
|
2020-10-22 08:32:46 +02:00
|
|
|
{{- $html_table | safeHTML -}}
|