Skip to content

Commit

Permalink
Merge pull request #153 from daithihearn/team-colours
Browse files Browse the repository at this point in the history
Adding team colours
  • Loading branch information
daithihearn authored Mar 2, 2023
2 parents 13b4259 + 2fc0075 commit 49cced8
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "frontend",
"version": "5.5.5",
"version": "5.5.6",
"description": "React frontend for the Cards 110",
"author": "Daithi Hearn",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"short_name": "Cards 110",
"name": "Cards 110",
"version": "5.5.5",
"version": "5.5.6",
"icons": [
{
"src": "./assets/favicon.png",
Expand All @@ -13,4 +13,4 @@
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
}
5 changes: 3 additions & 2 deletions src/components/Game/PlayerCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import { Player } from "model/Player"

interface PlayerRowI {
player: Player
className?: string
}
const PlayerCard: React.FC<PlayerRowI> = ({ player }) => {
const PlayerCard: React.FC<PlayerRowI> = ({ player, className }) => {
const round = useAppSelector(getRound)
const players = useAppSelector(getGamePlayers)
const playerProfiles = useAppSelector(getPlayerProfiles)
Expand Down Expand Up @@ -48,7 +49,7 @@ const PlayerCard: React.FC<PlayerRowI> = ({ player }) => {
<CardImg
alt={profile.name}
src={profile.picture}
className="img-center avatar"
className={`img-center avatar ${className}`}
/>
<CardImgOverlay>
<CardText className="overlay-score">
Expand Down
3 changes: 2 additions & 1 deletion src/components/Game/PlayersAndCards.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ const PlayersAndCards = () => {
md={sortedPlayers.length}
lg={sortedPlayers.length}
xl={sortedPlayers.length}>
{sortedPlayers.map(player => (
{sortedPlayers.map((player, index) => (
<PlayerCard
key={`playercard_${player.id}`}
player={player}
className={`image-team${(index % 3) + 1}-filter`}
/>
))}
</Row>
Expand Down
15 changes: 15 additions & 0 deletions src/pages/Home/_home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,21 @@
border-radius: 50%;
}

.image-team1-filter {
border: solid 4px red;
filter: saturate(2);
}

.image-team2-filter {
border: solid 4px yellow;
filter: sepia(100%);
}

.image-team3-filter {
border: solid 4px blue;
// filter: invert(100%);
}

.clickable:hover {
cursor: pointer;
}
Expand Down

0 comments on commit 49cced8

Please sign in to comment.