diff --git a/app/components/BookBuilder/Chapter.jsx b/app/components/BookBuilder/Chapter.jsx index 5202f5a8fd7d9d82ad3e93e267e945f1bf326189..790009c181a661c8d1c81cac84c1db653c852935 100644 --- a/app/components/BookBuilder/Chapter.jsx +++ b/app/components/BookBuilder/Chapter.jsx @@ -292,8 +292,8 @@ export class Chapter extends React.Component { const input = ( <TextInput - className="edit" - ref="chapterInput" + className='edit' + ref='chapterInput' onSave={this._onSaveRename} value={title} /> @@ -313,7 +313,7 @@ export class Chapter extends React.Component { // could do with refs, but that would mean mounting instead of // shallow rendering to access enzyme's refs() api method renameButton = ( - <a id="bb-rename" + <a id='bb-rename' onClick={renameButtonFunction}> { renameButtonText } </a> @@ -393,7 +393,7 @@ export class Chapter extends React.Component { titleArea = ( <DropdownButton title={title} - id="dropbutton" + id='dropbutton' className={styles.dropDown} open={this.state.open} onClick={this._toggleList} @@ -401,10 +401,10 @@ export class Chapter extends React.Component { <div style={{ width: width }}> <div className={styles.dropDownInputContairer}> <TextInput - ref="dropDownInput" + ref='dropDownInput' className={styles.dropDownInput} onSave={this._onClickCustomTitle} - placeholder="Type a custom title" + placeholder='Type a custom title' /> </div> @@ -422,12 +422,12 @@ export class Chapter extends React.Component { { renameButton } <LinkContainer to={`/books/${book.id}/fragments/${chapter.id}`} - id="bb-edit" + id='bb-edit' > <a>{ editOrView } </a> </LinkContainer> - <a id="bb-delete" + <a id='bb-delete' onClick={this._toggleDelete}> Delete </a> @@ -442,14 +442,14 @@ export class Chapter extends React.Component { } editorArea = ( - <a id="bb-unlock" + <a id='bb-unlock' className={styles.lEditing} onClick={this._toggleUnlock}> <i className={styles.lockIcon + ' fa fa-lock'} - aria-hidden="true" - alt="unlock" + aria-hidden='true' + alt='unlock' /> <span className={styles.lockMessage}> { chapter.lock.editor.username + message} @@ -469,7 +469,7 @@ export class Chapter extends React.Component { className={styles.chapterContainer + ' col-lg-12 bb-chapter ' + (chapter.subCategory === 'chapter' ? styles.isChapter : styles.isPart)} style={{ opacity: opacity }}> <div className={styles.grabIcon + ' ' + (chapter.division === 'body' ? styles.grabIconBody : '')}> - <i className="fa fa-circle" /> + <i className='fa fa-circle' /> <div className={styles.tooltip}> Grab to sort </div> @@ -490,19 +490,19 @@ export class Chapter extends React.Component { <div className={styles.secondLineContainer}> <div className={styles.noPadding + ' col-lg-2 col-md-12 col-sm-12 col-xs-12'}> - <div id="bb-upload" className={styles.btnFile}> + <div id='bb-upload' className={styles.btnFile}> Upload Word <input - type="file" - accept=".docx" - title=" " + type='file' + accept='.docx' + title=' ' /> </div> </div> <ul className={styles.secondActions + ' col-lg-7 col-md-12 col-sm-12 col-xs-12'}> <ProgressIndicator - type="style" + type='style' book={book} chapter={chapter} update={update} @@ -513,7 +513,7 @@ export class Chapter extends React.Component { /> <ProgressIndicator - type="edit" + type='edit' book={book} chapter={chapter} update={update} @@ -524,7 +524,7 @@ export class Chapter extends React.Component { /> <ProgressIndicator - type="review" + type='review' book={book} chapter={chapter} update={update} @@ -535,7 +535,7 @@ export class Chapter extends React.Component { /> <ProgressIndicator - type="clean" + type='clean' book={book} chapter={chapter} roles={roles} @@ -576,8 +576,8 @@ export class Chapter extends React.Component { <BookBuilderModal title={'Delete ' + type} chapter={chapter} - action="delete" - successText="Delete" + action='delete' + successText='Delete' type={type} successAction={this._onClickDelete} show={this.state.showDeleteModal} @@ -588,8 +588,8 @@ export class Chapter extends React.Component { <BookBuilderModal title={'Unlock ' + type} chapter={chapter} - action="unlock" - successText="Unlock" + action='unlock' + successText='Unlock' type={type} successAction={this._onClickUnlock} show={this.state.showUnlockModal} diff --git a/app/components/BookBuilder/styles/bookBuilder.local.scss b/app/components/BookBuilder/styles/bookBuilder.local.scss index fc424cd44ef6d57c477410b3510298b33a02d6ce..d1ae2f43074f1d42c3fb64cf6328a341202cd1dc 100644 --- a/app/components/BookBuilder/styles/bookBuilder.local.scss +++ b/app/components/BookBuilder/styles/bookBuilder.local.scss @@ -60,10 +60,11 @@ $white: #fff; } .menuItem { + padding-bottom: 8px; a { color: $light-grey !important; padding-left: 20px; - text-decoration: none !important; + text-decoration: none ; &:hover { color: $dark-grey !important; @@ -71,28 +72,24 @@ $white: #fff; } } - ul { - list-style-type: none; - padding-left: 0 !important; - } - .dropDown { background-color: transparent !important; - border: 0 !important; - border-color: transparent !important; + border: 0; + border-color: transparent; + -webkit-box-shadow: none !important; float: left; - padding: 0 !important; + font-size: 18px; + font-weight: 500; + padding: 0; position: relative; - -webkit-box-shadow:none !important; - span:first-child { - float: left !important; - font-size: 18px; - font-weight: 500; + button { + float: left; position: relative; } - .caret { - // margin-left:30px!important; + + span:first-child { + margin: 0 0 5px 30px; } } diff --git a/app/components/BookBuilder/styles/bookList.local.scss b/app/components/BookBuilder/styles/bookList.local.scss index c8f50e197364ca893a9d644c2be64394a84c2727..656213a3aa4427f13e44a7acfc626e110cb4e75e 100644 --- a/app/components/BookBuilder/styles/bookList.local.scss +++ b/app/components/BookBuilder/styles/bookList.local.scss @@ -2,22 +2,19 @@ $primary-color: #515253; .bookList { .bookTitle { - border-bottom: 0.1em solid; + border-bottom: .1em solid; position: relative; } h1, .h1 { - // font-weight: 300; font-weight: 500; font-style: italic; - // font-family: "Fira Sans", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; font-size: 48px; line-height: 56px; margin: 0; } h2, .h2 { - // font-family: "Fira Sans Light Italic", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif; color: $primary-color; font-size: 32px; font-style: italic; diff --git a/app/components/Navigation/Navigation.jsx b/app/components/Navigation/Navigation.jsx index 3286d6c2a6a6755f3229e737f4ecafefa56f3ee8..679ae431bde7bf04b211a02ddd95270096761cad 100644 --- a/app/components/Navigation/Navigation.jsx +++ b/app/components/Navigation/Navigation.jsx @@ -15,7 +15,7 @@ export default class Navigation extends React.Component { logout () { const { logoutUser } = this.props.actions logoutUser() - browserHistory.push('/') + browserHistory.push('/login') } render () { diff --git a/app/routes.jsx b/app/routes.jsx index 7c542c7a14aed02a74ff47577e376f0830a27813..7d5edb4b1547c963d2bca1ef47b7bd2d8d6dffa3 100644 --- a/app/routes.jsx +++ b/app/routes.jsx @@ -23,10 +23,9 @@ const AuthenticatedManage = requireAuthentication( export default ( <Route> - <Route path='/blog' component={Blog} /> <Route path='/' component={AuthenticatedManage}> <Route path='books' component={BookList} /> - + <Route path='/blog' component={Blog} /> <Route path='books/:id/book-builder' component={BookBuilder} /> <Route path='books/:bookId/fragments/:fragmentId' component={SimpleEditorWrapper} /> diff --git a/config/dev.js b/config/dev.js index 52ffaf0d5c913abd80da89a80f12f596b5667424..b87f36a6136391f383b54920e1cd909b58cf6dfa 100644 --- a/config/dev.js +++ b/config/dev.js @@ -9,7 +9,7 @@ module.exports = { API_ENDPOINT: '/api' }, 'pubsweet-frontend': { - theme: 'PepperTheme', + theme: 'EditoriaTheme', routes: 'app/routes.jsx', navigation: 'app/components/Navigation/Navigation.jsx' }, diff --git a/webpack/babel-includes.js b/webpack/babel-includes.js index 709ed365ac32d83ce5f5d6154fc944237538ed6d..fa7953efcc11538df9cc2b40a309b2d0bba195f3 100644 --- a/webpack/babel-includes.js +++ b/webpack/babel-includes.js @@ -3,6 +3,7 @@ const fs = require('fs') var babelIncludes = [ new RegExp(path.join(__dirname, '../node_modules/pubsweet-frontend/src')), + new RegExp(path.join(__dirname, '../node_modules/substance')), new RegExp(path.join(__dirname, '../app')), new RegExp(path.join(__dirname, '../node_modules/pubsweet-.*')) ]