From 04060ce2529036c8619f5cc9549057623e12eade Mon Sep 17 00:00:00 2001 From: Rokt33r Date: Sun, 23 Aug 2015 00:52:03 +0900 Subject: [PATCH] =?UTF-8?q?#14=20=E6=94=B9=E5=96=84=E9=81=A9=E7=94=A8=20?= =?UTF-8?q?=08-=20=E3=82=A2=E3=83=97=E3=83=AA=E3=81=8C=E7=AB=8B=E3=81=A1?= =?UTF-8?q?=E4=B8=8A=E3=81=8C=E3=81=A3=E3=81=9F=E3=82=89=E6=9C=80=E5=88=9D?= =?UTF-8?q?=E3=81=AFmy=20planet=E3=81=8C=E8=A1=A8=E7=A4=BA=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E3=81=97=E3=81=9F?= =?UTF-8?q?=E3=81=84=20-=20Note=E3=81=8C=E3=82=B9=E3=82=AF=E3=83=AD?= =?UTF-8?q?=E3=83=BC=E3=83=AB=E3=81=A7=E3=81=8D=E3=81=AA=E3=81=84=20-=20No?= =?UTF-8?q?te=E8=A1=8C=E9=96=93=E3=81=8C=E3=81=AA=E3=81=8F=E3=81=A6?= =?UTF-8?q?=E8=AA=AD=E3=81=BF=E3=81=A5=E3=82=89=E3=81=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- browser/main/Components/CodeEditor.jsx | 3 +- browser/main/Components/CodeViewer.jsx | 5 +-- .../main/Components/PlanetArticleDetail.jsx | 4 +-- browser/main/Containers/HomeContainer.jsx | 4 +++ browser/main/Mixins/KeyCaster.js | 4 --- .../main/containers/PlanetContainer.styl | 15 +++++---- browser/styles/mixins/marked.styl | 32 +++++++++++-------- 7 files changed, 36 insertions(+), 31 deletions(-) diff --git a/browser/main/Components/CodeEditor.jsx b/browser/main/Components/CodeEditor.jsx index 6cf3a4a7..4402ecd2 100644 --- a/browser/main/Components/CodeEditor.jsx +++ b/browser/main/Components/CodeEditor.jsx @@ -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 ( -
+
) } }) diff --git a/browser/main/Components/CodeViewer.jsx b/browser/main/Components/CodeViewer.jsx index bd20fe2f..6818490b 100644 --- a/browser/main/Components/CodeViewer.jsx +++ b/browser/main/Components/CodeViewer.jsx @@ -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 ( -
+
) } }) diff --git a/browser/main/Components/PlanetArticleDetail.jsx b/browser/main/Components/PlanetArticleDetail.jsx index 793d6019..d483c0f2 100644 --- a/browser/main/Components/PlanetArticleDetail.jsx +++ b/browser/main/Components/PlanetArticleDetail.jsx @@ -81,9 +81,7 @@ module.exports = React.createClass({
-
- -
+
) diff --git a/browser/main/Containers/HomeContainer.jsx b/browser/main/Containers/HomeContainer.jsx index 45e801ee..32e5fad0 100644 --- a/browser/main/Containers/HomeContainer.jsx +++ b/browser/main/Containers/HomeContainer.jsx @@ -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}) } }, diff --git a/browser/main/Mixins/KeyCaster.js b/browser/main/Mixins/KeyCaster.js index 4a6d3ceb..e9996d69 100644 --- a/browser/main/Mixins/KeyCaster.js +++ b/browser/main/Mixins/KeyCaster.js @@ -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') diff --git a/browser/styles/main/containers/PlanetContainer.styl b/browser/styles/main/containers/PlanetContainer.styl index 6b498aac..9bf89ba7 100644 --- a/browser/styles/main/containers/PlanetContainer.styl +++ b/browser/styles/main/containers/PlanetContainer.styl @@ -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 diff --git a/browser/styles/mixins/marked.styl b/browser/styles/mixins/marked.styl index 891dc258..fe8723ae 100644 --- a/browser/styles/mixins/marked.styl +++ b/browser/styles/mixins/marked.styl @@ -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