0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-02 14:24:19 +01:00
Bootstrap/site/layouts/shortcodes/bs-table.html

10 lines
399 B
HTML
Raw Normal View History

{{- /*
Usage: `bs-table "class class-foo"`, where class can be any string
*/ -}}
2020-10-22 08:32:46 +02:00
{{- $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>" -}}
2020-10-22 08:32:46 +02:00
{{- $html_table | safeHTML -}}