blogamore/layouts/shortcodes/table.html

17 lines
No EOL
566 B
HTML

<!-- Ermittle Parameter -->
{{ $htmlTable := .Inner | markdownify }}
{{ $table_class := .Get "table_class" }}
{{ $thead_class := .Get "thead_class" }}
<!-- Tabellenklassen hinzufügen -->
{{ $old_tbl := "<table>"}}
{{ $new_tbl := printf "<table class=\"%s\">" $table_class }}
{{ $htmlTable := replace $htmlTable $old_tbl $new_tbl }}
<!-- Tabellenkopf hinzufügen -->
{{ $old_th := "<thead>"}}
{{ $new_th := printf "<thead class=\"%s\">" $thead_class }}
{{ $htmlTable := replace $htmlTable $old_th $new_th }}
<!-- Tabellen-HTML-Code -->
{{ $htmlTable | safeHTML }}