mirror of https://github.com/bra1n/townsquare.git
added intro
This commit is contained in:
parent
a8c1c9ea85
commit
263fbe7630
61
src/App.vue
61
src/App.vue
|
@ -6,7 +6,23 @@
|
||||||
v-bind:class="{ screenshot: isScreenshot }"
|
v-bind:class="{ screenshot: isScreenshot }"
|
||||||
v-bind:style="{ backgroundImage: background ? `url('${background}')` : '' }"
|
v-bind:style="{ backgroundImage: background ? `url('${background}')` : '' }"
|
||||||
>
|
>
|
||||||
<TownInfo :players="players" :edition="edition"></TownInfo>
|
<div class="intro" v-if="!players.length">
|
||||||
|
<img src="/static/apple-icon.png" alt="">
|
||||||
|
Welcome to the (inofficial)
|
||||||
|
<b> Virtual Blood on the Clocktower Town Square</b>!<br />
|
||||||
|
Please add more players through the
|
||||||
|
<span class="button" @click="isControlOpen = !isControlOpen">
|
||||||
|
<font-awesome-icon icon="cog" /> Menu
|
||||||
|
</span>
|
||||||
|
on the top right or by pressing <b>[A]</b>.<br />
|
||||||
|
This project is free and open source and can be found on
|
||||||
|
<a href="https://github.com/bra1n/townsquare" target="_blank">GitHub</a>.
|
||||||
|
</div>
|
||||||
|
<TownInfo
|
||||||
|
:players="players"
|
||||||
|
:edition="edition"
|
||||||
|
v-if="players.length"
|
||||||
|
></TownInfo>
|
||||||
<TownSquare
|
<TownSquare
|
||||||
:is-public="isPublic"
|
:is-public="isPublic"
|
||||||
:is-night-order="isNightOrder"
|
:is-night-order="isNightOrder"
|
||||||
|
@ -62,19 +78,19 @@
|
||||||
<font-awesome-icon icon="book-open" />
|
<font-awesome-icon icon="book-open" />
|
||||||
Grimoire
|
Grimoire
|
||||||
</li>
|
</li>
|
||||||
<li @click="togglePublic">
|
<li @click="togglePublic" v-if="players.length">
|
||||||
<em>[G]</em>
|
<em>[G]</em>
|
||||||
<template v-if="!isPublic">Hide</template>
|
<template v-if="!isPublic">Hide</template>
|
||||||
<template v-if="isPublic">Show</template>
|
<template v-if="isPublic">Show</template>
|
||||||
</li>
|
</li>
|
||||||
<li @click="toggleNightOrder">
|
<li @click="toggleNightOrder" v-if="players.length">
|
||||||
<em
|
<em
|
||||||
><font-awesome-icon
|
><font-awesome-icon
|
||||||
:icon="['fas', isNightOrder ? 'check-square' : 'square']"
|
:icon="['fas', isNightOrder ? 'check-square' : 'square']"
|
||||||
/></em>
|
/></em>
|
||||||
Night order
|
Night order
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li v-if="players.length">
|
||||||
<em>
|
<em>
|
||||||
<font-awesome-icon @click="zoom -= 0.1" icon="search-minus" />
|
<font-awesome-icon @click="zoom -= 0.1" icon="search-minus" />
|
||||||
{{ Math.round(zoom * 100) }}%
|
{{ Math.round(zoom * 100) }}%
|
||||||
|
@ -363,6 +379,13 @@ body {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: $townsfolk;
|
||||||
|
&:hover {
|
||||||
|
color: $demon;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
h1,
|
h1,
|
||||||
h2,
|
h2,
|
||||||
h3,
|
h3,
|
||||||
|
@ -382,6 +405,10 @@ ul {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-position: center center;
|
background-position: center center;
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
align-content: center;
|
||||||
|
justify-content: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
// success animation
|
// success animation
|
||||||
|
@ -394,6 +421,29 @@ ul {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Intro
|
||||||
|
.intro {
|
||||||
|
text-align: center;
|
||||||
|
width: 50%;
|
||||||
|
font-size: 120%;
|
||||||
|
position: absolute;
|
||||||
|
padding: 10px;
|
||||||
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
border: 3px solid black;
|
||||||
|
border-radius: 10px;
|
||||||
|
z-index: 3;
|
||||||
|
img {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 100%;
|
||||||
|
left: 50%;
|
||||||
|
margin-left: -96px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
border-radius: 50%;
|
||||||
|
box-shadow: 0 0 10px black;
|
||||||
|
border: 3px solid black;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Controls
|
// Controls
|
||||||
.controls {
|
.controls {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
@ -422,7 +472,8 @@ ul {
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu {
|
.menu {
|
||||||
transform-origin: 189px 22px;
|
width: 210px;
|
||||||
|
transform-origin: 190px 22px;
|
||||||
transition: transform 500ms cubic-bezier(0.68, -0.55, 0.27, 1.55);
|
transition: transform 500ms cubic-bezier(0.68, -0.55, 0.27, 1.55);
|
||||||
transform: rotate(-90deg);
|
transform: rotate(-90deg);
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<ul class="info">
|
<ul class="info">
|
||||||
<li class="edition" v-bind:class="['edition-' + edition]"></li>
|
<li class="edition" v-bind:class="['edition-' + edition]"></li>
|
||||||
<li v-if="players.length - teams.traveler < 5">Please add more players!</li>
|
<li v-if="players.length - teams.traveler < 5">
|
||||||
|
Please add more players!
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
{{ players.length }} <font-awesome-icon class="players" icon="users" />
|
{{ players.length }} <font-awesome-icon class="players" icon="users" />
|
||||||
{{ teams.alive }} <font-awesome-icon class="alive" icon="heartbeat" />
|
{{ teams.alive }} <font-awesome-icon class="alive" icon="heartbeat" />
|
||||||
|
|
Loading…
Reference in New Issue