From 08175391ab4171f74cfc31085abb2333bde6bebf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Thu, 6 Aug 2020 12:42:12 +0100 Subject: [PATCH 1/2] Remove bullets on TOC items --- www/pad/inner.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/pad/inner.js b/www/pad/inner.js index 1daf1f1bf..f907daae8 100644 --- a/www/pad/inner.js +++ b/www/pad/inner.js @@ -638,7 +638,7 @@ define([ obj.el.scrollIntoView(); }); a.innerHTML = obj.title; - content.push(h('p.cp-pad-toc-'+level, ['• ', a])); + content.push(h('p.cp-pad-toc-'+level, a)); }); $toc.html('').append(content); }; From aa3d030f7dff046a65d470e26b6c0b79d021c9b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Benqu=C3=A9?= Date: Thu, 6 Aug 2020 13:18:31 +0100 Subject: [PATCH 2/2] Style TOC --- www/pad/app-pad.less | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/www/pad/app-pad.less b/www/pad/app-pad.less index bdaf4f5c7..b413eed6a 100644 --- a/www/pad/app-pad.less +++ b/www/pad/app-pad.less @@ -24,6 +24,33 @@ body.cp-app-pad { overflow: hidden; } + #cp-app-pad-toc { + @toc-level-indent: 15px; + + margin-top: 10px; + margin-left: 10px; + width: 200px; + color: @cryptpad_text_col; + h2 { + font-size: 1.5rem; + } + p { + margin-bottom: 5px; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + a { + color: @cryptpad_text_col; + } + &.cp-pad-toc-2 { + margin-left: @toc-level-indent; + } + &.cp-pad-toc-3 { + margin-left: @toc-level-indent * 2; + } + } + } + .cke_toolbox_main { background-color: @colortheme_pad-toolbar-bg; .cke_toolbar {