Skip to content

Commit b3d04ce

Browse files
committed
Implement width
1 parent 9fc387f commit b3d04ce

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

layouts/shortcodes/tomlToTable.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
caption = 'Table caption'
88
align = ["left", "left", "right"]
9+
width = "80%"
910
widths = ["10%", "50%", "20%"]
1011
headerrows = 1
1112
footer-rows = 3
@@ -59,7 +60,7 @@
5960
{{- $header := first $headerrows $data.row }}
6061
{{- $body := last (math.Sub $numrows $headerrows) $data.row }}
6162

62-
<table class="table" id="{{ $id }}">
63+
<table class="table" id="{{ $id }}" {{- with $data.width }}style="width: {{ . }}"{{- end }}>
6364
{{- with $data.caption }}
6465
<caption><span class="caption-text">{{ . }}</span><a class="headerlink" href="#{{ $id }}" title="Link to this table">#</a></caption>
6566
{{- end }}

0 commit comments

Comments
 (0)