2020-04-01 20:57:14 +00:00
|
|
|
<template>
|
|
|
|
<li>
|
2020-04-05 17:50:33 +00:00
|
|
|
<div
|
2020-04-19 20:54:25 +00:00
|
|
|
ref="player"
|
2020-04-05 17:50:33 +00:00
|
|
|
class="player"
|
2020-05-30 22:18:31 +00:00
|
|
|
:class="[
|
|
|
|
{
|
|
|
|
dead: player.isDead,
|
|
|
|
'no-vote': player.isVoteless,
|
2020-06-03 20:25:23 +00:00
|
|
|
you: player.id === session.playerId,
|
2020-06-04 16:23:33 +00:00
|
|
|
'vote-yes': session.votes[index],
|
|
|
|
'vote-lock': voteLocked
|
2020-05-30 22:18:31 +00:00
|
|
|
},
|
|
|
|
player.role.team
|
|
|
|
]"
|
2020-04-05 17:50:33 +00:00
|
|
|
>
|
2020-04-01 20:57:14 +00:00
|
|
|
<div class="shroud" @click="toggleStatus()"></div>
|
2020-04-08 19:30:55 +00:00
|
|
|
<div class="life" @click="toggleStatus()"></div>
|
2020-04-22 21:07:25 +00:00
|
|
|
|
2020-05-02 19:33:44 +00:00
|
|
|
<div
|
|
|
|
class="night first"
|
2020-05-04 21:05:36 +00:00
|
|
|
v-if="nightOrder.get(player).first && grimoire.isNightOrder"
|
2020-05-02 19:33:44 +00:00
|
|
|
>
|
2020-05-04 21:05:36 +00:00
|
|
|
<em>{{ nightOrder.get(player).first }}.</em>
|
2020-04-25 20:56:40 +00:00
|
|
|
<span v-if="player.role.firstNightReminder">{{
|
|
|
|
player.role.firstNightReminder | handleEmojis
|
|
|
|
}}</span>
|
2020-04-22 21:07:25 +00:00
|
|
|
</div>
|
2020-05-02 19:33:44 +00:00
|
|
|
<div
|
|
|
|
class="night other"
|
2020-05-04 21:05:36 +00:00
|
|
|
v-if="nightOrder.get(player).other && grimoire.isNightOrder"
|
2020-05-02 19:33:44 +00:00
|
|
|
>
|
2020-05-04 21:05:36 +00:00
|
|
|
<em>{{ nightOrder.get(player).other }}.</em>
|
2020-04-25 20:56:40 +00:00
|
|
|
<span v-if="player.role.otherNightReminder">{{
|
|
|
|
player.role.otherNightReminder | handleEmojis
|
|
|
|
}}</span>
|
2020-04-22 21:07:25 +00:00
|
|
|
</div>
|
|
|
|
|
2020-05-30 22:18:31 +00:00
|
|
|
<Token
|
|
|
|
:role="player.role"
|
|
|
|
@set-role="$emit('trigger', ['openRoleModal'])"
|
|
|
|
/>
|
2020-04-18 18:05:45 +00:00
|
|
|
|
2020-05-30 22:18:31 +00:00
|
|
|
<!-- Overlay icons -->
|
2020-06-07 21:53:00 +00:00
|
|
|
<div class="overlay">
|
|
|
|
<font-awesome-icon
|
|
|
|
icon="skull"
|
|
|
|
class="vote"
|
|
|
|
title="Voted YES"
|
|
|
|
@click="vote()"
|
|
|
|
/>
|
|
|
|
<font-awesome-icon
|
|
|
|
icon="times"
|
|
|
|
class="vote"
|
|
|
|
title="Voted NO"
|
|
|
|
@click="vote()"
|
|
|
|
/>
|
|
|
|
<font-awesome-icon
|
|
|
|
icon="times-circle"
|
|
|
|
class="cancel"
|
|
|
|
title="Cancel"
|
|
|
|
@click="cancel()"
|
|
|
|
/>
|
|
|
|
<font-awesome-icon
|
|
|
|
icon="exchange-alt"
|
|
|
|
class="swap"
|
|
|
|
@click="swapPlayer(player)"
|
|
|
|
title="Swap seats with this player"
|
|
|
|
/>
|
|
|
|
<font-awesome-icon
|
|
|
|
icon="redo-alt"
|
|
|
|
class="move"
|
|
|
|
@click="movePlayer(player)"
|
|
|
|
title="Move player to this seat"
|
|
|
|
/>
|
|
|
|
<font-awesome-icon
|
|
|
|
icon="hand-point-right"
|
|
|
|
class="nominate"
|
|
|
|
@click="nominatePlayer(player)"
|
|
|
|
title="Nominate this player"
|
|
|
|
/>
|
|
|
|
</div>
|
2020-05-12 20:22:36 +00:00
|
|
|
|
2020-05-30 22:18:31 +00:00
|
|
|
<!-- Claimed seat icon -->
|
|
|
|
<font-awesome-icon icon="chair" v-if="player.id" class="seat" />
|
|
|
|
|
|
|
|
<!-- Ghost vote icon -->
|
2020-05-05 18:51:40 +00:00
|
|
|
<font-awesome-icon
|
|
|
|
icon="vote-yea"
|
2020-06-03 20:25:23 +00:00
|
|
|
class="has-vote"
|
2020-05-09 19:47:00 +00:00
|
|
|
v-if="player.isDead && !player.isVoteless"
|
|
|
|
@click="updatePlayer('isVoteless', true)"
|
2020-05-05 18:51:40 +00:00
|
|
|
title="Ghost vote"
|
|
|
|
/>
|
|
|
|
|
2020-05-12 20:22:36 +00:00
|
|
|
<div
|
|
|
|
class="name"
|
|
|
|
@click="isMenuOpen = !isMenuOpen"
|
|
|
|
v-bind:class="{ active: isMenuOpen }"
|
|
|
|
>
|
|
|
|
{{ player.name }}
|
2020-04-05 20:54:15 +00:00
|
|
|
</div>
|
2020-05-12 20:22:36 +00:00
|
|
|
|
|
|
|
<transition name="fold">
|
2020-05-30 20:47:42 +00:00
|
|
|
<ul class="menu" v-if="isMenuOpen">
|
|
|
|
<template v-if="!session.isSpectator">
|
|
|
|
<li @click="changeName">
|
|
|
|
<font-awesome-icon icon="user-edit" />Rename
|
|
|
|
</li>
|
2020-05-31 21:42:08 +00:00
|
|
|
<li v-if="!session.nomination" @click="nominatePlayer()">
|
2020-05-30 20:47:42 +00:00
|
|
|
<font-awesome-icon icon="hand-point-right" />
|
|
|
|
Nomination
|
2020-05-31 21:42:08 +00:00
|
|
|
</li>
|
2020-05-30 20:47:42 +00:00
|
|
|
<li @click="movePlayer()">
|
|
|
|
<font-awesome-icon icon="redo-alt" />
|
|
|
|
Move player
|
|
|
|
</li>
|
|
|
|
<li @click="swapPlayer()">
|
|
|
|
<font-awesome-icon icon="exchange-alt" />
|
|
|
|
Swap seats
|
|
|
|
</li>
|
|
|
|
<li @click="takeScreenshot">
|
|
|
|
<font-awesome-icon icon="camera" />
|
|
|
|
Screenshot
|
|
|
|
</li>
|
2020-05-30 22:18:31 +00:00
|
|
|
<li @click="$emit('trigger', ['removePlayer'])">
|
2020-05-30 20:47:42 +00:00
|
|
|
<font-awesome-icon icon="times-circle" />
|
|
|
|
Remove
|
|
|
|
</li>
|
|
|
|
</template>
|
|
|
|
<li @click="claimSeat" v-if="session.isSpectator">
|
2020-05-30 22:18:31 +00:00
|
|
|
<font-awesome-icon icon="chair" />
|
|
|
|
<template v-if="player.id !== session.playerId">
|
|
|
|
Claim seat
|
|
|
|
</template>
|
|
|
|
<template v-else> Vacate seat </template>
|
2020-05-12 20:22:36 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</transition>
|
2020-04-01 20:57:14 +00:00
|
|
|
</div>
|
2020-05-12 20:22:36 +00:00
|
|
|
|
2020-04-05 17:50:33 +00:00
|
|
|
<template v-if="player.reminders">
|
|
|
|
<div
|
|
|
|
class="reminder"
|
|
|
|
v-bind:key="reminder.role + ' ' + reminder.name"
|
|
|
|
v-for="reminder in player.reminders"
|
|
|
|
v-bind:class="[reminder.role]"
|
|
|
|
@click="removeReminder(reminder)"
|
|
|
|
>
|
2020-04-26 18:11:29 +00:00
|
|
|
<span
|
|
|
|
class="icon"
|
|
|
|
v-bind:style="{
|
|
|
|
backgroundImage: `url(${require('../assets/icons/' +
|
|
|
|
reminder.role +
|
|
|
|
'.png')})`
|
|
|
|
}"
|
|
|
|
></span>
|
2020-06-07 21:43:26 +00:00
|
|
|
<span class="text">{{ reminder.name }}</span>
|
2020-04-05 17:50:33 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
2020-05-30 22:18:31 +00:00
|
|
|
<div class="reminder add" @click="$emit('trigger', ['openReminderModal'])">
|
2020-04-26 18:11:29 +00:00
|
|
|
<span class="icon"></span>
|
|
|
|
</div>
|
2020-04-01 20:57:14 +00:00
|
|
|
</li>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-04-15 20:40:58 +00:00
|
|
|
import Token from "./Token";
|
2020-05-04 21:05:36 +00:00
|
|
|
import { mapGetters, mapState } from "vuex";
|
2020-04-15 20:40:58 +00:00
|
|
|
|
2020-04-05 17:50:33 +00:00
|
|
|
export default {
|
2020-04-15 20:40:58 +00:00
|
|
|
components: {
|
|
|
|
Token
|
|
|
|
},
|
2020-04-05 17:50:33 +00:00
|
|
|
props: {
|
|
|
|
player: {
|
|
|
|
type: Object,
|
|
|
|
required: true
|
|
|
|
}
|
|
|
|
},
|
2020-05-04 21:05:36 +00:00
|
|
|
computed: {
|
2020-06-04 16:23:33 +00:00
|
|
|
...mapState("players", ["players"]),
|
|
|
|
...mapState(["grimoire", "session"]),
|
|
|
|
...mapGetters({ nightOrder: "players/nightOrder" }),
|
2020-06-03 20:25:23 +00:00
|
|
|
index: function() {
|
2020-06-04 16:23:33 +00:00
|
|
|
return this.players.indexOf(this.player);
|
2020-06-03 20:25:23 +00:00
|
|
|
},
|
2020-06-04 16:23:33 +00:00
|
|
|
voteLocked: function() {
|
|
|
|
const session = this.session;
|
|
|
|
const players = this.players.length;
|
|
|
|
if (!session.nomination) return false;
|
|
|
|
const indexAdjusted =
|
|
|
|
(this.index - 1 + players - session.nomination[1]) % players;
|
|
|
|
return indexAdjusted < session.lockedVote - 1;
|
|
|
|
}
|
2020-05-04 21:05:36 +00:00
|
|
|
},
|
2020-04-05 17:50:33 +00:00
|
|
|
data() {
|
2020-05-12 20:22:36 +00:00
|
|
|
return {
|
|
|
|
isMenuOpen: false,
|
|
|
|
isSwap: false
|
|
|
|
};
|
2020-04-05 17:50:33 +00:00
|
|
|
},
|
2020-04-25 20:19:47 +00:00
|
|
|
filters: {
|
|
|
|
handleEmojis: text => text.replace(/:([^: ]+?):/g, "").replace(/ •/g, "\n•")
|
|
|
|
},
|
2020-04-05 17:50:33 +00:00
|
|
|
methods: {
|
2020-04-19 20:54:25 +00:00
|
|
|
takeScreenshot() {
|
|
|
|
const { width, height, x, y } = this.$refs.player.getBoundingClientRect();
|
2020-04-25 17:25:32 +00:00
|
|
|
this.$emit("screenshot", { width, height, x, y });
|
2020-05-12 20:22:36 +00:00
|
|
|
this.isMenuOpen = false;
|
2020-04-19 20:54:25 +00:00
|
|
|
},
|
2020-04-05 17:50:33 +00:00
|
|
|
toggleStatus() {
|
2020-05-03 21:05:17 +00:00
|
|
|
if (this.grimoire.isPublic) {
|
2020-05-09 19:47:00 +00:00
|
|
|
if (!this.player.isDead) {
|
|
|
|
this.updatePlayer("isDead", true);
|
|
|
|
} else if (this.player.isVoteless) {
|
|
|
|
this.updatePlayer("isVoteless", false);
|
|
|
|
this.updatePlayer("isDead", false);
|
2020-04-08 19:30:55 +00:00
|
|
|
} else {
|
2020-05-09 19:47:00 +00:00
|
|
|
this.updatePlayer("isVoteless", true);
|
2020-04-01 20:57:14 +00:00
|
|
|
}
|
2020-04-05 17:50:33 +00:00
|
|
|
} else {
|
2020-05-09 19:47:00 +00:00
|
|
|
this.updatePlayer("isDead", !this.player.isDead);
|
|
|
|
if (this.player.isVoteless) {
|
|
|
|
this.updatePlayer("isVoteless", false);
|
|
|
|
}
|
2020-04-05 17:50:33 +00:00
|
|
|
}
|
|
|
|
},
|
2020-04-05 19:50:06 +00:00
|
|
|
changeName() {
|
2020-05-12 18:48:00 +00:00
|
|
|
if (this.session.isSpectator) return;
|
2020-05-04 21:05:36 +00:00
|
|
|
const name = prompt("Player name", this.player.name) || this.player.name;
|
|
|
|
this.updatePlayer("name", name);
|
2020-05-12 20:22:36 +00:00
|
|
|
this.isMenuOpen = false;
|
2020-04-05 19:50:06 +00:00
|
|
|
},
|
2020-04-05 17:50:33 +00:00
|
|
|
removeReminder(reminder) {
|
2020-05-04 21:05:36 +00:00
|
|
|
const reminders = [...this.player.reminders];
|
|
|
|
reminders.splice(this.player.reminders.indexOf(reminder), 1);
|
|
|
|
this.updatePlayer("reminders", reminders);
|
2020-06-07 21:43:26 +00:00
|
|
|
this.isMenuOpen = false;
|
2020-05-04 21:05:36 +00:00
|
|
|
},
|
|
|
|
updatePlayer(property, value) {
|
2020-05-12 18:48:00 +00:00
|
|
|
if (this.session.isSpectator && property !== "reminders") return;
|
2020-05-04 21:05:36 +00:00
|
|
|
this.$store.commit("players/update", {
|
|
|
|
player: this.player,
|
|
|
|
property,
|
|
|
|
value
|
|
|
|
});
|
2020-05-12 20:22:36 +00:00
|
|
|
},
|
2020-05-19 13:19:19 +00:00
|
|
|
swapPlayer(player) {
|
|
|
|
this.isMenuOpen = false;
|
2020-05-30 22:18:31 +00:00
|
|
|
this.$emit("trigger", ["swapPlayer", player]);
|
2020-05-19 13:19:19 +00:00
|
|
|
},
|
|
|
|
movePlayer(player) {
|
2020-05-12 20:22:36 +00:00
|
|
|
this.isMenuOpen = false;
|
2020-05-30 22:18:31 +00:00
|
|
|
this.$emit("trigger", ["movePlayer", player]);
|
2020-05-12 20:22:36 +00:00
|
|
|
},
|
2020-05-31 21:42:08 +00:00
|
|
|
nominatePlayer(player) {
|
|
|
|
this.isMenuOpen = false;
|
|
|
|
this.$emit("trigger", ["nominatePlayer", player]);
|
|
|
|
},
|
2020-05-19 13:19:19 +00:00
|
|
|
cancel() {
|
2020-05-30 22:18:31 +00:00
|
|
|
this.$emit("trigger", ["cancel"]);
|
|
|
|
},
|
|
|
|
claimSeat() {
|
|
|
|
this.isMenuOpen = false;
|
|
|
|
this.$emit("trigger", ["claimSeat"]);
|
2020-06-03 20:25:23 +00:00
|
|
|
},
|
|
|
|
vote() {
|
|
|
|
if (this.player.id !== this.session.playerId) return;
|
|
|
|
this.$store.commit("session/vote", [this.index]);
|
2020-04-01 20:57:14 +00:00
|
|
|
}
|
|
|
|
}
|
2020-04-05 17:50:33 +00:00
|
|
|
};
|
2020-04-01 20:57:14 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
2020-04-05 19:50:06 +00:00
|
|
|
@import "../vars.scss";
|
2020-04-01 20:57:14 +00:00
|
|
|
|
2020-05-12 20:22:36 +00:00
|
|
|
.fold-enter-active,
|
|
|
|
.fold-leave-active {
|
|
|
|
transition: transform 250ms ease-in-out;
|
|
|
|
transform-origin: left center;
|
|
|
|
transform: perspective(200px);
|
|
|
|
}
|
|
|
|
.fold-enter,
|
|
|
|
.fold-leave-to {
|
|
|
|
transform: perspective(200px) rotateY(90deg);
|
|
|
|
}
|
|
|
|
|
2020-04-05 17:50:33 +00:00
|
|
|
/***** Player token *****/
|
|
|
|
.circle .player {
|
|
|
|
margin-bottom: 10px;
|
2020-04-28 20:22:28 +00:00
|
|
|
padding-bottom: 5px;
|
2020-04-01 20:57:14 +00:00
|
|
|
|
2020-06-07 21:43:26 +00:00
|
|
|
&:before {
|
|
|
|
content: " ";
|
|
|
|
display: block;
|
|
|
|
padding-top: 100%;
|
|
|
|
}
|
|
|
|
|
2020-04-05 17:50:33 +00:00
|
|
|
.shroud {
|
2020-04-10 09:21:27 +00:00
|
|
|
top: 0;
|
|
|
|
left: 0;
|
2020-04-05 17:50:33 +00:00
|
|
|
position: absolute;
|
2020-04-10 09:21:27 +00:00
|
|
|
width: 100%;
|
2020-06-07 21:43:26 +00:00
|
|
|
height: 45%;
|
2020-04-05 17:50:33 +00:00
|
|
|
cursor: pointer;
|
2020-04-10 09:21:27 +00:00
|
|
|
transform: rotateX(0deg);
|
2020-04-08 19:30:55 +00:00
|
|
|
transform-origin: top center;
|
2020-04-10 09:21:27 +00:00
|
|
|
transition: transform 200ms ease-in-out;
|
2020-04-05 17:50:33 +00:00
|
|
|
z-index: 2;
|
2020-04-18 19:03:58 +00:00
|
|
|
filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.8));
|
2020-04-10 09:21:27 +00:00
|
|
|
|
|
|
|
&:before {
|
|
|
|
content: " ";
|
|
|
|
background: url("../assets/shroud.png") center -10px no-repeat;
|
2020-06-07 21:43:26 +00:00
|
|
|
background-size: auto 110%;
|
2020-04-10 09:21:27 +00:00
|
|
|
position: absolute;
|
2020-06-07 21:43:26 +00:00
|
|
|
margin-left: -50%;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2020-04-10 09:21:27 +00:00
|
|
|
left: 50%;
|
2020-06-07 21:43:26 +00:00
|
|
|
top: -30%;
|
2020-04-10 09:21:27 +00:00
|
|
|
opacity: 0;
|
|
|
|
transform: perspective(400px) scale(1.5);
|
|
|
|
transform-origin: top center;
|
|
|
|
transition: all 200ms ease-in-out;
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
2020-05-15 21:36:45 +00:00
|
|
|
#townsquare.spectator & {
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
2020-05-09 19:47:00 +00:00
|
|
|
#townsquare:not(.spectator) &:hover:before {
|
2020-04-05 17:50:33 +00:00
|
|
|
opacity: 0.5;
|
|
|
|
top: -10px;
|
2020-04-04 15:25:11 +00:00
|
|
|
transform: scale(1);
|
|
|
|
}
|
2020-04-01 20:57:14 +00:00
|
|
|
}
|
|
|
|
|
2020-04-10 09:21:27 +00:00
|
|
|
&.dead .shroud:before {
|
2020-04-05 17:50:33 +00:00
|
|
|
opacity: 1;
|
|
|
|
top: 0;
|
2020-04-08 19:30:55 +00:00
|
|
|
transform: perspective(400px) scale(1);
|
2020-04-01 20:57:14 +00:00
|
|
|
}
|
2020-04-05 17:50:33 +00:00
|
|
|
}
|
2020-04-01 20:57:14 +00:00
|
|
|
|
2020-04-08 19:30:55 +00:00
|
|
|
/****** Life token *******/
|
2020-04-10 09:21:27 +00:00
|
|
|
.player {
|
2020-04-25 20:19:47 +00:00
|
|
|
z-index: 2;
|
2020-04-08 19:30:55 +00:00
|
|
|
.life {
|
2020-04-10 09:21:27 +00:00
|
|
|
border-radius: 50%;
|
2020-06-07 21:43:26 +00:00
|
|
|
width: 100%;
|
2020-04-10 09:21:27 +00:00
|
|
|
background: url("../assets/life.png") center center;
|
|
|
|
background-size: 100%;
|
|
|
|
border: 3px solid black;
|
|
|
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
|
|
|
|
cursor: pointer;
|
|
|
|
transition: transform 200ms ease-in-out;
|
|
|
|
transform: perspective(400px) rotateY(180deg);
|
|
|
|
backface-visibility: hidden;
|
|
|
|
position: absolute;
|
2020-06-07 21:43:26 +00:00
|
|
|
left: 0;
|
2020-04-10 09:21:27 +00:00
|
|
|
top: 0;
|
2020-06-07 21:43:26 +00:00
|
|
|
|
|
|
|
&:before {
|
|
|
|
content: " ";
|
|
|
|
display: block;
|
|
|
|
padding-top: 100%;
|
|
|
|
}
|
2020-04-05 17:50:33 +00:00
|
|
|
}
|
|
|
|
|
2020-04-08 19:30:55 +00:00
|
|
|
&.dead {
|
|
|
|
&.no-vote .life:after {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.life {
|
|
|
|
background-image: url("../assets/death.png");
|
|
|
|
|
|
|
|
&:after {
|
|
|
|
content: " ";
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
width: 100%;
|
|
|
|
background: url("../assets/vote.png") center center no-repeat;
|
|
|
|
background-size: 50%;
|
2020-06-07 21:43:26 +00:00
|
|
|
height: 100%;
|
2020-04-08 19:30:55 +00:00
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2020-04-15 15:30:26 +00:00
|
|
|
|
|
|
|
&.traveler .life {
|
|
|
|
filter: grayscale(100%);
|
|
|
|
}
|
2020-04-05 17:50:33 +00:00
|
|
|
}
|
|
|
|
|
2020-04-10 09:21:27 +00:00
|
|
|
#townsquare.public .player {
|
|
|
|
.shroud {
|
|
|
|
transform: perspective(400px) rotateX(90deg);
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
.life {
|
|
|
|
transform: perspective(400px) rotateY(0deg);
|
|
|
|
}
|
2020-05-05 18:38:56 +00:00
|
|
|
|
|
|
|
&.traveler:not(.dead) .token {
|
|
|
|
transform: perspective(400px) scale(0.8);
|
|
|
|
pointer-events: none;
|
|
|
|
transition-delay: 0s;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.traveler.dead .token {
|
|
|
|
transition-delay: 0s;
|
|
|
|
}
|
2020-04-10 09:21:27 +00:00
|
|
|
}
|
|
|
|
|
2020-04-05 17:50:33 +00:00
|
|
|
/***** Role token ******/
|
2020-04-15 20:40:58 +00:00
|
|
|
.player .token {
|
|
|
|
position: absolute;
|
2020-04-22 19:21:54 +00:00
|
|
|
left: 0;
|
2020-04-15 20:40:58 +00:00
|
|
|
top: 0;
|
2020-06-07 21:43:26 +00:00
|
|
|
width: 100%;
|
2020-04-08 19:30:55 +00:00
|
|
|
transition: transform 200ms ease-in-out;
|
|
|
|
transform: perspective(400px) rotateY(0deg);
|
|
|
|
backface-visibility: hidden;
|
2020-04-05 17:50:33 +00:00
|
|
|
}
|
2020-04-01 20:57:14 +00:00
|
|
|
|
2020-04-15 20:40:58 +00:00
|
|
|
#townsquare.public .circle .token {
|
2020-04-08 19:30:55 +00:00
|
|
|
transform: perspective(400px) rotateY(-180deg);
|
2020-04-05 17:50:33 +00:00
|
|
|
}
|
2020-04-01 20:57:14 +00:00
|
|
|
|
2020-05-12 20:22:36 +00:00
|
|
|
/****** Player choice icons *******/
|
2020-06-07 21:53:00 +00:00
|
|
|
.player .overlay {
|
|
|
|
width: 100%;
|
|
|
|
position: absolute;
|
|
|
|
pointer-events: none;
|
|
|
|
top: 0;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
&:after {
|
|
|
|
content: " ";
|
|
|
|
display: block;
|
|
|
|
padding-top: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.player .overlay svg {
|
2020-05-12 20:22:36 +00:00
|
|
|
position: absolute;
|
|
|
|
filter: drop-shadow(0 0 3px black);
|
|
|
|
z-index: 2;
|
|
|
|
cursor: pointer;
|
|
|
|
&.swap,
|
2020-05-19 13:19:19 +00:00
|
|
|
&.move,
|
2020-05-31 21:42:08 +00:00
|
|
|
&.nominate,
|
2020-06-03 20:25:23 +00:00
|
|
|
&.vote,
|
2020-05-12 20:22:36 +00:00
|
|
|
&.cancel {
|
2020-06-04 16:23:33 +00:00
|
|
|
width: 50%;
|
2020-05-12 20:22:36 +00:00
|
|
|
height: 60%;
|
|
|
|
opacity: 0;
|
|
|
|
pointer-events: none;
|
|
|
|
transition: all 250ms;
|
|
|
|
transform: scale(0.2);
|
2020-06-04 16:23:33 +00:00
|
|
|
* {
|
|
|
|
stroke-width: 10px;
|
|
|
|
stroke: white;
|
|
|
|
fill: url(#default);
|
|
|
|
}
|
|
|
|
&:hover *,
|
|
|
|
&.fa-skull * {
|
|
|
|
fill: url(#demon);
|
|
|
|
}
|
|
|
|
&.fa-times * {
|
|
|
|
fill: url(#townsfolk);
|
2020-05-12 20:22:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-07 21:53:00 +00:00
|
|
|
#townsquare.vote .player.vote-yes .overlay svg.vote.fa-skull {
|
2020-06-03 20:25:23 +00:00
|
|
|
opacity: 0.5;
|
|
|
|
transform: scale(1);
|
|
|
|
}
|
|
|
|
|
2020-06-07 21:53:00 +00:00
|
|
|
#townsquare.vote .player.you.vote-yes .overlay svg.vote.fa-skull,
|
|
|
|
#townsquare.vote .player.vote-lock.vote-yes .overlay svg.vote.fa-skull,
|
|
|
|
#townsquare.vote .player.vote-lock:not(.vote-yes) .overlay svg.vote.fa-times {
|
2020-06-03 20:25:23 +00:00
|
|
|
opacity: 1;
|
|
|
|
transform: scale(1);
|
|
|
|
}
|
|
|
|
|
2020-06-07 21:53:00 +00:00
|
|
|
li.from:not(.nominate) .player .overlay svg.cancel {
|
2020-05-12 20:22:36 +00:00
|
|
|
opacity: 1;
|
|
|
|
transform: scale(1);
|
|
|
|
pointer-events: all;
|
|
|
|
}
|
|
|
|
|
2020-06-07 21:53:00 +00:00
|
|
|
li.swap:not(.from) .player .overlay svg.swap,
|
|
|
|
li.nominate .player .overlay svg.nominate,
|
|
|
|
li.move:not(.from) .player .overlay svg.move {
|
2020-05-12 20:22:36 +00:00
|
|
|
opacity: 1;
|
|
|
|
transform: scale(1);
|
|
|
|
pointer-events: all;
|
|
|
|
}
|
|
|
|
|
2020-05-05 18:51:40 +00:00
|
|
|
/****** Vote icon ********/
|
2020-06-03 20:25:23 +00:00
|
|
|
.player .has-vote {
|
2020-05-05 18:51:40 +00:00
|
|
|
position: absolute;
|
|
|
|
right: 2px;
|
|
|
|
bottom: 45px;
|
|
|
|
color: #fff;
|
|
|
|
filter: drop-shadow(0 0 3px black);
|
2020-05-05 19:01:18 +00:00
|
|
|
transition: opacity 250ms;
|
2020-05-05 18:51:40 +00:00
|
|
|
|
|
|
|
#townsquare.public & {
|
2020-05-05 19:01:18 +00:00
|
|
|
opacity: 0;
|
|
|
|
pointer-events: none;
|
2020-05-05 18:51:40 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-05-30 22:18:31 +00:00
|
|
|
@mixin glow($name, $color) {
|
|
|
|
@keyframes #{$name}-glow {
|
|
|
|
0% {
|
|
|
|
box-shadow: 0 0 rgba($color, 1);
|
|
|
|
border-color: $color;
|
|
|
|
}
|
|
|
|
50% {
|
|
|
|
border-color: black;
|
|
|
|
}
|
|
|
|
100% {
|
|
|
|
box-shadow: 0 0 20px 16px transparent;
|
|
|
|
border-color: $color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.player.you.#{$name} .token {
|
|
|
|
animation: #{$name}-glow 2s ease-in-out infinite;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@include glow("townsfolk", $townsfolk);
|
|
|
|
@include glow("outsider", $outsider);
|
|
|
|
@include glow("demon", $demon);
|
|
|
|
@include glow("minion", $minion);
|
|
|
|
@include glow("traveler", $traveler);
|
|
|
|
|
|
|
|
.player.you .token {
|
|
|
|
animation: townsfolk-glow 2s ease-in-out infinite;
|
|
|
|
}
|
|
|
|
|
|
|
|
/****** Seat icon ********/
|
|
|
|
.player .seat {
|
|
|
|
position: absolute;
|
|
|
|
left: 2px;
|
|
|
|
bottom: 45px;
|
|
|
|
color: #fff;
|
|
|
|
filter: drop-shadow(0 0 3px black);
|
|
|
|
cursor: default;
|
|
|
|
}
|
|
|
|
|
|
|
|
.player.you .seat {
|
|
|
|
color: $townsfolk;
|
|
|
|
}
|
|
|
|
|
2020-04-05 17:50:33 +00:00
|
|
|
/***** Player name *****/
|
2020-04-18 18:05:45 +00:00
|
|
|
.player > .name {
|
2020-04-05 17:50:33 +00:00
|
|
|
font-size: 120%;
|
|
|
|
line-height: 120%;
|
2020-04-05 19:50:06 +00:00
|
|
|
cursor: pointer;
|
2020-04-19 20:54:25 +00:00
|
|
|
white-space: nowrap;
|
2020-04-22 19:21:54 +00:00
|
|
|
width: 100%;
|
2020-04-28 19:29:48 +00:00
|
|
|
background: rgba(0, 0, 0, 0.5);
|
|
|
|
border: 3px solid black;
|
|
|
|
border-radius: 10px;
|
|
|
|
top: 5px;
|
|
|
|
box-shadow: 0 0 5px black;
|
2020-05-12 20:22:36 +00:00
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
2020-05-12 20:39:56 +00:00
|
|
|
padding: 0 4px;
|
2020-04-22 19:21:54 +00:00
|
|
|
|
2020-05-12 20:22:36 +00:00
|
|
|
#townsquare:not(.spectator) &:hover,
|
|
|
|
&.active {
|
2020-04-18 19:47:13 +00:00
|
|
|
color: red;
|
2020-04-05 20:54:15 +00:00
|
|
|
}
|
2020-04-05 17:50:33 +00:00
|
|
|
}
|
|
|
|
|
2020-04-22 19:21:54 +00:00
|
|
|
.player.dead > .name {
|
|
|
|
opacity: 0.5;
|
|
|
|
}
|
|
|
|
|
2020-05-12 20:22:36 +00:00
|
|
|
/***** Player menu *****/
|
|
|
|
.player > .menu {
|
|
|
|
position: absolute;
|
|
|
|
left: 100%;
|
|
|
|
bottom: 0;
|
|
|
|
text-align: left;
|
|
|
|
white-space: nowrap;
|
|
|
|
background: rgba(0, 0, 0, 0.5);
|
2020-05-12 20:39:56 +00:00
|
|
|
padding: 2px 5px;
|
|
|
|
border-radius: 10px;
|
|
|
|
border: 3px solid #000;
|
2020-05-12 20:22:36 +00:00
|
|
|
margin-left: 15px;
|
|
|
|
cursor: pointer;
|
2020-05-12 20:39:56 +00:00
|
|
|
box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
|
2020-05-12 20:22:36 +00:00
|
|
|
|
|
|
|
&:before {
|
|
|
|
content: " ";
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
position: absolute;
|
|
|
|
border: 10px solid transparent;
|
|
|
|
border-right-color: black;
|
|
|
|
right: 100%;
|
|
|
|
bottom: 7px;
|
|
|
|
margin-right: 2px;
|
|
|
|
}
|
|
|
|
|
|
|
|
li:hover {
|
|
|
|
color: red;
|
|
|
|
}
|
|
|
|
svg {
|
|
|
|
margin-right: 2px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-04-05 17:50:33 +00:00
|
|
|
/***** Ability text *****/
|
|
|
|
#townsquare.public .ability {
|
|
|
|
display: none;
|
|
|
|
}
|
2020-05-12 20:22:36 +00:00
|
|
|
.circle .player .shroud:hover ~ .token .ability,
|
|
|
|
.circle .player .token:hover .ability {
|
2020-04-18 18:21:26 +00:00
|
|
|
opacity: 1;
|
2020-04-05 17:50:33 +00:00
|
|
|
}
|
2020-04-02 20:23:40 +00:00
|
|
|
|
2020-04-22 21:07:25 +00:00
|
|
|
/**** Night reminders ****/
|
|
|
|
.player .night {
|
|
|
|
position: absolute;
|
2020-04-25 20:19:47 +00:00
|
|
|
height: 100%;
|
2020-04-22 21:07:25 +00:00
|
|
|
width: 100%;
|
|
|
|
z-index: 2;
|
|
|
|
cursor: pointer;
|
|
|
|
opacity: 1;
|
|
|
|
transition: opacity 200ms;
|
2020-04-25 20:19:47 +00:00
|
|
|
display: flex;
|
2020-05-12 20:22:36 +00:00
|
|
|
top: -20px;
|
2020-04-25 20:19:47 +00:00
|
|
|
align-items: center;
|
|
|
|
pointer-events: none;
|
2020-04-22 21:07:25 +00:00
|
|
|
|
|
|
|
#townsquare.public & {
|
|
|
|
opacity: 0;
|
|
|
|
pointer-events: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:hover ~ .token .ability {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
|
2020-04-25 20:19:47 +00:00
|
|
|
span {
|
|
|
|
display: flex;
|
|
|
|
position: absolute;
|
|
|
|
padding: 5px 10px 5px 30px;
|
|
|
|
width: 350px;
|
|
|
|
z-index: 25;
|
|
|
|
font-size: 70%;
|
|
|
|
background: rgba(0, 0, 0, 0.5);
|
|
|
|
border-radius: 10px;
|
|
|
|
border: 3px solid black;
|
|
|
|
filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.5));
|
|
|
|
text-align: left;
|
|
|
|
align-items: center;
|
|
|
|
opacity: 0;
|
|
|
|
transition: opacity 200ms ease-in-out;
|
|
|
|
|
|
|
|
&:before {
|
|
|
|
transform: rotate(-90deg);
|
|
|
|
transform-origin: center top;
|
|
|
|
left: -98px;
|
|
|
|
top: 50%;
|
|
|
|
font-size: 100%;
|
|
|
|
position: absolute;
|
|
|
|
font-weight: bold;
|
|
|
|
text-align: center;
|
|
|
|
width: 200px;
|
|
|
|
}
|
|
|
|
|
|
|
|
&:after {
|
|
|
|
content: " ";
|
|
|
|
border: 10px solid transparent;
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
position: absolute;
|
|
|
|
}
|
2020-04-22 21:07:25 +00:00
|
|
|
}
|
|
|
|
|
2020-04-25 20:19:47 +00:00
|
|
|
&.first span {
|
|
|
|
right: 120%;
|
2020-04-22 21:07:25 +00:00
|
|
|
background: linear-gradient(
|
2020-04-25 20:19:47 +00:00
|
|
|
to right,
|
|
|
|
$townsfolk 0%,
|
|
|
|
rgba(0, 0, 0, 0.5) 20%
|
2020-04-22 21:07:25 +00:00
|
|
|
);
|
2020-04-25 20:19:47 +00:00
|
|
|
&:before {
|
|
|
|
content: "First Night";
|
|
|
|
}
|
|
|
|
&:after {
|
|
|
|
border-left-color: $townsfolk;
|
|
|
|
margin-left: 3px;
|
|
|
|
left: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
&.other span {
|
|
|
|
left: 120%;
|
|
|
|
background: linear-gradient(to right, $demon 0%, rgba(0, 0, 0, 0.5) 20%);
|
|
|
|
&:before {
|
|
|
|
content: "Other Nights";
|
|
|
|
}
|
|
|
|
&:after {
|
|
|
|
right: 100%;
|
|
|
|
margin-right: 3px;
|
|
|
|
border-right-color: $demon;
|
|
|
|
}
|
2020-04-22 21:07:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
em {
|
|
|
|
font-style: normal;
|
|
|
|
position: absolute;
|
|
|
|
width: 40px;
|
|
|
|
height: 40px;
|
|
|
|
text-align: center;
|
|
|
|
line-height: 37px;
|
|
|
|
border-radius: 50%;
|
|
|
|
border: 3px solid black;
|
|
|
|
filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.5));
|
|
|
|
font-weight: bold;
|
|
|
|
opacity: 1;
|
2020-04-25 20:19:47 +00:00
|
|
|
pointer-events: all;
|
2020-04-22 21:07:25 +00:00
|
|
|
transition: opacity 200ms;
|
|
|
|
}
|
|
|
|
|
2020-04-25 20:19:47 +00:00
|
|
|
&.first em {
|
|
|
|
left: -15px;
|
|
|
|
background: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, $townsfolk 100%);
|
|
|
|
}
|
|
|
|
|
|
|
|
&.other em {
|
|
|
|
right: -15px;
|
|
|
|
background: linear-gradient(180deg, rgba(0, 0, 0, 1) 0%, $demon 100%);
|
|
|
|
}
|
|
|
|
|
|
|
|
em:hover + span {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
|
|
|
|
2020-04-22 21:07:25 +00:00
|
|
|
#app.screenshot & {
|
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.player.dead .night em {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
|
2020-04-05 17:50:33 +00:00
|
|
|
/***** Reminder token *****/
|
|
|
|
.circle .reminder {
|
|
|
|
background: url("../assets/reminder.png") center center;
|
|
|
|
background-size: 100%;
|
2020-06-07 21:43:26 +00:00
|
|
|
width: 50%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
margin: 5px 0 0 -25%;
|
2020-04-05 17:50:33 +00:00
|
|
|
border-radius: 50%;
|
|
|
|
border: 3px solid black;
|
|
|
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
|
|
|
|
transition: all 200ms;
|
|
|
|
cursor: pointer;
|
2020-06-07 21:43:26 +00:00
|
|
|
&:before {
|
|
|
|
content: " ";
|
|
|
|
display: block;
|
|
|
|
padding-top: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.text {
|
|
|
|
line-height: 90%;
|
|
|
|
color: black;
|
|
|
|
font-size: 45%;
|
|
|
|
font-weight: bold;
|
|
|
|
position: absolute;
|
|
|
|
width: 90%;
|
|
|
|
text-align: center;
|
|
|
|
margin-top: 25%;
|
|
|
|
}
|
2020-04-05 17:50:33 +00:00
|
|
|
|
2020-04-26 18:11:29 +00:00
|
|
|
.icon,
|
2020-04-05 17:50:33 +00:00
|
|
|
&:after {
|
|
|
|
content: " ";
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
2020-04-01 20:57:14 +00:00
|
|
|
background-size: 100%;
|
2020-04-05 17:50:33 +00:00
|
|
|
background-position: center 0;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
background-image: url("../assets/icons/plus.png");
|
|
|
|
transition: opacity 200ms;
|
|
|
|
}
|
2020-04-01 20:57:14 +00:00
|
|
|
|
2020-04-05 17:50:33 +00:00
|
|
|
&:after {
|
|
|
|
background-image: url("../assets/icons/x.png");
|
|
|
|
opacity: 0;
|
|
|
|
}
|
2020-04-01 20:57:14 +00:00
|
|
|
|
2020-04-05 17:50:33 +00:00
|
|
|
&.add {
|
|
|
|
opacity: 0;
|
|
|
|
top: 30px;
|
2020-04-01 20:57:14 +00:00
|
|
|
&:after {
|
2020-04-05 17:50:33 +00:00
|
|
|
display: none;
|
2020-04-01 20:57:14 +00:00
|
|
|
}
|
2020-04-05 17:50:33 +00:00
|
|
|
}
|
2020-04-01 20:57:14 +00:00
|
|
|
|
2020-05-25 18:50:06 +00:00
|
|
|
&.custom {
|
|
|
|
.icon {
|
|
|
|
display: none;
|
|
|
|
}
|
2020-06-07 21:43:26 +00:00
|
|
|
.text {
|
|
|
|
font-size: 70%;
|
|
|
|
word-break: break-word;
|
|
|
|
margin-top: 0;
|
|
|
|
}
|
2020-05-25 18:50:06 +00:00
|
|
|
}
|
|
|
|
|
2020-04-05 17:50:33 +00:00
|
|
|
&:hover:before {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
|
|
|
&:hover:after {
|
|
|
|
opacity: 1;
|
2020-04-01 20:57:14 +00:00
|
|
|
}
|
2020-04-05 17:50:33 +00:00
|
|
|
}
|
|
|
|
.circle li:hover .reminder.add {
|
|
|
|
opacity: 1;
|
|
|
|
top: 0;
|
|
|
|
}
|
|
|
|
.circle li:hover .reminder.add:before {
|
|
|
|
opacity: 1;
|
|
|
|
}
|
2020-04-01 20:57:14 +00:00
|
|
|
|
2020-04-05 17:50:33 +00:00
|
|
|
#townsquare.public .reminder {
|
2020-04-08 20:42:51 +00:00
|
|
|
opacity: 0;
|
|
|
|
pointer-events: none;
|
2020-04-05 17:50:33 +00:00
|
|
|
}
|
2020-04-01 20:57:14 +00:00
|
|
|
</style>
|