From 0f72384ed90968ced26a4148cdca73af6a33a91b Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Sun, 17 Jul 2016 16:42:21 +0200 Subject: [PATCH] =?UTF-8?q?Create=20the=20=E2=80=9CTable=20of=20Contents?= =?UTF-8?q?=E2=80=9D=20heading=20in=20javascript?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layouts/partials/head.html | 5 +++++ static/css/main.css | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 75e8cd70..f217239d 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -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); } diff --git a/static/css/main.css b/static/css/main.css index 4f6966dc..3a4ff255 100644 --- a/static/css/main.css +++ b/static/css/main.css @@ -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 {