Skip to content
Snippets Groups Projects
Commit 9f8479e8 authored by Olivia206's avatar Olivia206
Browse files

toggle toc on clic

parent 126100e9
No related branches found
No related tags found
No related merge requests found
......@@ -59,6 +59,7 @@ class TableOfContent {
this.sections.forEach(section => {
if (section.offsetTop <= scroll) {
id = section.id;
this.toggle(false);
}
});
......
......@@ -19,7 +19,7 @@
{{- end -}}
{{- if and (gt (len .children) 0) $dropdown (eq $level 1) -}}
{{- $hasDropdown = true -}}
{{- $attr = printf "id=\"dropdown-%s\" role=\"button\" aria-expanded=\"false\" tabindex=\"0\"" $slug -}}
{{- $attr = printf "id=\"dropdown-%s\" role=\"button\" aria-expanded=\"false\" aria-pressed=\"false\" tabindex=\"0\"" $slug -}}
{{- end -}}
{{- if and (hasPrefix .target "http") (eq .kind "url") -}}
{{- $attr = " target=\"_blank\" rel=\"noreferrer\"" -}}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment