mirror of
https://github.com/phil-opp/blog_os.git
synced 2025-12-16 22:37:49 +00:00
Create the “Table of Contents” heading in javascript
This commit is contained in:
@@ -54,6 +54,11 @@
|
|||||||
prefix: 'toc'
|
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);
|
container.appendChild(toc);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -130,9 +130,9 @@ aside#toc {
|
|||||||
line-height: 1.1;
|
line-height: 1.1;
|
||||||
}
|
}
|
||||||
|
|
||||||
aside#toc:before {
|
aside#toc h2 {
|
||||||
content: "Table of Contents";
|
font-size: 110%;
|
||||||
font-weight: bold;
|
margin-bottom: .2rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
aside#toc ol {
|
aside#toc ol {
|
||||||
|
|||||||
Reference in New Issue
Block a user