diff --git a/browser/components/NavToggleButton.styl b/browser/components/NavToggleButton.styl index dba4f66f..83a9853d 100644 --- a/browser/components/NavToggleButton.styl +++ b/browser/components/NavToggleButton.styl @@ -10,6 +10,9 @@ line-height 32px padding 0 +body[data-theme="white"] + navWhiteButtonColor() + body[data-theme="dark"] .navToggle &:hover diff --git a/browser/components/NoteItem.styl b/browser/components/NoteItem.styl index 542eb6e1..212fedec 100644 --- a/browser/components/NoteItem.styl +++ b/browser/components/NoteItem.styl @@ -11,9 +11,9 @@ $control-height = 30px user-select none cursor pointer background-color $ui-noteList-backgroundColor - transition background-color 0.2s + transition 0.2s &:hover - background-color alpha($ui-button--active-backgroundColor, 40%) + background-color alpha($ui-button--active-backgroundColor, 20%) .item-title .item-title-icon .item-bottom-time @@ -25,7 +25,7 @@ $control-height = 30px .item-star color $ui-favorite-star-button-color &:active - background-color $ui-button--active-backgroundColor + background-color alpha($ui-button--active-backgroundColor, 40%) color $ui-text-color .item-title .item-title-icon @@ -43,7 +43,7 @@ $control-height = 30px .item--active @extend .item - background-color $ui-button--active-backgroundColor + background-color alpha($ui-button--active-backgroundColor, 60%) color $ui-text-color .item-title .item-title-empty @@ -59,12 +59,12 @@ $control-height = 30px .item-star color $ui-favorite-star-button-color &:hover - background-color alpha($ui-button--active-backgroundColor, 50%) + background-color alpha($ui-button--active-backgroundColor, 40%) color #e74c3c .menu-button-label color $ui-text-color &:active, &:active:hover - background-color alpha($ui-button--active-backgroundColor, 50%) + background-color alpha($ui-button--active-backgroundColor, 40%) color #e74c3c .menu-button-label color $ui-text-color @@ -145,6 +145,18 @@ $control-height = 30px padding 0 border-radius 17px +body[data-theme="white"] + .item + background-color $ui-white-noteList-backgroundColor + &:hover + background-color alpha($ui-button--active-backgroundColor, 40%) + &:active + background-color $ui-button--active-backgroundColor + + .item--active + @extend .item + background-color $ui-button--active-backgroundColor + body[data-theme="dark"] .root border-color $ui-dark-borderColor diff --git a/browser/components/NoteItemSimple.styl b/browser/components/NoteItemSimple.styl index aa01d4ab..1a84f26c 100644 --- a/browser/components/NoteItemSimple.styl +++ b/browser/components/NoteItemSimple.styl @@ -11,15 +11,15 @@ $control-height = 30px user-select none cursor pointer background-color $ui-noteList-backgroundColor - transition background-color 0.15s + transition 0.2s &:hover - background-color alpha($ui-button--active-backgroundColor, 40%) + background-color alpha($ui-button--active-backgroundColor, 20%) .item-simple-title .item-simple-title-empty .item-simple-title-icon color $ui-text-color &:active - background-color $ui-button--active-backgroundColor + background-color alpha($ui-button--active-backgroundColor, 40%) color $ui-text-color .item-simple-title .item-simple-title-empty @@ -28,7 +28,7 @@ $control-height = 30px .item-simple--active @extend .item-simple - background-color $ui-button--active-backgroundColor + background-color alpha($ui-button--active-backgroundColor, 60%) color $ui-text-color .item-simple-title .item-simple-title-empty @@ -37,12 +37,12 @@ $control-height = 30px .item-simple-title-icon color $ui-text-color &:hover - background-color alpha($ui-button--active-backgroundColor, 50%) + background-color alpha($ui-button--active-backgroundColor, 40%) color #e74c3c .menu-button-label color $ui-text-color &:active, &:active:hover - background-color alpha($ui-button--active-backgroundColor, 50%) + background-color alpha($ui-button--active-backgroundColor, 40%) color #e74c3c .menu-button-label color $ui-text-color @@ -67,6 +67,18 @@ $control-height = 30px font-weight normal color $ui-inactive-text-color +body[data-theme="white"] + .item-simple + background-color $ui-white-noteList-backgroundColor + &:hover + background-color alpha($ui-button--active-backgroundColor, 40%) + &:active + background-color $ui-button--active-backgroundColor + + .item-simple--active + @extend .item-simple + background-color $ui-button--active-backgroundColor + body[data-theme="dark"] .root border-color $ui-dark-borderColor diff --git a/browser/components/SideNavFilter.styl b/browser/components/SideNavFilter.styl index 388801dd..332f3a38 100644 --- a/browser/components/SideNavFilter.styl +++ b/browser/components/SideNavFilter.styl @@ -9,6 +9,13 @@ width 100% text-align left overflow ellipsis + &:hover + color $ui-button-default-color + background-color alpha($ui-button-default--active-backgroundColor, 20%) + transition background-color 0.15s + &:active, &:active:hover + color $ui-button-default-color + background-color $ui-button-default--active-backgroundColor .counters float right @@ -17,53 +24,17 @@ .menu-button--active @extend .menu-button color #e74c3c - background-color $ui-button--active-backgroundColor - .menu-button-label - color $ui-text-color - &:hover - background-color alpha($ui-button--active-backgroundColor, 50%) - color #e74c3c - .menu-button-label - color $ui-text-color - &:active, &:active:hover - background-color alpha($ui-button--active-backgroundColor, 50%) - color #e74c3c - .menu-button-label - color $ui-text-color + SideNavFilter() .menu-button-star--active @extend .menu-button color #F9BF3B - background-color $ui-button--active-backgroundColor - .menu-button-label - color $ui-text-color - &:hover - background-color alpha($ui-button--active-backgroundColor, 50%) - color #F9BF3B - .menu-button-label - color $ui-text-color - &:active, &:active:hover - background-color alpha($ui-button--active-backgroundColor, 50%) - color #F9BF3B - .menu-button-label - color $ui-text-color + SideNavFilter() .menu-button-trash--active @extend .menu-button color #5D9E36 - background-color $ui-button--active-backgroundColor - .menu-button-label - color $ui-text-color - &:hover - background-color alpha($ui-button--active-backgroundColor, 50%) - color #5D9E36 - .menu-button-label - color $ui-text-color - &:active, &:active:hover - background-color alpha($ui-button--active-backgroundColor, 50%) - color #5D9E36 - .menu-button-label - color $ui-text-color + SideNavFilter() .menu-button-label margin-left 5px @@ -93,6 +64,66 @@ pointer-events none opacity 0 font-size 13px + .counters + display none + +body[data-theme="white"] + .menu-button + navWhiteButtonColor() + + .counters + color $ui-inactive-text-color + + .menu-button--active + @extend .menu-button + color #e74c3c + background-color $ui-button--active-backgroundColor + .menu-button-label + color $ui-text-color + &:hover + background-color alpha($ui-button--active-backgroundColor, 50%) + color #e74c3c + .menu-button-label + color $ui-text-color + &:active, &:active:hover + background-color alpha($ui-button--active-backgroundColor, 50%) + color #e74c3c + .menu-button-label + color $ui-text-color + + .menu-button-star--active + @extend .menu-button + color #F9BF3B + background-color $ui-button--active-backgroundColor + .menu-button-label + color $ui-text-color + &:hover + background-color alpha($ui-button--active-backgroundColor, 50%) + color #F9BF3B + .menu-button-label + color $ui-text-color + &:active, &:active:hover + background-color alpha($ui-button--active-backgroundColor, 50%) + color #F9BF3B + .menu-button-label + color $ui-text-color + + .menu-button-trash--active + @extend .menu-button + color #5D9E36 + background-color $ui-button--active-backgroundColor + .menu-button-label + color $ui-text-color + &:hover + background-color alpha($ui-button--active-backgroundColor, 50%) + color #5D9E36 + .menu-button-label + color $ui-text-color + &:active, &:active:hover + background-color alpha($ui-button--active-backgroundColor, 50%) + color #5D9E36 + .menu-button-label + color $ui-text-color body[data-theme="dark"] .menu-button diff --git a/browser/components/StorageItem.styl b/browser/components/StorageItem.styl index e5eb1e1f..373e94aa 100644 --- a/browser/components/StorageItem.styl +++ b/browser/components/StorageItem.styl @@ -17,20 +17,20 @@ &:first-child margin-top 0 &:hover - color $ui-text-color - background-color alpha($ui-button--active-backgroundColor, 20%) + color $ui-button-default-color + background-color alpha($ui-button-default--active-backgroundColor, 20%) transition background-color 0.15s &:active - color $ui-text-color - background-color $ui-button--active-backgroundColor + color $$ui-button-default-color + background-color $ui-button-default--active-backgroundColor .folderList-item--active @extend .folderList-item - color $ui-text-color - background-color $ui-button--active-backgroundColor + color $ui-button-default-color + background-color $ui-button-default--active-backgroundColor &:hover - color $ui-text-color - background-color alpha($ui-button--active-backgroundColor, 50%) + color $ui-button-default-color + background-color alpha($ui-button-default--active-backgroundColor, 50%) .folderList-item-name display block @@ -69,8 +69,28 @@ .folderList-item-name--folded @extend .folderList-item-name - padding-left 12px + padding-left 17px + text + display none +body[data-theme="white"] + .folderList-item + color $ui-inactive-text-color + &:hover + color $ui-text-color + background-color alpha($ui-button--active-backgroundColor, 20%) + transition background-color 0.15s + &:active + color $ui-text-color + background-color $ui-button--active-backgroundColor + + .folderList-item--active + @extend .folderList-item + color $ui-text-color + background-color $ui-button--active-backgroundColor + &:hover + color $ui-text-color + background-color alpha($ui-button--active-backgroundColor, 50%) body[data-theme="dark"] .folderList-item diff --git a/browser/components/StorageList.js b/browser/components/StorageList.js index f3620b49..3e28e18b 100644 --- a/browser/components/StorageList.js +++ b/browser/components/StorageList.js @@ -2,7 +2,7 @@ * @fileoverview Micro component for showing StorageList */ import React, { PropTypes } from 'react' -import styles from './StorgaeList.styl' +import styles from './StorageList.styl' import CSSModules from 'browser/lib/CSSModules' /** diff --git a/browser/components/StorgaeList.styl b/browser/components/StorageList.styl similarity index 100% rename from browser/components/StorgaeList.styl rename to browser/components/StorageList.styl diff --git a/browser/components/TagListItem.styl b/browser/components/TagListItem.styl index 006b879b..cd3a5387 100644 --- a/browser/components/TagListItem.styl +++ b/browser/components/TagListItem.styl @@ -13,15 +13,15 @@ &:first-child margin-top 0 &:hover - color $ui-text-color - background-color alpha($ui-button--active-backgroundColor, 20%) + color $ui-button-default-color + background-color alpha($ui-button-default--active-backgroundColor, 20%) transition background-color 0.15s - &:active - color $ui-text-color - background-color $ui-button--active-backgroundColor + &:active, &:active:hover + color $ui-button-default-color + background-color $ui-button-default--active-backgroundColor .tagList-item-active - background-color $ui-button--active-backgroundColor + background-color $ui-button-default--active-backgroundColor display flex width 100% height 26px @@ -31,8 +31,9 @@ border none overflow ellipsis font-size 13px + color $ui-button-default-color &:hover - background-color alpha($ui-button--active-backgroundColor, 60%) + background-color alpha($ui-button-default--active-backgroundColor, 60%) transition 0.2s .tagList-item-name @@ -47,6 +48,22 @@ overflow hidden text-overflow ellipsis +body[data-theme="white"] + .tagList-item + color $ui-inactive-text-color + &:hover + color $ui-text-color + background-color alpha($ui-button--active-backgroundColor, 20%) + &:active + color $ui-text-color + background-color $ui-button--active-backgroundColor + + .tagList-item-active + background-color $ui-button--active-backgroundColor + color $ui-text-color + &:hover + background-color alpha($ui-button--active-backgroundColor, 60%) + body[data-theme="dark"] .tagList-item color $ui-dark-inactive-text-color diff --git a/browser/finder/ipcClient.js b/browser/finder/ipcClient.js index 6a5fb929..d35b21f2 100644 --- a/browser/finder/ipcClient.js +++ b/browser/finder/ipcClient.js @@ -84,6 +84,8 @@ nodeIpc.connectTo( const { config } = payload if (config.ui.theme === 'dark') { document.body.setAttribute('data-theme', 'dark') + } else if (config.ui.theme === 'white') { + document.body.setAttribute('data-theme', 'white') } else { document.body.setAttribute('data-theme', 'default') } diff --git a/browser/main/Detail/MarkdownNoteDetail.styl b/browser/main/Detail/MarkdownNoteDetail.styl index 5ed487d8..d9de1467 100644 --- a/browser/main/Detail/MarkdownNoteDetail.styl +++ b/browser/main/Detail/MarkdownNoteDetail.styl @@ -3,9 +3,9 @@ .root absolute top right bottom - border-width 0 + border-left 1px solid alpha(#DEDEDE, 60%) background-color $ui-noteDetail-backgroundColor - box-shadow $note-detail-box-shadow + box-shadow none .lock-button padding-bottom 3px @@ -40,10 +40,16 @@ .body-noteEditor absolute top bottom left right +body[data-theme="white"] + .root + box-shadow $note-detail-box-shadow + border none + body[data-theme="dark"] .root background-color $ui-dark-noteDetail-backgroundColor box-shadow none + border none .control-lockButton topBarButtonDark() diff --git a/browser/main/Detail/SnippetNoteDetail.styl b/browser/main/Detail/SnippetNoteDetail.styl index e4a8f97d..a270e56c 100644 --- a/browser/main/Detail/SnippetNoteDetail.styl +++ b/browser/main/Detail/SnippetNoteDetail.styl @@ -3,9 +3,9 @@ .root absolute top bottom right - border-width 0 + border-left 1px solid alpha(#DEDEDE, 60%) background-color $ui-noteDetail-backgroundColor - box-shadow $note-detail-box-shadow + box-shadow none .body absolute left right @@ -70,9 +70,14 @@ padding 0 0 2px 0 topBarButtonLight() +body[data-theme="white"] + .root + box-shadow $note-detail-box-shadow + border none + body[data-theme="dark"] .root - border-color $ui-dark-borderColor + border none background-color $ui-dark-noteDetail-backgroundColor box-shadow none diff --git a/browser/main/Main.js b/browser/main/Main.js index bfd1bd5f..14e2b2aa 100644 --- a/browser/main/Main.js +++ b/browser/main/Main.js @@ -57,6 +57,8 @@ class Main extends React.Component { if (config.ui.theme === 'dark') { document.body.setAttribute('data-theme', 'dark') + } else if (config.ui.theme === 'white') { + document.body.setAttribute('data-theme', 'white') } else { document.body.setAttribute('data-theme', 'default') } diff --git a/browser/main/NewNoteButton/NewNoteButton.styl b/browser/main/NewNoteButton/NewNoteButton.styl index 44273319..cb49501c 100644 --- a/browser/main/NewNoteButton/NewNoteButton.styl +++ b/browser/main/NewNoteButton/NewNoteButton.styl @@ -44,6 +44,13 @@ $control-height = 34px opacity 0 transition 0.1s +body[data-theme="white"] + .root, .root--expanded + background-color $ui-white-noteList-backgroundColor + + .control-newNoteButton + background-color $ui-white-noteList-backgroundColor + body[data-theme="dark"] .root, .root--expanded background-color $ui-dark-noteList-backgroundColor diff --git a/browser/main/NoteList/NoteList.styl b/browser/main/NoteList/NoteList.styl index 892ad3d8..2a8d4543 100644 --- a/browser/main/NoteList/NoteList.styl +++ b/browser/main/NoteList/NoteList.styl @@ -59,6 +59,13 @@ $control-height = 30px top $control-height overflow auto +body[data-theme="white"] + .root + background-color $ui-white-noteList-backgroundColor + + .control + background-color $ui-white-noteList-backgroundColor + body[data-theme="dark"] .root border-color $ui-dark-borderColor diff --git a/browser/main/SideNav/SideNav.styl b/browser/main/SideNav/SideNav.styl index a3f0ffae..c7b4ae40 100644 --- a/browser/main/SideNav/SideNav.styl +++ b/browser/main/SideNav/SideNav.styl @@ -1,7 +1,7 @@ .root absolute top left bottom width $sideNav-width - background-color #f9f9f9 + background-color #2E3235 user-select none color $ui-text-color height: 100vh @@ -11,18 +11,19 @@ .top padding-bottom 15px -.top-menu +.top-menu-preference navButtonColor() position absolute top 22px - right 5px - height 23px + right 10px width 2em + background-color transparent &:hover - color $ui-text-color + color $ui-button-default--active-backgroundColor + background-color transparent &:active, &:active:hover - color $ui-text-color - background-color alpha($ui-button--active-backgroundColor, 20%) + color $ui-button-default--active-backgroundColor + background-color transparent .switch-buttons background-color transparent @@ -37,11 +38,11 @@ background-color transparent transition 0.2s &:hover - color alpha(#0B99F1, 60%) + color alpha(#239F86, 60%) .active-button @extend .non-active-button - color #0B99F1 + color $ui-button-default--active-backgroundColor .top-menu-label margin-left 5px @@ -57,7 +58,7 @@ padding-left 15px padding-bottom 13px p - color $ui-text-color + color $ui-button-default-color .tagList overflow-y auto @@ -66,6 +67,7 @@ .root--folded height 100vh width $sideNav--folded-width + background-color #2E3235 .switch-buttons display none .top @@ -88,7 +90,6 @@ opacity 0 margin-left 0 overflow hidden - background-color $ui-tooltip-backgroundColor z-index 10 color white line-height 30px @@ -96,6 +97,41 @@ border-bottom-right-radius 2px pointer-events none font-size 13px + .top-menu-preference + position absolute + left 11px + +body[data-theme="white"] + .root, .root--folded + background-color #f9f9f9 + color $ui-text-color + + .top-menu-preference + navWhiteButtonColor() + background-color transparent + &:hover + color #0B99F1 + background-color transparent + &:active, &:active:hover + color #0B99F1 + background-color transparent + + .non-active-button + color $ui-inactive-text-color + &:hover + color alpha(#0B99F1, 60%) + + .tag-title + p + color $ui-text-color + + .non-active-button + &:hover + color alpha(#0B99F1, 60%) + + .active-button + @extend .non-active-button + color #0B99F1 body[data-theme="dark"] .root, .root--folded @@ -106,12 +142,15 @@ body[data-theme="dark"] .top border-color $ui-dark-borderColor - .top-menu + .top-menu-preference navDarkButtonColor() + background-color transparent &:active background-color alpha($ui-dark-button--active-backgroundColor, 20%) + background-color transparent &:hover background-color alpha($ui-dark-button--active-backgroundColor, 20%) + background-color transparent .non-active-button color alpha($ui-dark-text-color, 60%) diff --git a/browser/main/SideNav/StorageItem.styl b/browser/main/SideNav/StorageItem.styl index af3ff0ef..a0690120 100644 --- a/browser/main/SideNav/StorageItem.styl +++ b/browser/main/SideNav/StorageItem.styl @@ -12,20 +12,12 @@ .header--active margin-bottom 5px - background-color $ui-button--active-backgroundColor + background-color $ui-button-default--active-backgroundColor transition color background-color 0.15s - -.header--active .header-toggleButton - color $ui-text-color - -.header--active .header-info - color $ui-text-color - -.header--active .header-addFolderButton - color $ui-text-color + color $ui-button-default-color .header-toggleButton navButtonColor() @@ -38,7 +30,7 @@ border-radius 50% &:hover transition 0.2s - background-color alpha($ui-button--active-backgroundColor, 40%) + background-color alpha($ui-button-default--hover-backgroundColor, 40%) color $ui-text-color .header-info @@ -54,7 +46,14 @@ border none overflow ellipsis text-align left - background-color alpha($ui-button--active-backgroundColor, 20%) + background-color transparent + &:hover + color $ui-button-default-color + background-color alpha($ui-button-default--active-backgroundColor, 20%) + transition background-color 0.15s + &:active, &:active:hover + color $ui-button-default-color + background-color $ui-button-default--active-backgroundColor .header-info-path font-size 10px @@ -72,7 +71,7 @@ border-radius 50% &:hover transition 0.2s - background-color alpha($ui-button--active-backgroundColor, 40%) + background-color alpha($ui-button-default--hover-backgroundColor, 40%) color $ui-text-color .root--folded @@ -102,6 +101,33 @@ font-size 10px margin 0 5px +body[data-theme="white"] + .header--active + background-color $ui-button--active-backgroundColor + transition color background-color 0.15s + .header-toggleButton + color $ui-text-color + .header-info + color $ui-text-color + .header-addFolderButton + color $ui-text-color + + .header-toggleButton + navWhiteButtonColor() + &:hover + background-color alpha($ui-button--active-backgroundColor, 40%) + color $ui-text-color + + .header-info + navWhiteButtonColor() + background-color alpha($ui-button--active-backgroundColor, 20%) + + .header-addFolderButton + navWhiteButtonColor() + &:hover + background-color alpha($ui-button--active-backgroundColor, 40%) + color $ui-text-color + body[data-theme="dark"] .header--active background-color $ui-dark-button--active-backgroundColor diff --git a/browser/main/SideNav/index.js b/browser/main/SideNav/index.js index 336492d4..b1dad96c 100644 --- a/browser/main/SideNav/index.js +++ b/browser/main/SideNav/index.js @@ -165,7 +165,7 @@ class SideNav extends React.Component {