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

#14 改善適用

- アプリが立ち上がったら最初はmy planetが表示されるようにしたい
- Noteがスクロールできない
- Note行間がなくて読みづらい
This commit is contained in:
Rokt33r
2015-08-23 00:52:03 +09:00
parent da066fe694
commit 04060ce252
7 changed files with 36 additions and 31 deletions

View File

@@ -6,6 +6,7 @@ module.exports = React.createClass({
propTypes: {
code: React.PropTypes.string,
mode: React.PropTypes.string,
className: React.PropTypes.string,
onChange: React.PropTypes.func
},
componentDidMount: function () {
@@ -52,7 +53,7 @@ module.exports = React.createClass({
},
render: function () {
return (
<div ref='target'></div>
<div ref='target' className={this.props.className}></div>
)
}
})

View File

@@ -5,7 +5,8 @@ var ace = window.ace
module.exports = React.createClass({
propTypes: {
code: React.PropTypes.string,
mode: React.PropTypes.string
mode: React.PropTypes.string,
className: React.PropTypes.string
},
componentDidMount: function () {
var el = React.findDOMNode(this.refs.target)
@@ -46,7 +47,7 @@ module.exports = React.createClass({
},
render: function () {
return (
<div ref='target'></div>
<div ref='target' className={this.props.className}></div>
)
}
})

View File

@@ -81,9 +81,7 @@ module.exports = React.createClass({
</span>
</div>
<div className='detailBody'>
<div className='content'>
<CodeViewer code={article.content} mode={article.mode}/>
</div>
<CodeViewer className='content' code={article.content} mode={article.mode}/>
</div>
</div>
)

View File

@@ -16,6 +16,10 @@ module.exports = React.createClass({
componentDidMount: function () {
if (this.isActive('homeEmpty')) {
var user = JSON.parse(localStorage.getItem('currentUser'))
if (user.Planets != null && user.Planets.length > 0) {
this.transitionTo('planet', {userName: user.name, planetName: user.Planets[0].name})
return
}
this.transitionTo('userHome', {userName: user.name})
}
},

View File

@@ -20,13 +20,9 @@ var KeyStore = Reflux.createStore({
if (typeof cb === 'function') cb()
},
onKeyDown: function (e) {
console.log(e.keyCode)
console.log(state)
/*
Modals
*/
if (state.codeForm || state.noteForm || state.noteDeleteModal || state.codeDeleteModal || state.addMemberModal || state.aboutModal || state.editProfileModal || state.contactModal || state.teamCreateModal || state.planetCreateModal || state.planetSettingModal || state.teamSettingsModal || state.logoutModal) {
// ESC
if (e.keyCode === 27) this.cast('closeModal')

View File

@@ -287,19 +287,20 @@ articleListWidth= 275px
absolute left right bottom
top 105px
.content
position absolute
top 5px
bottom 5px
left 2px
right 2px
box-sizing border-box
padding 5px
border-top solid 1px borderColor
overflow-x hidden
overflow-y auto
&.noteDetail
.detailBody .content
overflow-x hidden
overflow-y auto
marked()
&.codeDetail
.detailBody .content
.ace_editor
position absolute
top 5px
bottom 5px
left 2px
right 2px
absolute left right top bottom

View File

@@ -22,10 +22,11 @@ marked()
font-size 0.67em
margin 2.33em auto
h1, h2, h3, h4, h5, h6
font-weight font-weight 400
line-height 1.2em
font-weight 400
line-height 1.4em
p
line-height 1.2em
line-height 1.4em
margin-bottom 15px
img
max-width 100%
strong
@@ -36,14 +37,14 @@ marked()
text-decoration line-through
blockquote
border-left solid 4px brandBorderColor
margin 1em 0
margin 15px 0 15px
padding 0 25px
ul
list-style-type disc
padding-left 35px
li
display list-item
margin 0.5em 0
margin 15px 0
&>li>ul
list-style-type circle
&>li>ul
@@ -53,33 +54,36 @@ marked()
padding-left 35px
li
display list-item
margin 0.5em 0
margin 15px 0
code
font-family monospace
padding 2px 4px
border solid 1px borderColor
border-radius 4px
font-size 0.9em
color black
text-decoration none
pre
padding 5px
border solid 1px borderColor
border-radius 5px
margin-bottom 0.5em
overflow-x auto
margin-bottom 15px
&>code
padding 0
border none
border-radius 0
color black
table
width 100%
margin 15px 0
margin 15px 0 25px
thead
tr
background-color tableHeadBgColor
th
border-style: solid;
padding: 5px;
border-width: 1px 0 2px 1px;
border-style solid
padding 15px 5px
border-width 1px 0 2px 1px
border-color borderColor
&:last-child
border-right solid 1px borderColor
@@ -89,9 +93,9 @@ marked()
tr:nth-child(2n)
background-color tableEvenBgColor
td
border-style: solid;
padding: 5px;
border-width: 0 0 1px 1px;
border-style solid
padding 15px 5px
border-width 0 0 1px 1px
border-color borderColor
&:last-child
border-right solid 1px borderColor