From c508217604d07f85f5b3121a1f21cf54893310c1 Mon Sep 17 00:00:00 2001 From: zadam Date: Fri, 23 Jul 2021 16:04:56 +0200 Subject: [PATCH] added underline heading style and make it a default --- src/public/app/dialogs/options/appearance.js | 1 + .../app/widgets/type_widgets/editable_text.js | 16 ++++++++++----- .../widgets/type_widgets/read_only_text.js | 20 +++++++++++++------ src/services/options_init.js | 2 +- 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/src/public/app/dialogs/options/appearance.js b/src/public/app/dialogs/options/appearance.js index bfd03b065..874380025 100644 --- a/src/public/app/dialogs/options/appearance.js +++ b/src/public/app/dialogs/options/appearance.js @@ -34,6 +34,7 @@ const TPL = ` diff --git a/src/public/app/widgets/type_widgets/editable_text.js b/src/public/app/widgets/type_widgets/editable_text.js index 3dd231177..17856c240 100644 --- a/src/public/app/widgets/type_widgets/editable_text.js +++ b/src/public/app/widgets/type_widgets/editable_text.js @@ -48,11 +48,11 @@ const TPL = ` margin-top: 0 !important; } - .note-detail-editable-text h2 { font-size: 1.8em; } - .note-detail-editable-text h3 { font-size: 1.6em; } - .note-detail-editable-text h4 { font-size: 1.4em; } - .note-detail-editable-text h5 { font-size: 1.2em; } - .note-detail-editable-text h6 { font-size: 1.1em; } + .note-detail-editable-text h2 { font-size: 1.6em; } + .note-detail-editable-text h3 { font-size: 1.4em; } + .note-detail-editable-text h4 { font-size: 1.2em; } + .note-detail-editable-text h5 { font-size: 1.1em; } + .note-detail-editable-text h6 { font-size: 1.0em; } body.heading-style-markdown .note-detail-editable-text h2::before { content: "##\\2004"; color: var(--muted-text-color); } body.heading-style-markdown .note-detail-editable-text h3::before { content: "###\\2004"; color: var(--muted-text-color); } @@ -60,6 +60,12 @@ const TPL = ` body.heading-style-markdown .note-detail-editable-text h5::before { content: "#####\\2004"; color: var(--muted-text-color); } body.heading-style-markdown .note-detail-editable-text h6::before { content: "######\\2004"; color: var(--muted-text-color); } + body.heading-style-underline .note-detail-editable-text h2 { border-bottom: 1px solid var(--main-border-color); } + body.heading-style-underline .note-detail-editable-text h3 { border-bottom: 1px solid var(--main-border-color); } + body.heading-style-underline .note-detail-editable-text h4:not(.include-note-title) { border-bottom: 1px solid var(--main-border-color); } + body.heading-style-underline .note-detail-editable-text h5 { border-bottom: 1px solid var(--main-border-color); } + body.heading-style-underline .note-detail-editable-text h6 { border-bottom: 1px solid var(--main-border-color); } + .note-detail-editable-text-editor { padding-top: 10px; border: 0 !important; diff --git a/src/public/app/widgets/type_widgets/read_only_text.js b/src/public/app/widgets/type_widgets/read_only_text.js index 59777b756..21d6dbba8 100644 --- a/src/public/app/widgets/type_widgets/read_only_text.js +++ b/src/public/app/widgets/type_widgets/read_only_text.js @@ -7,18 +7,26 @@ const TPL = `