diff --git a/layouts/_default/_markup/render-heading.html b/layouts/_default/_markup/render-heading.html index f947f96..3e7a270 100644 --- a/layouts/_default/_markup/render-heading.html +++ b/layouts/_default/_markup/render-heading.html @@ -3,16 +3,16 @@ {{- if $showAnchor -}} -
+
{{ .Text | safeHTML }} - - - + + +
{{- else -}}
diff --git a/layouts/shortcodes/propertylist.html b/layouts/shortcodes/propertylist.html index a1cdf33..ec62a48 100644 --- a/layouts/shortcodes/propertylist.html +++ b/layouts/shortcodes/propertylist.html @@ -1,6 +1,7 @@ {{- $name := .Get "name" -}} {{- $sort := .Get "sort" -}} {{- $order := default "asc" (.Get "order") -}} +{{- $showAnchor := (and (default true .Page.Params.geekdocAnchor) (default true .Page.Site.Params.geekdocAnchor)) -}} {{- if .Site.Data.properties }}
@@ -10,11 +11,11 @@ {{- $properties = (sort $properties . $order) }} {{- end }} {{- range $properties }} -
+
{{ .name }} {{- if .required }} {{ i18n "propertylist_required" | lower }} - {{ else }} + {{- else }} {{ i18n "propertylist_optional" | lower }} {{- end }} {{- with .type }} @@ -30,6 +31,11 @@ {{ . }} {{- end }} {{- end }} + {{- if $showAnchor }} + + + + {{- end }}
@@ -38,9 +44,8 @@ {{- if reflect.IsMap $desc }} {{- $desc = (index $desc $.Site.Language.Lang) }} {{- end }} - {{ $desc | $.Page.RenderString }} - {{ end }} + {{- end }}
{{- with default "none" (.defaultValue | string) }} diff --git a/src/sass/_base.scss b/src/sass/_base.scss index 2ff735e..395bd4b 100644 --- a/src/sass/_base.scss +++ b/src/sass/_base.scss @@ -397,17 +397,17 @@ svg.gdoc-icon { } &__anchorwrap { + gap: 0.5em; + &:hover .gdoc-page__anchor svg.gdoc-icon { color: var(--control-icons); } } &__anchor { - margin-left: $padding-8; - svg.gdoc-icon { - width: 1.25em; - height: 1.25em; + width: 1.85em; + height: 1.85em; color: transparent; } diff --git a/src/sass/_shortcodes.scss b/src/sass/_shortcodes.scss index e13b314..e2fb574 100644 --- a/src/sass/_shortcodes.scss +++ b/src/sass/_shortcodes.scss @@ -203,17 +203,18 @@ .gdoc-props { &__title, &__default { + padding: 0; + margin: 0; font-family: "Liberation Mono", monospace; } &__meta { + gap: 0.5em; line-height: normal; margin-bottom: $padding-4; - > span { - margin-bottom: $padding-2; - &:not(:last-child) { - margin-right: $padding-8; - } + + &:hover .gdoc-page__anchor svg.gdoc-icon { + color: var(--control-icons); } }