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