Added lifeform icons

This commit is contained in:
Chris Blanchard 2015-09-17 12:33:28 +01:00
parent f7bd92e32d
commit bbf277b260
9 changed files with 22 additions and 2 deletions

View file

@ -54,7 +54,8 @@ var GathererList = React.createClass({
</tr>
);
}
var members = this.memberList().map(extractGatherer);
var members = this.memberList()
.map(extractGatherer);
return (
<table className="table">
<tbody>
@ -606,6 +607,10 @@ var Gather = React.createClass({
});
var Gatherers = React.createClass({
componentDidMount() {
$('[data-toggle="tooltip"]').tooltip()
},
joinGather(e) {
e.preventDefault();
socket.emit("gather:join");
@ -672,6 +677,16 @@ var Gatherers = React.createClass({
}
}
var lifeformIcons;
if (abilities.length) {
lifeformIcons = abilities.map(function (ability) {
return <img
className="lifeform-icon"
alt={ability}
src={`/images/${ability.toLowerCase()}.png`} />
})
}
return (
<div className="panel panel-success gatherer-panel" key={gatherer.user.id} data-userid={gatherer.user.id}>
<div className="panel-heading">
@ -683,6 +698,7 @@ var Gatherers = React.createClass({
{country} {gatherer.user.username} <span className="caret"></span>
</a>
<span className="pull-right">
<span className="add-right">{lifeformIcons}</span>
{action}
</span>
</h4>

View file

@ -49,6 +49,10 @@ html, body {
/*Gather Styles*/
.lifeform-icon {
max-height: 25px;
}
.gather-voting {
font-size: 90%;
}
@ -92,7 +96,7 @@ html, body {
}
.add-right {
margin-left: 0.5em;
margin-right: 0.5em;
}
.max-width {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
public/images/fade.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

BIN
public/images/gorge.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

BIN
public/images/lerk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

BIN
public/images/onos.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

BIN
public/images/skulk.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B