56 lines
1.4 KiB
Vue
56 lines
1.4 KiB
Vue
<template>
|
|
<div class="settings">
|
|
<div class="time">
|
|
<p>Kies het aantal seconden:</p>
|
|
<span class="time-choice" v-bind:class="{ selected: time == 15 }" v-on:click="setTime(15)">15</span>
|
|
<span class="time-choice" v-bind:class="{ selected: time == 30 }" v-on:click="setTime(30)">30</span>
|
|
<span class="time-choice" v-bind:class="{ selected: time == 45 }" v-on:click="setTime(45)">45</span>
|
|
<span class="time-choice" v-bind:class="{ selected: time == 60 }" v-on:click="setTime(60)">60</span>
|
|
<span class="time-choice" v-bind:class="{ selected: time == 75 }" v-on:click="setTime(75)">75</span>
|
|
<span class="time-choice" v-bind:class="{ selected: time == 90 }" v-on:click="setTime(90)">90</span>
|
|
</div>
|
|
<button class="start-game" v-on:click="startGame()">Start het spel!</button>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: "Settings",
|
|
data: function() {
|
|
return {
|
|
time: 0,
|
|
}
|
|
},
|
|
methods: {
|
|
setTime(time) {
|
|
this.time = time
|
|
},
|
|
startGame() {
|
|
this.$emit('set-time', this.time);
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.time-choice {
|
|
font-size: 48px;
|
|
display: inline-block;
|
|
padding: 25px;
|
|
&.selected {
|
|
color: $red;
|
|
}
|
|
}
|
|
|
|
.start-game {
|
|
appearance: none;
|
|
border: 1px solid #2c3e50;
|
|
border-radius: 3px;
|
|
font-size: 3rem;
|
|
background: none;
|
|
padding: 2rem;
|
|
}
|
|
|
|
|
|
|
|
</style> |