diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..159c1c1 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,33 @@ +# Changelog +All notable changes to this project will be documented in this file. + +## [1.0.3] - 10.09.2021 +### Added +- Styling for inline-code-blocks +- Customized styling of right sidebar and related content +### Changed +- Updated Colors of h1 and h2 to be more consistent according to colors of other headlines +- Updated Colors of anker Tags to be moire visible +- Adjusted positioning and dimendions of nav-header and contained items +### Fixed +- Nav-Header items where visualized as active, when they wherent. + +## [1.0.2] - 10.09.2021 +### Fixed +- Fixed Error with Code-Blocks background color, where code-lines overlap each other +### Changed +- Updated Colors +- Updated Font-Sizes +- Adjusted margin of some elements +- Updated installation instructions within README.md + +## [1.0.1] - 10.09.2021 +### Added +- Added initial styling for obsidian settings + +## [1.0.0] - 10.09.2021 +### Added +- Screenshot for preview +- Readme with description, credits, and so on +- Basic Scss architecture for managing theme styling +- initialized repo diff --git a/obsidian.css b/obsidian.css index d165264..e2708d8 100644 --- a/obsidian.css +++ b/obsidian.css @@ -10,13 +10,14 @@ --color-primary-900: #15161f; --color-primary-1000: #0a0b0f; --color-primary-1100: #050608; - --color-title-h1: #00C9A7; - --color-title-h2: #00C9A7; + --color-title-h1: #845EC2; + --color-title-h2: #D65DB1; --color-title-h3: #FF6F91; --color-title-h4: #FF9671; --color-title-h5: #FFC75F; --color-title-h6: #c0cdf3; --color-element-icon: #adb9db; + --color-element-icon-hover: #ebeff7; --color-element-border: #0a0b0f; --color-element-border-light: #484e6d; --color-element-ordered-list-indicator: #ebeff7; @@ -25,10 +26,12 @@ --color-element-markup-attribute: #555555; --color-element-markup-attribute-value: #555555; --color-text-strong: #ebeff7; - --color-text-code: #6be399; + --color-text-code: #00C9A7; + --color-text-inline-code: #00C9A7; --color-text-paragraph: #c0cdf3; --color-text-quote: #a1acce; - --color-text-link: #67a0fb; + --color-text-quote-border: #a1acce; + --color-text-link: #00bfff; --color-text-linkUrl: #555555; --color-text-hash-tag: #adb9db; } @@ -141,26 +144,6 @@ .cm-s-obsidian .cm-strong { color: var(--color-text-strong); } -.cm-s-obsidian pre.HyperMD-codeblock { - font-family: var(--color-family-secondary); - font-size: var(--color-size-small); - font-weight: 500; - line-height: var(--color-lineheight-max); -} -.cm-s-obsidian .cm-hmd-codeblock { - color: var(--color-text-code); -} -.cm-s-obsidian .CodeMirror-linenumber { - color: var(--color-primary-100); - font-size: var(--color-size-regular); -} -.cm-s-obsidian .CodeMirror-gutter-elt { - padding-right: 10px; -} -.cm-s-obsidian .cm-formatting, -.cm-s-obsidian .CodeMirror-foldmarker { - color: var(--color-primary-100); -} .cm-s-obsidian .cm-formatting-link, .cm-s-obsidian .cm-link { color: var(--color-text-link) !important; @@ -177,6 +160,23 @@ .cm-s-obsidian span.cm-quote.cm-formatting { color: var(--color-primary-100); } + +.cm-s-obsidian pre.HyperMD-codeblock { + font-family: var(--color-family-secondary); + font-size: var(--color-size-small); + font-weight: 500; + line-height: var(--color-lineheight-max); +} +.cm-s-obsidian .cm-hmd-codeblock { + color: var(--color-text-code); +} +.cm-s-obsidian .CodeMirror-linenumber { + color: var(--color-primary-100); + font-size: var(--color-size-regular); +} +.cm-s-obsidian span.cm-inline-code { + color: var(--color-text-code); +} .cm-s-obsidian span.cm-tag { color: var(--color-element-markup-tags); } @@ -186,12 +186,22 @@ .cm-s-obsidian span.cm-string { color: var(--color-element-markup-attribute-value); } + +.cm-s-obsidian .CodeMirror-gutter-elt { + padding-right: 10px; +} +.cm-s-obsidian .cm-formatting, +.cm-s-obsidian .CodeMirror-foldmarker { + color: var(--color-primary-100); +} + .cm-s-obsidian span.cm-formatting-list-ol { color: var(--color-element-ordered-list-indicator); } .cm-s-obsidian span.cm-formatting-list-ul { color: var(--color-element-unordered-list-indicator); } + .cm-s-obsidian span.cm-hashtag { padding: 5px; color: var(--color-text-hash-tag); @@ -217,7 +227,6 @@ white-space: pre-wrap; } .markdown-preview-view h1 { - margin-top: 0; font-size: var(--color-size-5xtra-large); color: var(--color-title-h1); } @@ -284,10 +293,10 @@ text-decoration: underline; } .markdown-preview-view blockquote { - margin-left: 20px; - padding: 20px; + margin: 40px 20px; + padding-left: 40px; border: unset; - border-left: 3px solid var(--color-primary-500); + border-left: 3px solid var(--color-text-quote-border); font-style: italic; } .markdown-preview-view blockquote p { @@ -343,6 +352,12 @@ font-size: var(--color-size-regular); background-color: unset !important; } +.markdown-preview-view p code { + padding: 3px 10px; + color: var(--color-text-inline-code); + background-color: var(--color-primary-1100) !important; + border-radius: 5px; +} .markdown-preview-view p .tag { padding: 10px; @@ -404,17 +419,37 @@ svg { display: none; } -.workspace-tab-header-container { - margin-top: 4px; - margin-left: 4px; - height: fit-content; +.nav-header { + margin: 10px; + padding: 0; } - .nav-header .nav-buttons-container { justify-content: flex-start; + gap: 10px; + margin-top: 12px; } .nav-header .nav-action-button { - margin: 20px 0 10px 0; + display: flex; + justify-content: center; + align-items: center; + padding: 0; + width: 40px; + height: 40px; + border: 1px solid var(--color-primary-1100); + background: var(--color-primary-1100); + border-radius: 50%; + transition: background-color 0.2s ease; +} +.nav-header .nav-action-button:hover { + background-color: #000; +} +.nav-header .nav-action-button:hover svg { + color: var(--color-element-icon-hover); +} +.nav-header .nav-action-button svg { + margin: 0; + padding: 0; + transition: color 0.2s ease; } .workspace-tab-container-inner { @@ -426,32 +461,55 @@ svg { background-color: var(--color-primary-1100); } -.workspace-tab-header { +.workspace-tab-header-container { + margin-top: 10px; + margin-left: 10px; + height: fit-content; +} +.workspace-tab-header-container .workspace-tab-header { background-color: transparent; border-radius: 10px; + cursor: pointer; } - -.workspace-tab-header-inner { - padding: 10px; +.workspace-tab-header-container .workspace-tab-header.is-active { background-color: var(--color-primary-800); border-radius: 10px; } - -.workspace-tab-header-inner-icon { +.workspace-tab-header-container .workspace-tab-header-inner { + padding: 10px; +} +.workspace-tab-header-container .workspace-tab-header-inner-icon { display: flex; justify-content: center; align-items: center; } - -.workspace-tab-header.is-before-active, -.workspace-tab-header.is-after-active { +.workspace-tab-header-container .workspace-tab-header.is-before-active, +.workspace-tab-header-container .workspace-tab-header.is-after-active, +.workspace-tab-header-container .workspace-tab-header-inner { background-color: transparent; } -.workspace-tab-header.is-before-active .workspace-tab-header-inner, -.workspace-tab-header.is-after-active .workspace-tab-header-inner { +.workspace-tab-header-container .workspace-tab-header.is-before-active .workspace-tab-header-inner, +.workspace-tab-header-container .workspace-tab-header.is-after-active .workspace-tab-header-inner, +.workspace-tab-header-container .workspace-tab-header-inner .workspace-tab-header-inner { background-color: transparent; } +.view-content .tree-item-inner { + color: var(--color-text-paragraph); +} + +.tag-pane-tag-text { + color: var(--color-text-paragraph); +} +.tag-pane-tag-text:before { + content: "# "; +} + +.tag-pane-tag-count { + color: var(--color-text-code); + background-color: var(--color-primary-1100); +} + .titlebar { background-color: var(--color-primary-1000); } diff --git a/scss/_colors.scss b/scss/_colors.scss index 2430c1b..f1e6107 100644 --- a/scss/_colors.scss +++ b/scss/_colors.scss @@ -14,8 +14,8 @@ $colors: ( 1100: #050608, ), title: ( - h1: #00C9A7, - h2: #00C9A7, + h1: #845EC2, + h2: #D65DB1, h3: #FF6F91, h4: #FF9671, h5: #FFC75F, @@ -23,6 +23,7 @@ $colors: ( ), element: ( icon: #adb9db, + icon-hover: #ebeff7, border: #0a0b0f, border-light: #484e6d, ordered-list-indicator: #ebeff7, @@ -33,10 +34,12 @@ $colors: ( ), text: ( strong: #ebeff7, - code: #6be399, + code: #00C9A7, + inline-code: #00C9A7, paragraph: #c0cdf3, quote: #a1acce, - link: #67a0fb, + quote-border: #a1acce, + link: #00bfff, linkUrl: #555555, hash-tag: #adb9db, ), diff --git a/scss/modules/editor/TODO:md b/scss/modules/editor/TODO:md deleted file mode 100644 index d28e852..0000000 --- a/scss/modules/editor/TODO:md +++ /dev/null @@ -1 +0,0 @@ -// TODO: code should be splitted up into files, whcih contain related code-sections oif elements diff --git a/scss/modules/editor/code.scss b/scss/modules/editor/code.scss new file mode 100644 index 0000000..3143070 --- /dev/null +++ b/scss/modules/editor/code.scss @@ -0,0 +1,38 @@ +.cm-s-obsidian { + + pre.HyperMD-codeblock { + font-family: font(family, secondary); + font-size: font(size, small); + font-weight: 500; + line-height: font(lineheight, max); + // DEBUG: setting a background-color is currently leading to text-selections is overlayed by the background https://forum.obsidian.md/t/inline-code-occludes-text-selection-and-vim-cursor/11552/8 + // background-color: color(primary, 1100); + } + + .cm-hmd-codeblock { + color: color(text, code); + } + + .CodeMirror-linenumber { + color: color(primary, 100); + font-size: font(size, regular); + } + + span.cm-inline-code { + color: color(text, code); + } + + // Markup-Styling + span { + &.cm-tag { + color: color(element, markup-tags); + } + &.cm-attribute { + color: color(element, markup-attribute); + } + &.cm-string { + color: color(element, markup-attribute-value); + } + } + +} diff --git a/scss/modules/editor/editor.scss b/scss/modules/editor/editor.scss new file mode 100644 index 0000000..c0d01fe --- /dev/null +++ b/scss/modules/editor/editor.scss @@ -0,0 +1,12 @@ +.cm-s-obsidian { + + .CodeMirror-gutter-elt { + padding-right: 10px; + } + + .cm-formatting, + .CodeMirror-foldmarker { + color: color(primary, 100); + } + +} diff --git a/scss/modules/editor/headlines.scss b/scss/modules/editor/headlines.scss new file mode 100644 index 0000000..ec4153c --- /dev/null +++ b/scss/modules/editor/headlines.scss @@ -0,0 +1,34 @@ +.cm-header-1, +.cm-header-2, +.cm-header-3, +.cm-header-4, +.cm-header-5, +.cm-header-6 { + line-height: font(lineheight, regular); + font-weight: 500; + font-size: font(size, regular); +} + +.cm-header-1 { + color: color(title, h1); +} + +.cm-header-2 { + color: color(title, h2); +} + +.cm-header-3 { + color: color(title, h3); +} + +.cm-header-4 { + color: color(title, h4); +} + +.cm-header-5 { + color: color(title, h5); +} + +.cm-header-6 { + color: color(title, h6); +} diff --git a/scss/modules/editor/index.scss b/scss/modules/editor/index.scss index 02e49f8..b1ec248 100644 --- a/scss/modules/editor/index.scss +++ b/scss/modules/editor/index.scss @@ -1,116 +1,6 @@ -.cm-header-1, -.cm-header-2, -.cm-header-3, -.cm-header-4, -.cm-header-5, -.cm-header-6 { - line-height: font(lineheight, regular); - font-weight: 500; - font-size: font(size, regular); -} -.cm-header-1 { - color: color(title, h1) -} -.cm-header-2 { - color: color(title, h2) -} -.cm-header-3 { - color: color(title, h3) -} -.cm-header-4 { - color: color(title, h4) -} -.cm-header-5 { - color: color(title, h5) -} -.cm-header-6 { - color: color(title, h6) -} - -.cm-s-obsidian { - color: color(text, paragraph); - font-family: font(family, secondary); - font-size: font(size, regular); - font-weight: 500; - line-height: font(lineheight, regular); - - .cm-em, - .cm-strong { - color: color(text, strong); - } - - pre.HyperMD-codeblock { - font-family: font(family, secondary); - font-size: font(size, small); - font-weight: 500; - line-height: font(lineheight, max); - // DEBUG: setting a background-color is currently leading to text-selections is overlayed by the background https://forum.obsidian.md/t/inline-code-occludes-text-selection-and-vim-cursor/11552/8 - // background-color: color(primary, 1100); - } - - .cm-hmd-codeblock { - color: color(text, code); - } - - .CodeMirror-linenumber { - color: color(primary, 100); - font-size: font(size, regular); - } - - .CodeMirror-gutter-elt { - padding-right: 10px; - } - - .cm-formatting, - .CodeMirror-foldmarker { - color: color(primary, 100); - } - - .cm-formatting-link, - .cm-link { - color: color(text, link)!important; - } - - .cm-formatting-link-string, - .cm-url { - color: color(text, linkUrl)!important; - } - - span.cm-quote { - margin-left: 20px; - color: color(text, quote); - font-style: italic; - &.cm-formatting{ - color: color(primary, 100); - } - } - - span.cm-tag { - color: color(element, markup-tags); - } - span.cm-attribute { - color: color(element, markup-attribute); - } - span.cm-string { - color: color(element, markup-attribute-value); - } - - span.cm-formatting-list-ol { - color: color(element, ordered-list-indicator); - } - - span.cm-formatting-list-ul { - color: color(element, unordered-list-indicator); - } - - span.cm-hashtag { - padding: 5px; - color: color(text, hash-tag); - background-color: color(primary, 900); - font-size: font(size, regular); - &.cm-formatting{ - color: color(primary, 100); - } - } - -} +@import "./headlines.scss"; +@import "./text.scss"; +@import "./code.scss"; +@import "./editor.scss"; +@import "./lists.scss"; +@import "./tags.scss"; diff --git a/scss/modules/editor/lists.scss b/scss/modules/editor/lists.scss new file mode 100644 index 0000000..5dde061 --- /dev/null +++ b/scss/modules/editor/lists.scss @@ -0,0 +1,11 @@ +.cm-s-obsidian { + + span.cm-formatting-list-ol { + color: color(element, ordered-list-indicator); + } + + span.cm-formatting-list-ul { + color: color(element, unordered-list-indicator); + } + +} diff --git a/scss/modules/editor/tags.scss b/scss/modules/editor/tags.scss new file mode 100644 index 0000000..251fce3 --- /dev/null +++ b/scss/modules/editor/tags.scss @@ -0,0 +1,13 @@ +.cm-s-obsidian { + + span.cm-hashtag { + padding: 5px; + color: color(text, hash-tag); + background-color: color(primary, 900); + font-size: font(size, regular); + &.cm-formatting{ + color: color(primary, 100); + } + } + +} diff --git a/scss/modules/editor/text.scss b/scss/modules/editor/text.scss new file mode 100644 index 0000000..2afb2ec --- /dev/null +++ b/scss/modules/editor/text.scss @@ -0,0 +1,32 @@ +.cm-s-obsidian { + color: color(text, paragraph); + font-family: font(family, secondary); + font-size: font(size, regular); + font-weight: 500; + line-height: font(lineheight, regular); + + .cm-em, + .cm-strong { + color: color(text, strong); + } + + .cm-formatting-link, + .cm-link { + color: color(text, link)!important; + } + + .cm-formatting-link-string, + .cm-url { + color: color(text, linkUrl)!important; + } + + span.cm-quote { + margin-left: 20px; + color: color(text, quote); + font-style: italic; + &.cm-formatting{ + color: color(primary, 100); + } + } +} + diff --git a/scss/modules/preview/code.scss b/scss/modules/preview/code.scss index 06dd216..b81fb16 100644 --- a/scss/modules/preview/code.scss +++ b/scss/modules/preview/code.scss @@ -16,4 +16,11 @@ background-color: unset!important; } } + + p code { + padding: 3px 10px; + color: color(text, inline-code); + background-color: color(primary, 1100)!important; + border-radius: 5px; + } } diff --git a/scss/modules/preview/headlines.scss b/scss/modules/preview/headlines.scss index 4ef4b1e..de45abd 100644 --- a/scss/modules/preview/headlines.scss +++ b/scss/modules/preview/headlines.scss @@ -16,7 +16,6 @@ } h1 { - margin-top: 0; font-size: font(size, 5xtra-large); color: color(title, h1); } diff --git a/scss/modules/preview/text.scss b/scss/modules/preview/text.scss index 4f3cfc8..8cfa1c4 100644 --- a/scss/modules/preview/text.scss +++ b/scss/modules/preview/text.scss @@ -36,10 +36,10 @@ } blockquote { - margin-left: 20px; - padding: 20px; + margin: 40px 20px; + padding-left: 40px; border: unset; - border-left: 3px solid color(primary, 500); + border-left: 3px solid color(text, quote-border); font-style: italic; p { color: color(text, quote); diff --git a/scss/modules/ui/index.scss b/scss/modules/ui/index.scss index b6f23b0..7eaf00e 100644 --- a/scss/modules/ui/index.scss +++ b/scss/modules/ui/index.scss @@ -1,4 +1,5 @@ @import "./document.scss"; @import "./sidebar-left.scss"; +@import "./sidebar-right.scss"; @import "./window.scss"; @import "./settings.scss"; diff --git a/scss/modules/ui/sidebar-left.scss b/scss/modules/ui/sidebar-left.scss index d7ea283..c2b090b 100644 --- a/scss/modules/ui/sidebar-left.scss +++ b/scss/modules/ui/sidebar-left.scss @@ -43,18 +43,37 @@ svg { display: none; } -.workspace-tab-header-container { - margin-top: 4px; - margin-left: 4px; - height: fit-content; -} - .nav-header { + margin: 10px; + padding: 0; .nav-buttons-container { justify-content: flex-start; + gap: 10px; + margin-top: 12px; } .nav-action-button { - margin: 20px 0 10px 0; + display: flex; + justify-content: center; + align-items: center; + padding: 0; + width: 40px; + height: 40px; + border: 1px solid color(primary, 1100); + background: color(primary, 1100); + border-radius: 50%; + transition: background-color .2s ease; + + &:hover { + background-color: #000; + svg { + color: color(element, icon-hover); + } + } + svg { + margin: 0; + padding: 0; + transition: color .2s ease; + } } } @@ -67,27 +86,39 @@ svg { background-color: color(primary, 1100); } -.workspace-tab-header { - background-color: transparent; - border-radius: 10px; -} +.workspace-tab-header-container { + margin-top: 10px; + margin-left: 10px; + height: fit-content; -.workspace-tab-header-inner { - padding: 10px; - background-color: color(primary, 800); - border-radius: 10px; -} + .workspace-tab-header { + background-color: transparent; + border-radius: 10px; + cursor: pointer; -.workspace-tab-header-inner-icon { - display: flex; - justify-content: center; - align-items: center; -} + &.is-active { + background-color: color(primary, 800); + border-radius: 10px; + } + } -.workspace-tab-header.is-before-active, -.workspace-tab-header.is-after-active { - background-color: transparent; + .workspace-tab-header-inner { + padding: 10px; + } + + .workspace-tab-header-inner-icon { + display: flex; + justify-content: center; + align-items: center; + } + + .workspace-tab-header.is-before-active, + .workspace-tab-header.is-after-active, .workspace-tab-header-inner { background-color: transparent; + .workspace-tab-header-inner { + background-color: transparent; + } } + } diff --git a/scss/modules/ui/sidebar-right.scss b/scss/modules/ui/sidebar-right.scss new file mode 100644 index 0000000..30fcf1f --- /dev/null +++ b/scss/modules/ui/sidebar-right.scss @@ -0,0 +1,27 @@ +.view-content { + + .workspace-leaf-content .view-content { + + .tree-item { + + } + + } + + .tree-item-inner { + color: color(text, paragraph); + } + +} + +.tag-pane-tag-text { + color: color(text, paragraph); + &:before { + content: '# ' + } +} + +.tag-pane-tag-count { + color: color(text, code); + background-color: color(primary, 1100) +} diff --git a/scss/obsidian.scss b/scss/obsidian.scss index e4493e6..e9da3b3 100644 --- a/scss/obsidian.scss +++ b/scss/obsidian.scss @@ -1,5 +1,6 @@ @import "./_colors.scss"; @import "./_text.scss"; + @import "./modules/editor/index.scss"; @import "./modules/preview/index.scss"; @import "./modules/ui/index.scss";