brainwashed text, moved out of "beta" #17

This commit is contained in:
Daniel
2017-12-28 19:36:30 -05:00
parent 3909320cdc
commit d5e9162994
5 changed files with 37 additions and 40 deletions

File diff suppressed because one or more lines are too long

View File

@@ -19,9 +19,22 @@ export default class Creature extends React.Component {
mugic.push(<img className="icon" src={"/src/img/icons/mugic/"+(creature.gsx$tribe.toLowerCase()||"generic")+".png"} alt="MC" key={i} />);
}
// const ability = creature.gsx$ability.replace(/{{mc}}/i,
// <img className="icon" src={"/src/img/icons/mugic/"+(creature.gsx$tribe.toLowerCase()||"generic")+".png"} alt="MC" />
// );
// function test() {
// console.log( {__html:
// '<span>' + creature.gsx$ability.replace(/{{mc}}/i,
// <img className="icon" src={"/src/img/icons/mugic/"+(creature.gsx$tribe.toLowerCase()||"generic")+".png"} alt="MC" />
// ) + '</span>'
// });
// }
let brainwashed = () => {
if (creature.gsx$brainwashed) {
return (<span>
<div className="brainwashed">{creature.gsx$brainwashed}</div>
<br /></span>
);
}
}
return(
<div className="creature" style={{textAlign: 'left', display: 'flex'}}>
@@ -37,7 +50,7 @@ export default class Creature extends React.Component {
<br />
<div style={{float: 'left', width: 'calc(100% - (100px + 230px + 50px))', borderLeft: '1px solid white', paddingLeft: '10px'}} >
<span>{creature.gsx$ability}</span><br />
<span>{creature.gsx$brainwashed}</span><br />
{brainwashed()}
<span><i>{creature.gsx$flavortext}</i></span>
</div>
<br />

View File

@@ -65,12 +65,6 @@ export default class CollectionHome extends React.Component {
return (
<div className="collection">
<link rel="stylesheet" href="/src/css/collection.css" />
<p>
This page is under construction. In the meantime, you can check out&nbsp;
<a style={{textDecoration: "underline"}} href="http://www.tradecardsonline.com/im/editCollection/collection_type/1">Trade Cards Online</a>
.
</p>
<hr />
<div className="collection_left">
<div className="card_img">
<img style={{maxWidth: '250px', maxHeight: '350px'}} src={API.base_image + this.card_img} />

View File

@@ -106,11 +106,6 @@ export default class SearchForm extends React.Component {
return (
<div className="SearchForm">
<form onSubmit={this.search}>
<p>
Since not all data has been entered not all <br />cards are listed, to see incomplete cards, click
<br />
<label>"Show all cards":<input type="checkbox" ref={(input) => this.stones.allCards = input}/></label>
</p>
<br />
<label>Name: <input type="text" ref={(input) => this.stones.name = input} /></label>
<br />
@@ -190,16 +185,6 @@ export default class SearchForm extends React.Component {
let locationResults = API.cards.locations.chain();
let mugicResults = API.cards.mugic.chain();
// ignores cards without thumbnails
// TODO eventually remove
if (!this.stones.allCards.checked){
creatureResults = creatureResults.where((obj) => {return (!obj.gsx$thumb == '');});
battlegearResults = battlegearResults.where((obj) => {return (!obj.gsx$thumb == '');});
attackResults = attackResults.where((obj) => {return (!obj.gsx$thumb == '');});
locationResults = locationResults.where((obj) => {return (!obj.gsx$thumb == '');});
mugicResults = mugicResults.where((obj) => {return (!obj.gsx$thumb == '');});
}
// Search by name
if (this.stones.name.value) {
attackResults = attackResults.find({'$or': [

View File

@@ -16,3 +16,8 @@
.SearchForm {
text-align: left;
}
.brainwashed {
background-color: #dcdddf;
color: black !important;
}