Drawing bool for diff text before & during draw.
- Updated style of winners container. - Moved out header. - Extra info-text in container before and during the drawing of first winner.
This commit is contained in:
@@ -1,14 +1,22 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<section>
|
||||||
<h2 v-if="winners.length > 0"> {{ title ? title : 'Vinnere' }}</h2>
|
<h2>{{ title ? title : 'Vinnere' }}</h2>
|
||||||
<div class="winners" v-if="winners.length > 0">
|
<div class="winning-raffles" v-if="winners.length > 0">
|
||||||
<div v-for="(winner, index) in winners" :key="index">
|
<div v-for="(winner, index) in winners" :key="index">
|
||||||
<router-link :to="`/highscore/${ encodeURIComponent(winner.name) }`">
|
<router-link :to="`/highscore/${ encodeURIComponent(winner.name) }`">
|
||||||
<div :class="winner.color + '-raffle'" class="raffle-element">{{ winner.name }}</div>
|
<div :class="winner.color + '-raffle'" class="raffle-element">{{ winner.name }}</div>
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div v-else-if="drawing" class="container">
|
||||||
|
<h3>Trekningen er igang!</h3>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div v-else class="container">
|
||||||
|
<h3>Trekningen har ikke startet enda <button>⏰</button></h3>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
@@ -17,6 +25,9 @@ export default {
|
|||||||
winners: {
|
winners: {
|
||||||
type: Array
|
type: Array
|
||||||
},
|
},
|
||||||
|
drawing: {
|
||||||
|
type: Boolean,
|
||||||
|
},
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
required: false
|
required: false
|
||||||
@@ -30,11 +41,27 @@ export default {
|
|||||||
@import "../styles/variables.scss";
|
@import "../styles/variables.scss";
|
||||||
@import "../styles/media-queries.scss";
|
@import "../styles/media-queries.scss";
|
||||||
|
|
||||||
|
section {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
margin-bottom: 0.6rem;
|
||||||
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.winners {
|
h3 {
|
||||||
|
margin: auto;
|
||||||
|
color: $matte-text-color;
|
||||||
|
font-size: 1.6rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.winning-raffles {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-flow: wrap;
|
flex-flow: wrap;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
@@ -52,4 +79,21 @@ h2 {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container {
|
||||||
|
display: flex;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
button {
|
||||||
|
-webkit-appearance: unset;
|
||||||
|
background-color: unset;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
font-size: inherit;
|
||||||
|
border: unset;
|
||||||
|
height: auto;
|
||||||
|
width: auto;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user