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 14
14
A figure is an image with a caption. Figures may also include a tile, legend, and/or attribution.
15
15
'''
16
16
legend = '''
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 > }}
18
47
19
48
This paragraph is also part of the legend.
20
49
'''
59
88
</ span >
60
89
{{- with $figure.legend }}
61
90
< div class ="legend ">
62
- {{ . | markdownify -}}
91
+ {{- with (trim . "\n") }}
92
+ {{ . | safeHTML }}
93
+ {{- end }}
63
94
</ div >
64
95
{{- end }}
65
96
</ figcaption >
Original file line number Diff line number Diff line change 50
50
{{ $data := .Inner | transform.Unmarshal }}
51
51
52
52
{{ 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}}
56
60
{{ $el := "td" }}
57
61
{{ if (eq $row.type "header") }}
58
- {{ $el = "th" }}
62
+ {{ $el = "th class='head' " }}
59
63
{{ end }}
60
64
{{ range $col := .column }}
61
65
{{ printf "< %s" $el | safeHTML }} colspan="{{ $col.colspan }}" rowspan="{{ $col.rowspan }}" {{ printf "> " | safeHTML }}
You can’t perform that action at this time.
0 commit comments