File tree Expand file tree Collapse file tree 1 file changed +13
-16
lines changed Expand file tree Collapse file tree 1 file changed +13
-16
lines changed Original file line number Diff line number Diff line change 1
1
{{- $root := . -}}
2
- < div class ="sd-card sd-mb-3 sd-shadow-sm ">
3
- < div class ="sd-card-body ">
4
- {{ $meta_fields := (slice "homepage" "repository" "pypi" "libraries-io" "license" "license-type") }}
5
- < dl class ="field-list ">
6
- {{- range $attr := $meta_fields -}}
7
- {{ $val := index $.Params $attr }}
8
- < dt class ="field-odd ">
9
- {{ $attr | humanize }}:
10
- </ dt >
11
- < dd class ="field-odd ">
12
- {{ $val | markdownify }}
13
- </ dd >
14
- {{- end -}}
15
- </ dl >
16
- </ div >
17
- </ div >
2
+
3
+ {{/* Create field list */}}
4
+ {{- $fieldList := slice -}}
5
+ {{- range $term := slice "homepage" "repository" "pypi" "libraries-io" "license" "license-type" -}}
6
+ {{- $def := index $.Params $term | markdownify }}
7
+ {{- $fieldList = $fieldList | append (dict "term" ( $term | humanize ) "def" $def ) -}}
8
+ {{- end -}}
9
+ {{- $projectMetaBody := partial "_elements/field-list.html" (dict "entries" $fieldList) -}}
10
+
11
+ {{/* Put the project meta data in a card */}}
12
+ {{- $card := dict "body" $projectMetaBody -}}
13
+ {{- partial "_elements/card.html" (dict "card" $card) -}}
14
+
18
15
< div class ="article-content ">
19
16
< h2 > Endorsed SPECs</ h1 >
20
17
{{- $specs := where $.Site.Pages "Section" "specs" -}}
You can’t perform that action at this time.
0 commit comments