From 52981fd7af63bd13ab20abcfae48b00282829337 Mon Sep 17 00:00:00 2001 From: zzhaobraze Date: Mon, 28 Oct 2024 13:55:27 -0400 Subject: [PATCH] replace h2 with div --- _layouts/api_glossary.html | 3 +-- _layouts/glossary_page.html | 3 +-- assets/css/_glossary_page.scss | 19 +++++-------------- assets/css/main.scss | 6 ++---- 4 files changed, 9 insertions(+), 22 deletions(-) diff --git a/_layouts/api_glossary.html b/_layouts/api_glossary.html index 0acbf29e04f..ecc983b5972 100644 --- a/_layouts/api_glossary.html +++ b/_layouts/api_glossary.html @@ -309,7 +309,7 @@

{{ page.glossary_top_header }}

{%- for glossary in glossary_sorted -%} {%- assign glossary_id = glossary['name'] | slugify | downcase -%}
-

+

{{ glossary['name'] }}

{{ glossary['description'] }} @@ -342,4 +342,3 @@

{%- endunless -%} - diff --git a/_layouts/glossary_page.html b/_layouts/glossary_page.html index 81bea041bca..47b09327f3c 100644 --- a/_layouts/glossary_page.html +++ b/_layouts/glossary_page.html @@ -285,7 +285,7 @@

{{ page.glossary_top_header }}

{%- for glossary in glossary_sorted -%} {%- assign glossary_id = glossary['name'] | slugify | downcase -%} -

+

{{ glossary['name'] }}

{%- if glossary['image'] -%} @@ -339,4 +339,3 @@

{%- endunless -%} - diff --git a/assets/css/_glossary_page.scss b/assets/css/_glossary_page.scss index b2b3d568e3b..018522939b4 100644 --- a/assets/css/_glossary_page.scss +++ b/assets/css/_glossary_page.scss @@ -374,12 +374,7 @@ } // Hack the sticky header - > h1[id], - > h2[id], - > h3[id], - > h4[id], - > h5[id], - > h6[id] { + .anchor { pointer-events: none; > div, @@ -387,13 +382,10 @@ pointer-events: auto; } - &::before { - display: block; - height: $calc_offset_top; - margin-top: -$calc_offset_top; - visibility: hidden; - content: ""; - } + display: block; + height: $calc_offset_top; + margin-top: -$calc_offset_top; + visibility: hidden; @media print { &::before { display: none; @@ -407,7 +399,6 @@ } } } - } diff --git a/assets/css/main.scss b/assets/css/main.scss index b5fa9c76928..86cf81bb7b1 100644 --- a/assets/css/main.scss +++ b/assets/css/main.scss @@ -59,9 +59,8 @@ $base_font_size: 16.5px; $banner_height: 80px; $header_height: 60px; $footer_height: 60px; -$base_off_set: $base_font_size * 1.5; -$calc_offset_top: $header_height + $base_off_set; -$calc_offset_view: $header_height + $base_off_set; +$calc_offset_top: $header_height; +$calc_offset_view: $header_height; // Body variables—Responsive breakpoints and layout dimensions $spacing-unit: 30px; @@ -310,4 +309,3 @@ details { color: $text-color; } } -