Create the “Table of Contents” heading in javascript

This commit is contained in:
Philipp Oppermann
2016-07-17 16:42:21 +02:00
parent f4b84d55e2
commit 0f72384ed9
2 changed files with 8 additions and 3 deletions

View File

@@ -54,6 +54,11 @@
prefix: 'toc'
});
var heading = document.createElement("H2");
var heading_text = document.createTextNode("Table of Contents");
heading.appendChild(heading_text);
container.appendChild(heading);
container.appendChild(toc);
}
</script>

View File

@@ -130,9 +130,9 @@ aside#toc {
line-height: 1.1;
}
aside#toc:before {
content: "Table of Contents";
font-weight: bold;
aside#toc h2 {
font-size: 110%;
margin-bottom: .2rem;
}
aside#toc ol {