0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00
Bootstrap/site/layouts/shortcodes/bs-table.html
Mark Otto a9a89debc7
Rewrite docs tables in Markdown with table shortcode (#31337)
Co-authored-by: XhmikosR <xhmikosr@gmail.com>
Co-authored-by: GeoSot <geo.sotis@gmail.com>
2022-03-14 09:38:04 +02:00

10 lines
399 B
HTML

{{- /*
Usage: `bs-table "class class-foo"`, where class can be any string
*/ -}}
{{- $css_class := .Get 0 | default "table" -}}
{{- $html_table := .Inner | markdownify -}}
{{- $html_table = replace $html_table "<table>" (printf `<div class="table-responsive"><table class="%s">` $css_class) -}}
{{- $html_table = replace $html_table "</table>" "</table></div>" -}}
{{- $html_table | safeHTML -}}