2022-05-22 22:00:37 +02:00
|
|
|
{{- $name := .Get "name" -}}
|
2022-11-02 13:01:20 +01:00
|
|
|
{{- $sort := .Get "sort" -}}
|
|
|
|
{{- $order := default "asc" (.Get "order") -}}
|
2022-05-22 22:00:37 +02:00
|
|
|
|
|
|
|
{{- if .Site.Data.properties }}
|
|
|
|
<dl class="gdoc-props">
|
2022-05-26 17:07:38 +02:00
|
|
|
{{- with (index .Site.Data.properties (split $name ".")) }}
|
2022-11-02 13:01:20 +01:00
|
|
|
{{- $properties := .properties }}
|
|
|
|
{{- with $sort }}
|
|
|
|
{{- $properties = (sort $properties . $order) }}
|
|
|
|
{{- end }}
|
|
|
|
{{- range $properties }}
|
2022-05-22 22:00:37 +02:00
|
|
|
<dt class="flex flex-wrap align-center gdoc-props__meta">
|
2022-11-02 13:01:20 +01:00
|
|
|
<span class="gdoc-props__title">{{ .name }}</span>
|
|
|
|
{{- if .required }}
|
2022-05-22 22:00:37 +02:00
|
|
|
<span class="gdoc-props__tag warning">{{ i18n "propertylist_required" | lower }}</span>
|
|
|
|
{{ else }}
|
|
|
|
<span class="gdoc-props__tag tip">{{ i18n "propertylist_optional" | lower }}</span>
|
|
|
|
{{- end }}
|
2022-11-02 13:01:20 +01:00
|
|
|
{{- with .type }}
|
2022-05-22 22:00:37 +02:00
|
|
|
<span class="gdoc-props__tag note">{{ . }}</span>
|
|
|
|
{{- end }}
|
|
|
|
|
2022-11-02 13:01:20 +01:00
|
|
|
{{- with .tags }}
|
2022-05-22 22:00:37 +02:00
|
|
|
{{- $tags := . }}
|
|
|
|
{{- if reflect.IsMap $tags }}
|
|
|
|
{{- $tags = (index $tags $.Site.Language.Lang) }}
|
|
|
|
{{- end }}
|
|
|
|
{{- range $tags }}
|
|
|
|
<span class="gdoc-props__tag">{{ . }}</span>
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
</dt>
|
|
|
|
<dd>
|
2022-05-30 21:40:09 +02:00
|
|
|
<div class="gdoc-props__description">
|
2022-11-02 13:01:20 +01:00
|
|
|
{{- with .description }}
|
2022-05-22 22:00:37 +02:00
|
|
|
{{- $desc := . }}
|
|
|
|
{{- if reflect.IsMap $desc }}
|
|
|
|
{{- $desc = (index $desc $.Site.Language.Lang) }}
|
|
|
|
{{- end }}
|
|
|
|
|
2022-05-30 21:40:09 +02:00
|
|
|
{{ $desc | $.Page.RenderString }}
|
2022-05-22 22:00:37 +02:00
|
|
|
{{ end }}
|
|
|
|
</div>
|
|
|
|
<div class="gdoc-props__default">
|
2022-11-02 13:01:20 +01:00
|
|
|
{{- with default "none" (.defaultValue | string) }}
|
2022-05-22 22:00:37 +02:00
|
|
|
<span>{{ i18n "propertylist_default" | title }}:</span>
|
|
|
|
<span>{{ . }}</span>
|
|
|
|
{{- end }}
|
|
|
|
</div>
|
|
|
|
</dd>
|
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|
|
|
|
</dl>
|
|
|
|
{{- end }}
|