mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
Add thumbnail placeholder for 23vivi
This commit is contained in:
parent
ed6b80df89
commit
3be033cdd5
@ -4,6 +4,7 @@ import React from 'react';
|
|||||||
import { Link } from 'react-router';
|
import { Link } from 'react-router';
|
||||||
|
|
||||||
import AccordionListItem from './accordion_list_item';
|
import AccordionListItem from './accordion_list_item';
|
||||||
|
import AccordionListItemThumbnailPlacholder from './accordion_list_item_thumbnail_placeholder';
|
||||||
|
|
||||||
import { getLangText } from '../../utils/lang_utils';
|
import { getLangText } from '../../utils/lang_utils';
|
||||||
|
|
||||||
@ -19,7 +20,14 @@ let AccordionListItemPiece = React.createClass({
|
|||||||
]),
|
]),
|
||||||
subsubheading: React.PropTypes.object,
|
subsubheading: React.PropTypes.object,
|
||||||
buttons: React.PropTypes.object,
|
buttons: React.PropTypes.object,
|
||||||
badge: React.PropTypes.object
|
badge: React.PropTypes.object,
|
||||||
|
thumbnailPlaceholder: React.PropTypes.element
|
||||||
|
},
|
||||||
|
|
||||||
|
getDefaultProps() {
|
||||||
|
return {
|
||||||
|
thumbnailPlaceholder: AccordionListItemThumbnailPlacholder
|
||||||
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
getLinkData() {
|
getLinkData() {
|
||||||
@ -34,7 +42,15 @@ let AccordionListItemPiece = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { className, piece, artistName, buttons, badge, children, subsubheading } = this.props;
|
const {
|
||||||
|
artistName,
|
||||||
|
badge,
|
||||||
|
buttons,
|
||||||
|
children,
|
||||||
|
className,
|
||||||
|
piece,
|
||||||
|
subsubheading,
|
||||||
|
thumbnailPlaceholder: ThumbnailPlaceholder } = this.props;
|
||||||
const { url, url_safe } = piece.thumbnail;
|
const { url, url_safe } = piece.thumbnail;
|
||||||
let thumbnail;
|
let thumbnail;
|
||||||
|
|
||||||
@ -42,11 +58,7 @@ let AccordionListItemPiece = React.createClass({
|
|||||||
// for not use the annoying ascribe_spiral.png, we're matching the url against
|
// 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.
|
// this name and replace it with a CSS version of the new logo.
|
||||||
if (url.match(/https:\/\/.*\/media\/thumbnails\/ascribe_spiral.png/)) {
|
if (url.match(/https:\/\/.*\/media\/thumbnails\/ascribe_spiral.png/)) {
|
||||||
thumbnail = (
|
thumbnail = (<ThumbnailPlaceholder />);
|
||||||
<span className="ascribe-logo-circle">
|
|
||||||
<span>A</span>
|
|
||||||
</span>
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
thumbnail = (
|
thumbnail = (
|
||||||
<div style={{backgroundImage: 'url("' + url_safe + '")'}}/>
|
<div style={{backgroundImage: 'url("' + url_safe + '")'}}/>
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
'use strict'
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
let accordionListItemThumbnailPlaceholder = React.createClass({
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<span className="ascribe-logo-circle">
|
||||||
|
<span>A</span>
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
export default accordionListItemThumbnailPlaceholder;
|
@ -31,6 +31,7 @@ let AccordionListItemWallet = React.createClass({
|
|||||||
propTypes: {
|
propTypes: {
|
||||||
className: React.PropTypes.string,
|
className: React.PropTypes.string,
|
||||||
content: React.PropTypes.object,
|
content: React.PropTypes.object,
|
||||||
|
thumbnailPlaceholder: React.PropTypes.element,
|
||||||
children: React.PropTypes.oneOfType([
|
children: React.PropTypes.oneOfType([
|
||||||
React.PropTypes.arrayOf(React.PropTypes.element),
|
React.PropTypes.arrayOf(React.PropTypes.element),
|
||||||
React.PropTypes.element
|
React.PropTypes.element
|
||||||
@ -123,32 +124,36 @@ let AccordionListItemWallet = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const { children, className, content, thumbnailPlaceholder } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AccordionListItemPiece
|
<AccordionListItemPiece
|
||||||
className={this.props.className}
|
className={className}
|
||||||
piece={this.props.content}
|
piece={content}
|
||||||
subsubheading={
|
subsubheading={
|
||||||
<div className="pull-left">
|
<div className="pull-left">
|
||||||
<span>{Moment(this.props.content.date_created, 'YYYY-MM-DD').year()}</span>
|
<span>{Moment(content.date_created, 'YYYY-MM-DD').year()}</span>
|
||||||
{this.getLicences()}
|
{this.getLicences()}
|
||||||
</div>}
|
</div>
|
||||||
|
}
|
||||||
buttons={
|
buttons={
|
||||||
<div>
|
<div>
|
||||||
<AclProxy
|
<AclProxy
|
||||||
aclObject={this.props.content.acl}
|
aclObject={content.acl}
|
||||||
aclName="acl_view_editions">
|
aclName="acl_view_editions">
|
||||||
<AccordionListItemEditionWidget
|
<AccordionListItemEditionWidget
|
||||||
className="pull-right"
|
className="pull-right"
|
||||||
piece={this.props.content}
|
piece={content}
|
||||||
toggleCreateEditionsDialog={this.toggleCreateEditionsDialog}
|
toggleCreateEditionsDialog={this.toggleCreateEditionsDialog}
|
||||||
onPollingSuccess={this.onPollingSuccess}/>
|
onPollingSuccess={this.onPollingSuccess}/>
|
||||||
</AclProxy>
|
</AclProxy>
|
||||||
</div>}
|
</div>
|
||||||
badge={this.getGlyphicon()}>
|
}
|
||||||
|
badge={this.getGlyphicon()}
|
||||||
|
thumbnailPlaceholder={thumbnailPlaceholder}>
|
||||||
{this.getCreateEditionsDialog()}
|
{this.getCreateEditionsDialog()}
|
||||||
{/* this.props.children is AccordionListItemTableEditions */}
|
{/* this.props.children is AccordionListItemTableEditions */}
|
||||||
{this.props.children}
|
{children}
|
||||||
</AccordionListItemPiece>
|
</AccordionListItemPiece>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@ let PieceList = React.createClass({
|
|||||||
canLoadPieceList: React.PropTypes.bool,
|
canLoadPieceList: React.PropTypes.bool,
|
||||||
redirectTo: React.PropTypes.string,
|
redirectTo: React.PropTypes.string,
|
||||||
customSubmitButton: React.PropTypes.element,
|
customSubmitButton: React.PropTypes.element,
|
||||||
|
customThumbnailPlaceholder: React.PropTypes.element,
|
||||||
filterParams: React.PropTypes.array,
|
filterParams: React.PropTypes.array,
|
||||||
orderParams: React.PropTypes.array,
|
orderParams: React.PropTypes.array,
|
||||||
orderBy: React.PropTypes.string,
|
orderBy: React.PropTypes.string,
|
||||||
@ -251,9 +252,15 @@ let PieceList = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const {
|
||||||
|
accordionListItemType: AccordionListItemType,
|
||||||
|
bulkModalButtonListType: BulkModalButtonListType,
|
||||||
|
customSubmitButton,
|
||||||
|
customThumbnailPlaceholder,
|
||||||
|
filterParams,
|
||||||
|
orderParams } = this.props;
|
||||||
|
|
||||||
const loadingElement = <AscribeSpinner color='dark-blue' size='lg'/>;
|
const loadingElement = <AscribeSpinner color='dark-blue' size='lg'/>;
|
||||||
const AccordionListItemType = this.props.accordionListItemType;
|
|
||||||
const BulkModalButtonListType = this.props.bulkModalButtonListType;
|
|
||||||
|
|
||||||
const selectedEditions = this.fetchSelectedEditionList();
|
const selectedEditions = this.fetchSelectedEditionList();
|
||||||
const availableAcls = getAvailableAcls(selectedEditions, (aclName) => aclName !== 'acl_view');
|
const availableAcls = getAvailableAcls(selectedEditions, (aclName) => aclName !== 'acl_view');
|
||||||
@ -265,14 +272,14 @@ let PieceList = React.createClass({
|
|||||||
className="ascribe-piece-list-toolbar"
|
className="ascribe-piece-list-toolbar"
|
||||||
searchFor={this.searchFor}
|
searchFor={this.searchFor}
|
||||||
searchQuery={this.state.search}
|
searchQuery={this.state.search}
|
||||||
filterParams={this.props.filterParams}
|
filterParams={filterParams}
|
||||||
orderParams={this.props.orderParams}
|
orderParams={orderParams}
|
||||||
filterBy={this.state.filterBy}
|
filterBy={this.state.filterBy}
|
||||||
orderBy={this.state.orderBy}
|
orderBy={this.state.orderBy}
|
||||||
applyFilterBy={this.applyFilterBy}
|
applyFilterBy={this.applyFilterBy}
|
||||||
applyOrderBy={this.applyOrderBy}>
|
applyOrderBy={this.applyOrderBy}>
|
||||||
{this.props.customSubmitButton ?
|
{customSubmitButton ?
|
||||||
this.props.customSubmitButton :
|
customSubmitButton :
|
||||||
<button className="btn btn-default btn-ascribe-add">
|
<button className="btn btn-default btn-ascribe-add">
|
||||||
<span className="icon-ascribe icon-ascribe-add" />
|
<span className="icon-ascribe icon-ascribe-add" />
|
||||||
</button>
|
</button>
|
||||||
@ -294,7 +301,7 @@ let PieceList = React.createClass({
|
|||||||
</PieceListBulkModal>
|
</PieceListBulkModal>
|
||||||
<PieceListFilterDisplay
|
<PieceListFilterDisplay
|
||||||
filterBy={this.state.filterBy}
|
filterBy={this.state.filterBy}
|
||||||
filterParams={this.props.filterParams}/>
|
filterParams={filterParams}/>
|
||||||
<AccordionList
|
<AccordionList
|
||||||
className="ascribe-accordion-list"
|
className="ascribe-accordion-list"
|
||||||
changeOrder={this.accordionChangeOrder}
|
changeOrder={this.accordionChangeOrder}
|
||||||
@ -312,6 +319,7 @@ let PieceList = React.createClass({
|
|||||||
<AccordionListItemType
|
<AccordionListItemType
|
||||||
className="col-xs-12 col-sm-10 col-md-8 col-lg-8 col-sm-offset-1 col-md-offset-2 col-lg-offset-2 ascribe-accordion-list-item"
|
className="col-xs-12 col-sm-10 col-md-8 col-lg-8 col-sm-offset-1 col-md-offset-2 col-lg-offset-2 ascribe-accordion-list-item"
|
||||||
content={piece}
|
content={piece}
|
||||||
|
thumbnailPlaceholder={customThumbnailPlaceholder}
|
||||||
key={i}>
|
key={i}>
|
||||||
<AccordionListItemTableEditions
|
<AccordionListItemTableEditions
|
||||||
className="ascribe-accordion-list-item-table col-xs-12 col-sm-10 col-md-8 col-lg-8 col-sm-offset-1 col-md-offset-2 col-lg-offset-2"
|
className="ascribe-accordion-list-item-table col-xs-12 col-sm-10 col-md-8 col-lg-8 col-sm-offset-1 col-md-offset-2 col-lg-offset-2"
|
||||||
|
@ -0,0 +1,15 @@
|
|||||||
|
'use strict'
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
let Vivi23AccordionListItemThumbnailPlaceholder = React.createClass({
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<span className="ascribe-thumbnail-placeholder">
|
||||||
|
23
|
||||||
|
</span>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
export default Vivi23AccordionListItemThumbnailPlaceholder;
|
@ -0,0 +1,24 @@
|
|||||||
|
'use strict'
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
import Vivi23AccordionListItemThumbnailPlaceholder from './23vivi_accordion_list/23vivi_accordion_list_item_thumbnail_placeholder';
|
||||||
|
|
||||||
|
import MarketPieceList from '../market/market_piece_list';
|
||||||
|
|
||||||
|
let vivi23PieceList = React.createClass({
|
||||||
|
propTypes: {
|
||||||
|
location: React.PropTypes.object
|
||||||
|
},
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<MarketPieceList
|
||||||
|
customThumbnailPlaceholder={Vivi23AccordionListItemThumbnailPlaceholder}
|
||||||
|
location={this.props.location} />
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
export default vivi23PieceList;
|
@ -17,6 +17,7 @@ import { getLangText } from '../../../../../utils/lang_utils';
|
|||||||
|
|
||||||
let MarketPieceList = React.createClass({
|
let MarketPieceList = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
|
customThumbnailPlaceholder: React.PropTypes.element,
|
||||||
location: React.PropTypes.object
|
location: React.PropTypes.object
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -49,6 +50,7 @@ let MarketPieceList = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const { customThumbnailPlaceholder, location } = this.props;
|
||||||
const { currentUser, whitelabel } = this.state;
|
const { currentUser, whitelabel } = this.state;
|
||||||
let filterParams = null;
|
let filterParams = null;
|
||||||
let canLoadPieceList = false;
|
let canLoadPieceList = false;
|
||||||
@ -72,8 +74,9 @@ let MarketPieceList = React.createClass({
|
|||||||
canLoadPieceList={canLoadPieceList}
|
canLoadPieceList={canLoadPieceList}
|
||||||
redirectTo="/register_piece?slide_num=0"
|
redirectTo="/register_piece?slide_num=0"
|
||||||
bulkModalButtonListType={MarketAclButtonList}
|
bulkModalButtonListType={MarketAclButtonList}
|
||||||
|
customThumbnailPlaceholder={customThumbnailPlaceholder}
|
||||||
filterParams={filterParams}
|
filterParams={filterParams}
|
||||||
location={this.props.location} />
|
location={location} />
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -37,6 +37,9 @@ import MarketEditionContainer from './components/market/market_detail/market_edi
|
|||||||
|
|
||||||
import LumenusLanding from './components/lumenus/lumenus_landing';
|
import LumenusLanding from './components/lumenus/lumenus_landing';
|
||||||
|
|
||||||
|
import Vivi23Landing from './components/23vivi/23vivi_landing';
|
||||||
|
import Vivi23PieceList from './components/23vivi/23vivi_piece_list';
|
||||||
|
|
||||||
import AuthProxyHandler from '../../../components/ascribe_routes/proxy_routes/auth_proxy_handler';
|
import AuthProxyHandler from '../../../components/ascribe_routes/proxy_routes/auth_proxy_handler';
|
||||||
|
|
||||||
import WalletApp from './wallet_app';
|
import WalletApp from './wallet_app';
|
||||||
@ -193,7 +196,7 @@ let ROUTES = {
|
|||||||
),
|
),
|
||||||
'23vivi': (
|
'23vivi': (
|
||||||
<Route path='/' component={WalletApp}>
|
<Route path='/' component={WalletApp}>
|
||||||
<IndexRoute component={AuthProxyHandler({to: '/collection', when: 'loggedIn'})(LumenusLanding)} />
|
<IndexRoute component={AuthProxyHandler({to: '/collection', when: 'loggedIn'})(Vivi23Landing)} />
|
||||||
<Route
|
<Route
|
||||||
path='login'
|
path='login'
|
||||||
component={AuthProxyHandler({to: '/collection', when: 'loggedIn'})(LoginContainer)} />
|
component={AuthProxyHandler({to: '/collection', when: 'loggedIn'})(LoginContainer)} />
|
||||||
@ -218,7 +221,7 @@ let ROUTES = {
|
|||||||
headerTitle='+ NEW WORK'/>
|
headerTitle='+ NEW WORK'/>
|
||||||
<Route
|
<Route
|
||||||
path='collection'
|
path='collection'
|
||||||
component={AuthProxyHandler({to: '/login', when: 'loggedOut'})(MarketPieceList)}
|
component={AuthProxyHandler({to: '/login', when: 'loggedOut'})(Vivi23PieceList)}
|
||||||
headerTitle='COLLECTION'/>
|
headerTitle='COLLECTION'/>
|
||||||
<Route path='pieces/:pieceId' component={MarketPieceContainer} />
|
<Route path='pieces/:pieceId' component={MarketPieceContainer} />
|
||||||
<Route path='editions/:editionId' component={MarketEditionContainer} />
|
<Route path='editions/:editionId' component={MarketEditionContainer} />
|
||||||
|
@ -248,25 +248,3 @@
|
|||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
padding: 4px 12px 0 10px
|
padding: 4px 12px 0 10px
|
||||||
}
|
}
|
||||||
|
|
||||||
.ascribe-logo-circle {
|
|
||||||
border: 6px solid #F6F6F6;
|
|
||||||
border-radius: 10em;
|
|
||||||
position: relative;
|
|
||||||
top: 10%;
|
|
||||||
left: 10%;
|
|
||||||
|
|
||||||
display: block;
|
|
||||||
width: 80%;
|
|
||||||
height: 80%;
|
|
||||||
|
|
||||||
> span {
|
|
||||||
color: #F6F6F6;
|
|
||||||
position: absolute;
|
|
||||||
top: -.29em;
|
|
||||||
left: .16em;
|
|
||||||
|
|
||||||
font-size: 5em;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
}
|
|
@ -60,6 +60,34 @@ $ascribe-accordion-list-item-height: 100px;
|
|||||||
background-size: cover;
|
background-size: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ascribe-logo-circle {
|
||||||
|
border: 6px solid #F6F6F6;
|
||||||
|
border-radius: 10em;
|
||||||
|
position: relative;
|
||||||
|
top: 10%;
|
||||||
|
left: 10%;
|
||||||
|
|
||||||
|
display: block;
|
||||||
|
width: 80%;
|
||||||
|
height: 80%;
|
||||||
|
|
||||||
|
> span {
|
||||||
|
color: #F6F6F6;
|
||||||
|
position: absolute;
|
||||||
|
top: -.29em;
|
||||||
|
left: .16em;
|
||||||
|
|
||||||
|
font-size: 5em;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ascribe-thumbnail-placeholder {
|
||||||
|
color: #F6F6F6;
|
||||||
|
font-size: 5em;
|
||||||
|
font-weight: normal;
|
||||||
|
}
|
||||||
|
|
||||||
//&::before {
|
//&::before {
|
||||||
// content: ' ';
|
// content: ' ';
|
||||||
// display: inline-block;
|
// display: inline-block;
|
||||||
|
Loading…
Reference in New Issue
Block a user