feat: render popertylist description as markdown (#426)
parent
b61b375308
commit
33ea5c37a9
|
@ -15,3 +15,15 @@ properties:
|
||||||
en:
|
en:
|
||||||
- tag1
|
- tag1
|
||||||
- tag2
|
- tag2
|
||||||
|
|
||||||
|
prop3:
|
||||||
|
type: bool
|
||||||
|
defaultValue: false
|
||||||
|
description: |
|
||||||
|
A `bool` property with a complex multiline description and embedded Markdown:
|
||||||
|
|
||||||
|
- List item 1
|
||||||
|
- List item 2
|
||||||
|
|
||||||
|
More description how to use this property.
|
||||||
|
required: false
|
||||||
|
|
|
@ -26,18 +26,18 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</dt>
|
</dt>
|
||||||
<dd>
|
<dd>
|
||||||
<div>
|
<div class="gdoc-props__description">
|
||||||
{{- with $value.description }}
|
{{- with $value.description }}
|
||||||
{{- $desc := . }}
|
{{- $desc := . }}
|
||||||
{{- if reflect.IsMap $desc }}
|
{{- if reflect.IsMap $desc }}
|
||||||
{{- $desc = (index $desc $.Site.Language.Lang) }}
|
{{- $desc = (index $desc $.Site.Language.Lang) }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{ $desc }}
|
{{ $desc | $.Page.RenderString }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
<div class="gdoc-props__default">
|
<div class="gdoc-props__default">
|
||||||
{{- with default "none" $value.defaultValue }}
|
{{- with default "none" ($value.defaultValue | string) }}
|
||||||
<span>{{ i18n "propertylist_default" | title }}:</span>
|
<span>{{ i18n "propertylist_default" | title }}:</span>
|
||||||
<span>{{ . }}</span>
|
<span>{{ . }}</span>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
|
@ -191,15 +191,24 @@
|
||||||
|
|
||||||
&__meta {
|
&__meta {
|
||||||
line-height: normal;
|
line-height: normal;
|
||||||
margin-bottom: $padding-8;
|
margin-bottom: $padding-4;
|
||||||
> span {
|
> span {
|
||||||
margin-bottom: $padding-4;
|
margin-bottom: $padding-2;
|
||||||
&:not(:last-child) {
|
&:not(:last-child) {
|
||||||
margin-right: $padding-8;
|
margin-right: $padding-8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&__description {
|
||||||
|
> :first-child {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
> :last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@each $name, $color in $hint-colors {
|
@each $name, $color in $hint-colors {
|
||||||
&__tag.#{$name} {
|
&__tag.#{$name} {
|
||||||
border-color: scale-color($color, $lightness: 90%, $saturation: -30%);
|
border-color: scale-color($color, $lightness: 90%, $saturation: -30%);
|
||||||
|
@ -218,7 +227,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&__default {
|
&__default {
|
||||||
font-style: italic;
|
|
||||||
font-size: $font-size-14;
|
font-size: $font-size-14;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue