File tree Expand file tree Collapse file tree 2 files changed +41
-6
lines changed Expand file tree Collapse file tree 2 files changed +41
-6
lines changed Original file line number Diff line number Diff line change 1414A figure is an image with a caption. Figures may also include a tile, legend, and/or attribution.
1515'''
1616legend = '''
17- **TODO: use tomltotable (https://github.com/scientific-python/scientific-python-hugo-theme/pull/548)**
17+ {{< tomlToTable > }}
18+
19+ [[row]]
20+ type = 'header'
21+
22+ [[row.column]]
23+ body = 'Project'
24+
25+ [[row.column]]
26+ body = 'Available Packages'
27+
28+ [[row]]
29+
30+ [[row.column]]
31+ body = 'NumPy'
32+
33+ [[row.column]]
34+ body = '''Official *source code* (all platforms) and *binaries* for< br />
35+ **Windows**, **Linux**, and **Mac OS X**'''
36+
37+ [[row]]
38+
39+ [[row.column]]
40+ body = 'SciPy'
41+
42+ [[row.column]]
43+ body = '''Official *source code* (all platforms) and *binaries* for< br />
44+ **Windows**, **Linux**, and **Mac OS X**'''
45+
46+ {{< /tomlToTable > }}
1847
1948This paragraph is also part of the legend.
2049'''
5988</ span >
6089{{- with $figure.legend }}
6190< div class ="legend ">
62- {{ . | markdownify -}}
91+ {{- with (trim . "\n") }}
92+ {{ . | safeHTML }}
93+ {{- end }}
6394</ div >
6495{{- end }}
6596</ figcaption >
Original file line number Diff line number Diff line change 5050{{ $data := .Inner | transform.Unmarshal }}
5151
5252{{ with $data }}
53- < table >
54- {{ range $row := .row }}
55- < tr >
53+ < table class ="table ">
54+ {{ range $i, $row := .row }}
55+ {{if (modBool $i 2)}}
56+ < tr class ="row-odd ">
57+ {{else}}
58+ < tr class ="row-even ">
59+ {{end}}
5660 {{ $el := "td" }}
5761 {{ if (eq $row.type "header") }}
58- {{ $el = "th" }}
62+ {{ $el = "th class='head' " }}
5963 {{ end }}
6064 {{ range $col := .column }}
6165 {{ printf "< %s" $el | safeHTML }} colspan="{{ $col.colspan }}" rowspan="{{ $col.rowspan }}" {{ printf "> " | safeHTML }}
You can’t perform that action at this time.
0 commit comments