From de322af49c5551c7cf8db52f400d6aa148021bf7 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 2 Aug 2022 14:14:44 +0100 Subject: [PATCH 1/2] Render HTML anchors for definition blocks It's handy to be able to link to these. --- assets/scss/custom.scss | 14 ++++---------- layouts/shortcodes/definition.html | 2 +- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/assets/scss/custom.scss b/assets/scss/custom.scss index c1696f18c..d3b014f12 100644 --- a/assets/scss/custom.scss +++ b/assets/scss/custom.scss @@ -165,16 +165,10 @@ footer { } -/* Adjust heading anchors for site header */ -.td-content { - &> h2, - &> h3, - &> h4, - &> h5, - &> h6, - .rendered-data h1 { - scroll-margin-top: 5rem; - } +/* Adjust the scroll margin for everything in the main content, so that + * it doesn't disappear behind the header bar */ +.td-content * { + scroll-margin-top: 5.5rem; } /* Styles for the table of contents */ diff --git a/layouts/shortcodes/definition.html b/layouts/shortcodes/definition.html index fdb307f7d..02f2c6b06 100644 --- a/layouts/shortcodes/definition.html +++ b/layouts/shortcodes/definition.html @@ -30,7 +30,7 @@ {{ $definition = partial "json-schema/resolve-refs" (dict "schema" $definition "path" $path) }} {{ $definition = partial "json-schema/resolve-allof" $definition }} -
+
From af990ff52622f381100b373874807e48a68a1929 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Wed, 3 Aug 2022 07:26:14 +0100 Subject: [PATCH 2/2] Changelog --- changelogs/internal/newsfragments/1191.clarification | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelogs/internal/newsfragments/1191.clarification diff --git a/changelogs/internal/newsfragments/1191.clarification b/changelogs/internal/newsfragments/1191.clarification new file mode 100644 index 000000000..3c4ca5f61 --- /dev/null +++ b/changelogs/internal/newsfragments/1191.clarification @@ -0,0 +1 @@ +Render HTML anchors for object definition tables.