From 2b47f03605930dbac7bee8a2ff004966b9bf674f Mon Sep 17 00:00:00 2001 From: nodejh Date: Fri, 24 Mar 2017 03:01:05 +0800 Subject: [PATCH] add table of content --- static/css/style.css | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/static/css/style.css b/static/css/style.css index 239b004..687a025 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -317,7 +317,7 @@ em, i { .post h2.headline { font: normal 13px/1.5em "Helvetica Neue", Helvetica, Arial, sans-serif; - margin: -5px 0 40px 0; + margin: -5px 0 0 0; color: #b2b9be; font-size: 13px; letter-spacing: 1px; @@ -549,7 +549,8 @@ Post List } .post { - margin: 80px 0 0 0; + /*margin: 80px 0 0 0;*/ + margin: auto; } #post-meta { @@ -870,13 +871,39 @@ code { /** * Table of content */ - #toc ul { - list-style-type: none; - } +#toc { + line-height: 1em; + font-size: .7em; + word-wrap: break-word; + /*-webkit-font-smoothing: subpixel-antialiased;*/ + /*-moz-osx-font-smoothing: auto;*/ + padding: 16px; + padding-left: 21px; + padding-bottom: 14px; + margin: 0 0 25px 0; + display: block; + color: #808080; + background: #fff; + border: none; + box-shadow: inset 0 0 0 1px #E4EBF2; + border-radius: 4px; + overflow: hidden; + font-family: 'Menlo', 'Monaco', Courier, monospace; + /*font: normal 13px/1.5em "Helvetica Neue", Helvetica, Arial, sans-serif;*/ +} +#TableOfContents { margin: 1em 0 0 0; } +#TableOfContents ul { list-style-type:none; margin: 0; padding: 0 .5em; } +#TableOfContents ul li { list-style-type:none; line-height: 1.7em; } +#TableOfContents > ul { padding: 0; } +#TableOfContents > ul > li > ul { padding: 0; } +#TableOfContents a code{ + font-family: Menlo, Monaco, Courier; + background-color: #fff; + font-size: 14px; + padding: 4px; + font-weight: 100; +} - #toc ul ul { - list-style-type: disc; - } /** * tags page