1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

Fix note detail layout

This commit is contained in:
Kazu Yokomizo
2017-11-14 18:13:37 +09:00
parent 792e41f161
commit 5b224d3b54
11 changed files with 44 additions and 55 deletions

View File

@@ -3,7 +3,7 @@
*/ */
// Margin on the left side and the right side for NoteDetail component. // Margin on the left side and the right side for NoteDetail component.
$note-detail-left-margin = 25px $note-detail-left-margin = 50px
$note-detail-right-margin = 25px $note-detail-right-margin = 80px
$note-detail-box-shadow = 2px 0 15px -8px #b1b1b1 inset $note-detail-box-shadow = 2px 0 15px -8px #b1b1b1 inset

View File

@@ -8,7 +8,7 @@ const InfoButton = ({
<button styleName='control-infoButton' <button styleName='control-infoButton'
onClick={onClick} onClick={onClick}
> >
<i className='fa fa-info infoButton' styleName='info-button' /> <i className='fa fa-info-circle infoButton' styleName='info-button' />
</button> </button>
) )

View File

@@ -1,5 +1,5 @@
.control-infoButton .control-infoButton
float right top 10px
topBarButtonLight() topBarButtonLight()
.control-infoPanel .control-infoPanel

View File

@@ -302,10 +302,6 @@ class MarkdownNoteDetail extends React.Component {
const detailTopBar = <div styleName='info'> const detailTopBar = <div styleName='info'>
<div styleName='info-left'> <div styleName='info-left'>
<StarButton styleName='info-left-button'
onClick={(e) => this.handleStarButtonClick(e)}
isActive={note.isStarred}
/>
<div styleName='info-left-top'> <div styleName='info-left-top'>
<FolderSelect styleName='info-left-top-folderSelect' <FolderSelect styleName='info-left-top-folderSelect'
value={this.state.note.storage + '-' + this.state.note.folder} value={this.state.note.storage + '-' + this.state.note.folder}
@@ -325,6 +321,15 @@ class MarkdownNoteDetail extends React.Component {
/> />
</div> </div>
<div styleName='info-right'> <div styleName='info-right'>
<InfoButton
onClick={(e) => this.handleInfoButtonClick(e)}
/>
<StarButton
onClick={(e) => this.handleStarButtonClick(e)}
isActive={note.isStarred}
/>
{(() => { {(() => {
const faClassName = `fa ${this.getToggleLockButton()}` const faClassName = `fa ${this.getToggleLockButton()}`
const lockButtonComponent = const lockButtonComponent =
@@ -341,15 +346,14 @@ class MarkdownNoteDetail extends React.Component {
this.state.isLockButtonShown ? lockButtonComponent : '' this.state.isLockButtonShown ? lockButtonComponent : ''
) )
})()} })()}
<TrashButton onClick={(e) => this.handleTrashButtonClick(e)} />
<button styleName='control-fullScreenButton' <button styleName='control-fullScreenButton'
onMouseDown={(e) => this.handleFullScreenButton(e)} onMouseDown={(e) => this.handleFullScreenButton(e)}>
>
<i className='fa fa-window-maximize' styleName='fullScreen-button' /> <i className='fa fa-window-maximize' styleName='fullScreen-button' />
</button> </button>
<InfoButton
onClick={(e) => this.handleInfoButtonClick(e)} <TrashButton onClick={(e) => this.handleTrashButtonClick(e)} />
/>
<InfoPanel <InfoPanel
storageName={currentOption.storage.name} storageName={currentOption.storage.name}
folderName={currentOption.folder.name} folderName={currentOption.folder.name}

View File

@@ -11,6 +11,7 @@
padding-bottom 3px padding-bottom 3px
.control-lockButton .control-lockButton
top 120px
topBarButtonLight() topBarButtonLight()
.control-lockButton-tooltip .control-lockButton-tooltip
@@ -26,8 +27,7 @@
transition 0.1s transition 0.1s
.control-fullScreenButton .control-fullScreenButton
float right top 80px
padding 0 0 2px 0
topBarButtonLight() topBarButtonLight()
.body .body

View File

@@ -1,6 +1,6 @@
@import('DetailVars') @import('DetailVars')
$info-height = 60px $info-height = 40px
$info-margin-under-border = 27px $info-margin-under-border = 27px
.info .info
@@ -15,6 +15,7 @@ $info-margin-under-border = 27px
float left float left
padding 0 5px padding 0 5px
margin 0px 2px margin 0px 2px
.info-left-top .info-left-top
display inline-block display inline-block
height $info-height height $info-height
@@ -28,6 +29,7 @@ $info-margin-under-border = 27px
align-items center align-items center
justify-content center justify-content center
border-radius 3px border-radius 3px
.info-left-button .info-left-button
width 34px width 34px
height 34px height 34px
@@ -48,7 +50,7 @@ $info-margin-under-border = 27px
.info-right .info-right
position absolute position absolute
right 0 right -35px
top 0 top 0
background $ui-noteDetail-backgroundColor background $ui-noteDetail-backgroundColor
bottom 1px bottom 1px

View File

@@ -583,10 +583,6 @@ class SnippetNoteDetail extends React.Component {
const detailTopBar = <div styleName='info'> const detailTopBar = <div styleName='info'>
<div styleName='info-left'> <div styleName='info-left'>
<StarButton styleName='info-left-button'
onClick={(e) => this.handleStarButtonClick(e)}
isActive={note.isStarred}
/>
<div styleName='info-left-top'> <div styleName='info-left-top'>
<FolderSelect styleName='info-left-top-folderSelect' <FolderSelect styleName='info-left-top-folderSelect'
value={this.state.note.storage + '-' + this.state.note.folder} value={this.state.note.storage + '-' + this.state.note.folder}
@@ -603,15 +599,21 @@ class SnippetNoteDetail extends React.Component {
/> />
</div> </div>
<div styleName='info-right'> <div styleName='info-right'>
<TrashButton onClick={(e) => this.handleTrashButtonClick(e)} />
<button styleName='control-fullScreenButton'
onMouseDown={(e) => this.handleFullScreenButton(e)}
>
<i className='fa fa-window-maximize' styleName='fullScreen-button' />
</button>
<InfoButton <InfoButton
onClick={(e) => this.handleInfoButtonClick(e)} onClick={(e) => this.handleInfoButtonClick(e)}
/> />
<StarButton
onClick={(e) => this.handleStarButtonClick(e)}
isActive={note.isStarred}
/>
<button styleName='control-fullScreenButton'
onMouseDown={(e) => this.handleFullScreenButton(e)}>
<i className='fa fa-window-maximize' styleName='fullScreen-button' />
</button>
<TrashButton onClick={(e) => this.handleTrashButtonClick(e)} />
<InfoPanel <InfoPanel
storageName={currentOption.storage.name} storageName={currentOption.storage.name}
folderName={currentOption.folder.name} folderName={currentOption.folder.name}

View File

@@ -66,8 +66,7 @@
color white color white
.control-fullScreenButton .control-fullScreenButton
float right top 80px
padding 0 0 2px 0
topBarButtonLight() topBarButtonLight()
body[data-theme="white"] body[data-theme="white"]

View File

@@ -1,28 +1,9 @@
.root .root
left 7px top 45px
top 0 topBarButtonLight()
padding 0
color alpha($ui-favorite-star-button-color, 60%)
&:hover
transition 0.15s
background-color alpha($ui-button--active-backgroundColor, 40%)
color $ui-favorite-star-button-color
&:active
transition 0.15s
background-color alpha($ui-button--active-backgroundColor, 40%)
color $ui-favorite-star-button-color
.root--active .root--active
@extend .root @extend .root
color $ui-favorite-star-button-color
&:hover
transition 0.15s
color $ui-favorite-star-button-color
background-color alpha($ui-button--active-backgroundColor, 40%)
&:active
transition 0.15s
color $ui-favorite-star-button-color
background-color alpha($ui-button--active-backgroundColor, 40%)
.icon .icon
transition transform 0.15s transition transform 0.15s

View File

@@ -1,5 +1,5 @@
.control-trashButton .control-trashButton
float right top 120px
topBarButtonLight() topBarButtonLight()
.trashButton .trashButton

View File

@@ -180,19 +180,20 @@ modal()
border-radius $modal-border-radius border-radius $modal-border-radius
topBarButtonLight() topBarButtonLight()
position absolute
width 34px width 34px
height 34px height 34px
border-radius 17px border-radius 17px
font-size 14px font-size 14px
margin 15px 7px
border none border none
color $ui-button-color color alpha($ui-button-color, 0.3)
fill $ui-button-color fill $ui-button-color
background-color transparent background-color transparent
&:active &:active
border-color $ui-button--active-backgroundColor border-color $ui-button--active-backgroundColor
&:hover &:hover
background-color alpha($ui-button--hover-backgroundColor, 60%) transition 0.4s
color $ui-button-color
.control-lockButton-tooltip .control-lockButton-tooltip
opacity 1 opacity 1