1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 02:06:29 +00:00

Merge pull request #1108 from BoostIO/change-default-color-and-add-white-theme

Change default theme and add white
This commit is contained in:
Kazz Yokomizo
2017-11-14 00:51:17 +09:00
committed by GitHub
21 changed files with 369 additions and 113 deletions

View File

@@ -10,6 +10,9 @@
line-height 32px line-height 32px
padding 0 padding 0
body[data-theme="white"]
navWhiteButtonColor()
body[data-theme="dark"] body[data-theme="dark"]
.navToggle .navToggle
&:hover &:hover

View File

@@ -11,9 +11,9 @@ $control-height = 30px
user-select none user-select none
cursor pointer cursor pointer
background-color $ui-noteList-backgroundColor background-color $ui-noteList-backgroundColor
transition background-color 0.2s transition 0.2s
&:hover &:hover
background-color alpha($ui-button--active-backgroundColor, 40%) background-color alpha($ui-button--active-backgroundColor, 20%)
.item-title .item-title
.item-title-icon .item-title-icon
.item-bottom-time .item-bottom-time
@@ -25,7 +25,7 @@ $control-height = 30px
.item-star .item-star
color $ui-favorite-star-button-color color $ui-favorite-star-button-color
&:active &:active
background-color $ui-button--active-backgroundColor background-color alpha($ui-button--active-backgroundColor, 40%)
color $ui-text-color color $ui-text-color
.item-title .item-title
.item-title-icon .item-title-icon
@@ -43,7 +43,7 @@ $control-height = 30px
.item--active .item--active
@extend .item @extend .item
background-color $ui-button--active-backgroundColor background-color alpha($ui-button--active-backgroundColor, 60%)
color $ui-text-color color $ui-text-color
.item-title .item-title
.item-title-empty .item-title-empty
@@ -59,12 +59,12 @@ $control-height = 30px
.item-star .item-star
color $ui-favorite-star-button-color color $ui-favorite-star-button-color
&:hover &:hover
background-color alpha($ui-button--active-backgroundColor, 50%) background-color alpha($ui-button--active-backgroundColor, 40%)
color #e74c3c color #e74c3c
.menu-button-label .menu-button-label
color $ui-text-color color $ui-text-color
&:active, &:active:hover &:active, &:active:hover
background-color alpha($ui-button--active-backgroundColor, 50%) background-color alpha($ui-button--active-backgroundColor, 40%)
color #e74c3c color #e74c3c
.menu-button-label .menu-button-label
color $ui-text-color color $ui-text-color
@@ -145,6 +145,18 @@ $control-height = 30px
padding 0 padding 0
border-radius 17px 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"] body[data-theme="dark"]
.root .root
border-color $ui-dark-borderColor border-color $ui-dark-borderColor

View File

@@ -11,15 +11,15 @@ $control-height = 30px
user-select none user-select none
cursor pointer cursor pointer
background-color $ui-noteList-backgroundColor background-color $ui-noteList-backgroundColor
transition background-color 0.15s transition 0.2s
&:hover &:hover
background-color alpha($ui-button--active-backgroundColor, 40%) background-color alpha($ui-button--active-backgroundColor, 20%)
.item-simple-title .item-simple-title
.item-simple-title-empty .item-simple-title-empty
.item-simple-title-icon .item-simple-title-icon
color $ui-text-color color $ui-text-color
&:active &:active
background-color $ui-button--active-backgroundColor background-color alpha($ui-button--active-backgroundColor, 40%)
color $ui-text-color color $ui-text-color
.item-simple-title .item-simple-title
.item-simple-title-empty .item-simple-title-empty
@@ -28,7 +28,7 @@ $control-height = 30px
.item-simple--active .item-simple--active
@extend .item-simple @extend .item-simple
background-color $ui-button--active-backgroundColor background-color alpha($ui-button--active-backgroundColor, 60%)
color $ui-text-color color $ui-text-color
.item-simple-title .item-simple-title
.item-simple-title-empty .item-simple-title-empty
@@ -37,12 +37,12 @@ $control-height = 30px
.item-simple-title-icon .item-simple-title-icon
color $ui-text-color color $ui-text-color
&:hover &:hover
background-color alpha($ui-button--active-backgroundColor, 50%) background-color alpha($ui-button--active-backgroundColor, 40%)
color #e74c3c color #e74c3c
.menu-button-label .menu-button-label
color $ui-text-color color $ui-text-color
&:active, &:active:hover &:active, &:active:hover
background-color alpha($ui-button--active-backgroundColor, 50%) background-color alpha($ui-button--active-backgroundColor, 40%)
color #e74c3c color #e74c3c
.menu-button-label .menu-button-label
color $ui-text-color color $ui-text-color
@@ -67,6 +67,18 @@ $control-height = 30px
font-weight normal font-weight normal
color $ui-inactive-text-color 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"] body[data-theme="dark"]
.root .root
border-color $ui-dark-borderColor border-color $ui-dark-borderColor

View File

@@ -9,6 +9,13 @@
width 100% width 100%
text-align left text-align left
overflow ellipsis 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 .counters
float right float right
@@ -17,53 +24,17 @@
.menu-button--active .menu-button--active
@extend .menu-button @extend .menu-button
color #e74c3c color #e74c3c
background-color $ui-button--active-backgroundColor SideNavFilter()
.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 .menu-button-star--active
@extend .menu-button @extend .menu-button
color #F9BF3B color #F9BF3B
background-color $ui-button--active-backgroundColor SideNavFilter()
.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 .menu-button-trash--active
@extend .menu-button @extend .menu-button
color #5D9E36 color #5D9E36
background-color $ui-button--active-backgroundColor SideNavFilter()
.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
.menu-button-label .menu-button-label
margin-left 5px margin-left 5px
@@ -93,6 +64,66 @@
pointer-events none pointer-events none
opacity 0 opacity 0
font-size 13px 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"] body[data-theme="dark"]
.menu-button .menu-button

View File

@@ -17,20 +17,20 @@
&:first-child &:first-child
margin-top 0 margin-top 0
&:hover &:hover
color $ui-text-color color $ui-button-default-color
background-color alpha($ui-button--active-backgroundColor, 20%) background-color alpha($ui-button-default--active-backgroundColor, 20%)
transition background-color 0.15s transition background-color 0.15s
&:active &:active
color $ui-text-color color $$ui-button-default-color
background-color $ui-button--active-backgroundColor background-color $ui-button-default--active-backgroundColor
.folderList-item--active .folderList-item--active
@extend .folderList-item @extend .folderList-item
color $ui-text-color color $ui-button-default-color
background-color $ui-button--active-backgroundColor background-color $ui-button-default--active-backgroundColor
&:hover &:hover
color $ui-text-color color $ui-button-default-color
background-color alpha($ui-button--active-backgroundColor, 50%) background-color alpha($ui-button-default--active-backgroundColor, 50%)
.folderList-item-name .folderList-item-name
display block display block
@@ -69,8 +69,28 @@
.folderList-item-name--folded .folderList-item-name--folded
@extend .folderList-item-name @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"] body[data-theme="dark"]
.folderList-item .folderList-item

View File

@@ -2,7 +2,7 @@
* @fileoverview Micro component for showing StorageList * @fileoverview Micro component for showing StorageList
*/ */
import React, { PropTypes } from 'react' import React, { PropTypes } from 'react'
import styles from './StorgaeList.styl' import styles from './StorageList.styl'
import CSSModules from 'browser/lib/CSSModules' import CSSModules from 'browser/lib/CSSModules'
/** /**

View File

@@ -13,15 +13,15 @@
&:first-child &:first-child
margin-top 0 margin-top 0
&:hover &:hover
color $ui-text-color color $ui-button-default-color
background-color alpha($ui-button--active-backgroundColor, 20%) background-color alpha($ui-button-default--active-backgroundColor, 20%)
transition background-color 0.15s transition background-color 0.15s
&:active &:active, &:active:hover
color $ui-text-color color $ui-button-default-color
background-color $ui-button--active-backgroundColor background-color $ui-button-default--active-backgroundColor
.tagList-item-active .tagList-item-active
background-color $ui-button--active-backgroundColor background-color $ui-button-default--active-backgroundColor
display flex display flex
width 100% width 100%
height 26px height 26px
@@ -31,8 +31,9 @@
border none border none
overflow ellipsis overflow ellipsis
font-size 13px font-size 13px
color $ui-button-default-color
&:hover &:hover
background-color alpha($ui-button--active-backgroundColor, 60%) background-color alpha($ui-button-default--active-backgroundColor, 60%)
transition 0.2s transition 0.2s
.tagList-item-name .tagList-item-name
@@ -47,6 +48,22 @@
overflow hidden overflow hidden
text-overflow ellipsis 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"] body[data-theme="dark"]
.tagList-item .tagList-item
color $ui-dark-inactive-text-color color $ui-dark-inactive-text-color

View File

@@ -84,6 +84,8 @@ nodeIpc.connectTo(
const { config } = payload const { config } = payload
if (config.ui.theme === 'dark') { if (config.ui.theme === 'dark') {
document.body.setAttribute('data-theme', 'dark') document.body.setAttribute('data-theme', 'dark')
} else if (config.ui.theme === 'white') {
document.body.setAttribute('data-theme', 'white')
} else { } else {
document.body.setAttribute('data-theme', 'default') document.body.setAttribute('data-theme', 'default')
} }

View File

@@ -3,9 +3,9 @@
.root .root
absolute top right bottom absolute top right bottom
border-width 0 border-left 1px solid alpha(#DEDEDE, 60%)
background-color $ui-noteDetail-backgroundColor background-color $ui-noteDetail-backgroundColor
box-shadow $note-detail-box-shadow box-shadow none
.lock-button .lock-button
padding-bottom 3px padding-bottom 3px
@@ -40,10 +40,16 @@
.body-noteEditor .body-noteEditor
absolute top bottom left right absolute top bottom left right
body[data-theme="white"]
.root
box-shadow $note-detail-box-shadow
border none
body[data-theme="dark"] body[data-theme="dark"]
.root .root
background-color $ui-dark-noteDetail-backgroundColor background-color $ui-dark-noteDetail-backgroundColor
box-shadow none box-shadow none
border none
.control-lockButton .control-lockButton
topBarButtonDark() topBarButtonDark()

View File

@@ -3,9 +3,9 @@
.root .root
absolute top bottom right absolute top bottom right
border-width 0 border-left 1px solid alpha(#DEDEDE, 60%)
background-color $ui-noteDetail-backgroundColor background-color $ui-noteDetail-backgroundColor
box-shadow $note-detail-box-shadow box-shadow none
.body .body
absolute left right absolute left right
@@ -70,9 +70,14 @@
padding 0 0 2px 0 padding 0 0 2px 0
topBarButtonLight() topBarButtonLight()
body[data-theme="white"]
.root
box-shadow $note-detail-box-shadow
border none
body[data-theme="dark"] body[data-theme="dark"]
.root .root
border-color $ui-dark-borderColor border none
background-color $ui-dark-noteDetail-backgroundColor background-color $ui-dark-noteDetail-backgroundColor
box-shadow none box-shadow none

View File

@@ -57,6 +57,8 @@ class Main extends React.Component {
if (config.ui.theme === 'dark') { if (config.ui.theme === 'dark') {
document.body.setAttribute('data-theme', 'dark') document.body.setAttribute('data-theme', 'dark')
} else if (config.ui.theme === 'white') {
document.body.setAttribute('data-theme', 'white')
} else { } else {
document.body.setAttribute('data-theme', 'default') document.body.setAttribute('data-theme', 'default')
} }

View File

@@ -44,6 +44,13 @@ $control-height = 34px
opacity 0 opacity 0
transition 0.1s 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"] body[data-theme="dark"]
.root, .root--expanded .root, .root--expanded
background-color $ui-dark-noteList-backgroundColor background-color $ui-dark-noteList-backgroundColor

View File

@@ -59,6 +59,13 @@ $control-height = 30px
top $control-height top $control-height
overflow auto overflow auto
body[data-theme="white"]
.root
background-color $ui-white-noteList-backgroundColor
.control
background-color $ui-white-noteList-backgroundColor
body[data-theme="dark"] body[data-theme="dark"]
.root .root
border-color $ui-dark-borderColor border-color $ui-dark-borderColor

View File

@@ -1,7 +1,7 @@
.root .root
absolute top left bottom absolute top left bottom
width $sideNav-width width $sideNav-width
background-color #f9f9f9 background-color #2E3235
user-select none user-select none
color $ui-text-color color $ui-text-color
height: 100vh height: 100vh
@@ -11,18 +11,19 @@
.top .top
padding-bottom 15px padding-bottom 15px
.top-menu .top-menu-preference
navButtonColor() navButtonColor()
position absolute position absolute
top 22px top 22px
right 5px right 10px
height 23px
width 2em width 2em
background-color transparent
&:hover &:hover
color $ui-text-color color $ui-button-default--active-backgroundColor
background-color transparent
&:active, &:active:hover &:active, &:active:hover
color $ui-text-color color $ui-button-default--active-backgroundColor
background-color alpha($ui-button--active-backgroundColor, 20%) background-color transparent
.switch-buttons .switch-buttons
background-color transparent background-color transparent
@@ -37,11 +38,11 @@
background-color transparent background-color transparent
transition 0.2s transition 0.2s
&:hover &:hover
color alpha(#0B99F1, 60%) color alpha(#239F86, 60%)
.active-button .active-button
@extend .non-active-button @extend .non-active-button
color #0B99F1 color $ui-button-default--active-backgroundColor
.top-menu-label .top-menu-label
margin-left 5px margin-left 5px
@@ -57,7 +58,7 @@
padding-left 15px padding-left 15px
padding-bottom 13px padding-bottom 13px
p p
color $ui-text-color color $ui-button-default-color
.tagList .tagList
overflow-y auto overflow-y auto
@@ -66,6 +67,7 @@
.root--folded .root--folded
height 100vh height 100vh
width $sideNav--folded-width width $sideNav--folded-width
background-color #2E3235
.switch-buttons .switch-buttons
display none display none
.top .top
@@ -88,7 +90,6 @@
opacity 0 opacity 0
margin-left 0 margin-left 0
overflow hidden overflow hidden
background-color $ui-tooltip-backgroundColor
z-index 10 z-index 10
color white color white
line-height 30px line-height 30px
@@ -96,6 +97,41 @@
border-bottom-right-radius 2px border-bottom-right-radius 2px
pointer-events none pointer-events none
font-size 13px 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"] body[data-theme="dark"]
.root, .root--folded .root, .root--folded
@@ -106,12 +142,15 @@ body[data-theme="dark"]
.top .top
border-color $ui-dark-borderColor border-color $ui-dark-borderColor
.top-menu .top-menu-preference
navDarkButtonColor() navDarkButtonColor()
background-color transparent
&:active &:active
background-color alpha($ui-dark-button--active-backgroundColor, 20%) background-color alpha($ui-dark-button--active-backgroundColor, 20%)
background-color transparent
&:hover &:hover
background-color alpha($ui-dark-button--active-backgroundColor, 20%) background-color alpha($ui-dark-button--active-backgroundColor, 20%)
background-color transparent
.non-active-button .non-active-button
color alpha($ui-dark-text-color, 60%) color alpha($ui-dark-text-color, 60%)

View File

@@ -12,20 +12,12 @@
.header--active .header--active
margin-bottom 5px margin-bottom 5px
background-color $ui-button--active-backgroundColor background-color $ui-button-default--active-backgroundColor
transition color background-color 0.15s transition color background-color 0.15s
.header--active
.header-toggleButton .header-toggleButton
color $ui-text-color
.header--active
.header-info .header-info
color $ui-text-color
.header--active
.header-addFolderButton .header-addFolderButton
color $ui-text-color color $ui-button-default-color
.header-toggleButton .header-toggleButton
navButtonColor() navButtonColor()
@@ -38,7 +30,7 @@
border-radius 50% border-radius 50%
&:hover &:hover
transition 0.2s transition 0.2s
background-color alpha($ui-button--active-backgroundColor, 40%) background-color alpha($ui-button-default--hover-backgroundColor, 40%)
color $ui-text-color color $ui-text-color
.header-info .header-info
@@ -54,7 +46,14 @@
border none border none
overflow ellipsis overflow ellipsis
text-align left 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 .header-info-path
font-size 10px font-size 10px
@@ -72,7 +71,7 @@
border-radius 50% border-radius 50%
&:hover &:hover
transition 0.2s transition 0.2s
background-color alpha($ui-button--active-backgroundColor, 40%) background-color alpha($ui-button-default--hover-backgroundColor, 40%)
color $ui-text-color color $ui-text-color
.root--folded .root--folded
@@ -102,6 +101,33 @@
font-size 10px font-size 10px
margin 0 5px 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"] body[data-theme="dark"]
.header--active .header--active
background-color $ui-dark-button--active-backgroundColor background-color $ui-dark-button--active-backgroundColor

View File

@@ -165,7 +165,7 @@ class SideNav extends React.Component {
<button styleName={isTagActive ? 'active-button' : 'non-active-button'} onClick={this.handleSwitchTagsButtonClick.bind(this)}><i className='fa fa-tags fa-fw' /></button> <button styleName={isTagActive ? 'active-button' : 'non-active-button'} onClick={this.handleSwitchTagsButtonClick.bind(this)}><i className='fa fa-tags fa-fw' /></button>
</div> </div>
<div> <div>
<button styleName='top-menu' <button styleName='top-menu-preference'
onClick={(e) => this.handleMenuButtonClick(e)} onClick={(e) => this.handleMenuButtonClick(e)}
> >
<i className='fa fa-wrench fa-fw' /> <i className='fa fa-wrench fa-fw' />

View File

@@ -112,6 +112,21 @@ $control-height = 34px
opacity 0 opacity 0
transition 0.1s transition 0.1s
body[data-theme="white"]
.root, .root--expanded
background-color $ui-white-noteList-backgroundColor
.control
border-color $ui-dark-borderColor
.control-search
background-color $ui-white-noteList-backgroundColor
.control-search-input
background-color $ui-white-noteList-backgroundColor
input
background-color $ui-white-noteList-backgroundColor
body[data-theme="dark"] body[data-theme="dark"]
.root, .root--expanded .root, .root--expanded
background-color $ui-dark-noteList-backgroundColor background-color $ui-dark-noteList-backgroundColor

View File

@@ -110,6 +110,8 @@ function set (updates) {
if (newConfig.ui.theme === 'dark') { if (newConfig.ui.theme === 'dark') {
document.body.setAttribute('data-theme', 'dark') document.body.setAttribute('data-theme', 'dark')
} else if (newConfig.ui.theme === 'white') {
document.body.setAttribute('data-theme', 'white')
} else { } else {
document.body.setAttribute('data-theme', 'default') document.body.setAttribute('data-theme', 'default')
} }

View File

@@ -141,7 +141,8 @@ class UiTab extends React.Component {
onChange={(e) => this.handleUIChange(e)} onChange={(e) => this.handleUIChange(e)}
ref='uiTheme' ref='uiTheme'
> >
<option value='default'>Light</option> <option value='default'>Default</option>
<option value='white'>White</option>
<option value='dark'>Dark</option> <option value='dark'>Dark</option>
</select> </select>
</div> </div>

View File

@@ -15,18 +15,18 @@ $ui-text-color = #333333
$ui-inactive-text-color = #939395 $ui-inactive-text-color = #939395
$ui-borderColor = #D1D1D1 $ui-borderColor = #D1D1D1
$ui-backgroundColor = #FFFFFF $ui-backgroundColor = #FFFFFF
$ui-noteList-backgroundColor = #F3F3F3 $ui-noteList-backgroundColor = #FBFBFB
$ui-noteDetail-backgroundColor = #F4F4F4 $ui-noteDetail-backgroundColor = #F8F8F8
$ui-border = solid 1px $ui-borderColor $ui-border = solid 1px $ui-borderColor
$ui-active-color = #6AA5E9 $ui-active-color = #6AA5E9
$ui-tag-backgroundColor = rgba(0, 0, 0, 0.3) $ui-tag-backgroundColor = rgba(0, 0, 0, 0.3)
// UI Button // UI Default Button
$ui-button-color = #939395 $ui-button-default-color = #FBFBFB
$ui-button--hover-backgroundColor = #D9D9D9 $ui-button-default--hover-backgroundColor = #2B8976
$ui-button--active-color = white $ui-button-default--active-color = white
$ui-button--active-backgroundColor = #D9D9D9 $ui-button-default--active-backgroundColor = #2B8976
$ui-button--focus-borderColor = lighten(#369DCD, 25%) $ui-button-default--focus-borderColor = lighten(#369DCD, 25%)
// UI Tooltip // UI Tooltip
$ui-tooltip-text-color = white $ui-tooltip-text-color = white
@@ -119,6 +119,26 @@ colorDangerButton()
&:active:hover &:active:hover
background-color $danger-button-background--active background-color $danger-button-background--active
/**
* SideNav
*/
SideNavFilter()
background-color $ui-button-default--active-backgroundColor
.counters
color $ui-button-default-color
.menu-button-label
color $ui-button-default-color
&:hover
background-color alpha($ui-button-default--hover-backgroundColor, 50%)
color $ui-button-default-color
.menu-button-label
color $ui-button-default-color
&:active, &:active:hover
background-color alpha($ui-button-default--hover-backgroundColor, 50%)
color $ui-button-default-color
.menu-button-label
color $ui-button-default-color
/** /**
* Nav * Nav
*/ */
@@ -129,13 +149,14 @@ navButtonColor()
background-color transparent background-color transparent
transition 0.15s transition 0.15s
&:hover &:hover
background-color alpha($ui-button--active-backgroundColor, 20%) background-color alpha($ui-button-default--active-backgroundColor, 20%)
transition 0.15s transition 0.15s
color $ui-text-color color $ui-button-default-color
&:active, &:active:hover &:active, &:active:hover
background-color $ui-button--active-backgroundColor background-color #1EC38B
color $ui-text-color color $ui-button-default-color
transition 0.15s transition 0.15s
/** /**
* # Modal Stuff * # Modal Stuff
* These will be moved lib/modal * These will be moved lib/modal
@@ -175,7 +196,35 @@ topBarButtonLight()
.control-lockButton-tooltip .control-lockButton-tooltip
opacity 1 opacity 1
// Dark theme // White theme
$ui-white-noteList-backgroundColor = #F3F3F3
$ui-white-noteDetail-backgroundColor = #F4F4F4
/**
* Nav
*/
navWhiteButtonColor()
border none
color $ui-button-color
background-color transparent
transition 0.15s
&:hover
background-color alpha($ui-button--active-backgroundColor, 20%)
transition 0.15s
color $ui-text-color
&:active, &:active:hover
background-color $ui-button--active-backgroundColor
color $ui-text-color
transition 0.15s
// UI Button
$ui-button-color = #939395
$ui-button--hover-backgroundColor = #D9D9D9
$ui-button--active-color = white
$ui-button--active-backgroundColor = #D9D9D9
$ui-button--focus-borderColor = lighten(#369DCD, 25%)
/******* Dark theme ********/
$ui-dark-active-color = #3A404C $ui-dark-active-color = #3A404C
$ui-dark-borderColor = lighten(#21252B, 20%) $ui-dark-borderColor = lighten(#21252B, 20%)
$ui-dark-backgroundColor = #1E2124 $ui-dark-backgroundColor = #1E2124