Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
{{- $position := .position -}}
{{- $title := .title -}}
{{- with .data -}}
<section class="block-datatable{{ if $title }} block-with-title{{ end }}" id="block-{{ $position }}">
<div class="container">
<div class="block-content">
{{- if $title }}
<div class="top">
<h2>{{ partial "PrepareHTML" $title }}</h2>
</div>
{{ end -}}
<div class="table-responsive">
<table class="table">
{{- if .caption }}
<caption>{{ partial "PrepareHTML" .caption }}</caption>
{{ end -}}
<thead>
<tr>
{{ range .columns }}
<th scope="col">{{ . }}</th>
{{ end }}
</tr>
</thead>
<tbody>
{{ range .rows }}
<tr>
{{ range . }}
<td>{{ . }}</td>
{{ end }}
</tr>
{{ end }}
</tbody>
</table>
</div>
</div>
</div>
</section>
{{- end -}}