File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 1010widths = ["10%", "50%", "20%"]
1111headerrows = 1
1212footer-rows = 3
13- stub-columns = 1
13+ stubcolumns = 1
1414
1515[[row]]
1616column = [
6161 {{ if (modBool $row_idx 2) }}< tr class ="row-odd "> {{- else }}< tr class ="row-even "> {{- end }}
6262 {{- range $col_idx, $col := $row.column }}
6363 {{- $alignment := or (index $align $col_idx) "left" }}
64- < th class ="head " style ="text-align:{{ $alignment }} ">
64+ {{- $isStub := compare.Lt $col_idx $data.stubcolumns }}
65+ {{- $class := cond $isStub "head stub" "head" }}
66+ < th class ="{{ $class }} " style ="text-align:{{ $alignment }} ">
6567 {{ $col | markdownify }}
6668 </ th >
6769 {{- end }}
7476 {{ if (modBool (add $row_idx $headerrows) 2) }}< tr class ="row-odd "> {{- else }}< tr class ="row-even "> {{- end }}
7577 {{- range $col_idx, $col := $row.column }}
7678 {{- $alignment := or (index $align $col_idx) "left" }}
77- < td class ="head " style ="text-align:{{ $alignment }} ">
79+ {{- $isStub := compare.Lt $col_idx $data.stubcolumns }}
80+ {{- if $isStub }}
81+ < th class ="stub " style ="text-align:{{ $alignment }} ">
82+ {{- else }}
83+ < td style ="text-align:{{ $alignment }} ">
84+ {{- end }}
7885 {{ $col | markdownify }}
79- </ td >
86+ {{ cond $isStub " </ th > " " </ td > " | safeHTML }}
8087 {{- end }}
8188 </ tr >
8289 {{- end }}
You can’t perform that action at this time.
0 commit comments