diff --git a/fonts/ascribe-logo.eot b/fonts/ascribe-logo.eot new file mode 100644 index 00000000..609770bc Binary files /dev/null and b/fonts/ascribe-logo.eot differ diff --git a/fonts/ascribe-logo.svg b/fonts/ascribe-logo.svg new file mode 100644 index 00000000..28ab9458 --- /dev/null +++ b/fonts/ascribe-logo.svg @@ -0,0 +1,19 @@ + + + +Generated by IcoMoon + + \ No newline at end of file diff --git a/fonts/ascribe-logo.ttf b/fonts/ascribe-logo.ttf new file mode 100644 index 00000000..79acfe89 Binary files /dev/null and b/fonts/ascribe-logo.ttf differ diff --git a/fonts/ascribe-logo.woff b/fonts/ascribe-logo.woff new file mode 100644 index 00000000..e8c8b031 Binary files /dev/null and b/fonts/ascribe-logo.woff differ diff --git a/fonts/ascribe_logo.svg b/fonts/ascribe_logo.svg deleted file mode 100644 index 3d28d0a8..00000000 --- a/fonts/ascribe_logo.svg +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - diff --git a/gulpfile.js b/gulpfile.js index 3c92945d..f13945b0 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -111,7 +111,11 @@ gulp.task('sass:build', function () { ] }).on('error', sass.logError)) .pipe(gulpif(!argv.production, sourcemaps.write('./maps'))) - .pipe(gulpif(argv.production, minifyCss())) + // We need to set `advanced` to false, as it merges + // some of the styles wrongly + .pipe(gulpif(argv.production, minifyCss({ + advanced: false + }))) .pipe(gulp.dest('./build/css')) .pipe(browserSync.stream()); }); diff --git a/index.html b/index.html index 743d01dc..28b4d222 100644 --- a/index.html +++ b/index.html @@ -2,33 +2,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - ascribe - <% DEBUG && print('') %> @@ -41,6 +16,12 @@ <% DEBUG && print('window.DEBUG = true'); %> <% DEBUG && print('window.CREDENTIALS = \'' + CREDENTIALS + '\''); %> + + +
diff --git a/js/components/ascribe_accordion_list/accordion_list.js b/js/components/ascribe_accordion_list/accordion_list.js index c488a3d8..1046ab7f 100644 --- a/js/components/ascribe_accordion_list/accordion_list.js +++ b/js/components/ascribe_accordion_list/accordion_list.js @@ -35,7 +35,7 @@ let AccordionList = React.createClass({ {getLangText('We could not find any works related to you...')}

- {getLangText('To register one, click')} + {getLangText('To register one, click')}  {getLangText('here')}!

diff --git a/js/components/ascribe_accordion_list/accordion_list_item.js b/js/components/ascribe_accordion_list/accordion_list_item.js index ce24c083..38cb77b1 100644 --- a/js/components/ascribe_accordion_list/accordion_list_item.js +++ b/js/components/ascribe_accordion_list/accordion_list_item.js @@ -1,6 +1,7 @@ 'use strict'; import React from 'react'; +import { Link } from 'react-router'; let AccordionListItem = React.createClass({ @@ -12,6 +13,7 @@ let AccordionListItem = React.createClass({ subheading: React.PropTypes.object, subsubheading: React.PropTypes.object, buttons: React.PropTypes.object, + linkData: React.PropTypes.string, children: React.PropTypes.oneOfType([ React.PropTypes.arrayOf(React.PropTypes.element), React.PropTypes.element @@ -19,29 +21,49 @@ let AccordionListItem = React.createClass({ }, render() { + const { linkData, + className, + thumbnail, + heading, + subheading, + subsubheading, + buttons, + badge, + children } = this.props; + + return (
-
+
-
-
- {this.props.thumbnail} +
+ +
+ {thumbnail} +
+
-
-
- {this.props.heading} - {this.props.subheading} - {this.props.subsubheading} - {this.props.buttons} -
+
+ + {heading} + + + {subheading} + {subsubheading} + +
+ {buttons} +
+
+
- {this.props.badge} + {badge}
- {this.props.children} + {children}
); } diff --git a/js/components/ascribe_accordion_list/accordion_list_item_edition_widget.js b/js/components/ascribe_accordion_list/accordion_list_item_edition_widget.js index 709160b9..47c0fb77 100644 --- a/js/components/ascribe_accordion_list/accordion_list_item_edition_widget.js +++ b/js/components/ascribe_accordion_list/accordion_list_item_edition_widget.js @@ -11,6 +11,7 @@ import PieceListStore from '../../stores/piece_list_store'; import Button from 'react-bootstrap/lib/Button'; import CreateEditionsButton from '../ascribe_buttons/create_editions_button'; +import AscribeSpinner from '../ascribe_spinner'; import { mergeOptions } from '../../utils/general_utils'; import { getLangText } from '../../utils/lang_utils'; @@ -75,7 +76,10 @@ let AccordionListItemEditionWidget = React.createClass({ // PLEASE FUTURE TIM, DO NOT FUCKING REMOVE IT AGAIN! if(typeof this.state.editionList[pieceId] === 'undefined') { return ( - + ); } else { return ( @@ -98,7 +102,7 @@ let AccordionListItemEditionWidget = React.createClass({ return ( @@ -112,12 +116,12 @@ let AccordionListItemEditionWidget = React.createClass({ if(piece.first_edition === null) { // user has deleted all his editions and only the piece is showing return ( - + ); } else { let editionMapping = piece && piece.first_edition ? piece.first_edition.num_editions_available + '/' + piece.num_editions : ''; @@ -125,7 +129,7 @@ let AccordionListItemEditionWidget = React.createClass({ return ( ); diff --git a/js/components/ascribe_accordion_list/accordion_list_item_piece.js b/js/components/ascribe_accordion_list/accordion_list_item_piece.js index a7f09e85..4547ce3b 100644 --- a/js/components/ascribe_accordion_list/accordion_list_item_piece.js +++ b/js/components/ascribe_accordion_list/accordion_list_item_piece.js @@ -34,28 +34,42 @@ let AccordionListItemPiece = React.createClass({ }, render() { + const { className, piece, artistName, buttons, badge, children, subsubheading } = this.props; + const { url, url_safe } = piece.thumbnail; + let thumbnail; + + // Since we're going to refactor the thumbnail generation anyway at one point, + // for not use the annoying ascribe_spiral.png, we're matching the url against + // this name and replace it with a CSS version of the new logo. + if(url.match(/https:\/\/.*\/media\/thumbnails\/ascribe_spiral.png/)) { + thumbnail = ( + + A + + ); + } else { + thumbnail = ( +
+ ); + } + return ( - - } - heading={ - -

{this.props.piece.title}

- } + className={className} + thumbnail={thumbnail} + heading={

{piece.title}

} subheading={

{getLangText('by ')} - {this.props.artistName ? this.props.artistName : this.props.piece.artist_name} + {artistName ? artistName : piece.artist_name}

} - subsubheading={this.props.subsubheading} - buttons={this.props.buttons} - badge={this.props.badge} + subsubheading={subsubheading} + buttons={buttons} + badge={badge} + linkData={this.getLinkData()} > - {this.props.children} + {children}
); } diff --git a/js/components/ascribe_app.js b/js/components/ascribe_app.js index 0c9cd703..cda5637f 100644 --- a/js/components/ascribe_app.js +++ b/js/components/ascribe_app.js @@ -23,7 +23,9 @@ let AscribeApp = React.createClass({
{/* Routes are injected here */} - {children} +
+ {children} +