2020-05-02 21:11:20 +02:00
|
|
|
<template>
|
|
|
|
<Modal
|
|
|
|
class="editions"
|
|
|
|
v-show="modals.edition"
|
|
|
|
@close="toggleModal('edition')"
|
|
|
|
>
|
|
|
|
<h3>Select an edition:</h3>
|
|
|
|
<ul class="editions">
|
|
|
|
<li
|
|
|
|
v-for="edition in editions"
|
|
|
|
class="edition"
|
|
|
|
v-bind:class="['edition-' + edition.id]"
|
|
|
|
v-bind:key="edition.id"
|
|
|
|
@click="setEdition(edition.id)"
|
|
|
|
>
|
|
|
|
{{ edition.name }}
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</Modal>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-05-03 23:05:17 +02:00
|
|
|
import editionJSON from "../../editions";
|
2020-05-02 21:11:20 +02:00
|
|
|
import { mapMutations, mapState } from "vuex";
|
|
|
|
import Modal from "./Modal";
|
|
|
|
|
|
|
|
export default {
|
|
|
|
components: {
|
|
|
|
Modal
|
|
|
|
},
|
|
|
|
data: function() {
|
|
|
|
return {
|
|
|
|
editions: editionJSON
|
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: mapState(["modals"]),
|
|
|
|
methods: mapMutations(["toggleModal", "setEdition"])
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
2020-05-03 23:05:17 +02:00
|
|
|
@import "../../vars";
|
2020-05-02 21:11:20 +02:00
|
|
|
|
|
|
|
// Editions
|
|
|
|
@each $img, $skipIcons in $editions {
|
|
|
|
.edition-#{$img} {
|
2020-05-03 23:05:17 +02:00
|
|
|
background-image: url("../../assets/editions/#{$img}.png");
|
2020-05-02 21:11:20 +02:00
|
|
|
}
|
|
|
|
@if $skipIcons != true {
|
|
|
|
.edition-#{$img}.townsfolk {
|
2020-05-03 23:05:17 +02:00
|
|
|
background-image: url("../../assets/editions/#{$img}-townsfolk.png");
|
2020-05-02 21:11:20 +02:00
|
|
|
}
|
|
|
|
.edition-#{$img}.outsider {
|
2020-05-03 23:05:17 +02:00
|
|
|
background-image: url("../../assets/editions/#{$img}-outsider.png");
|
2020-05-02 21:11:20 +02:00
|
|
|
}
|
|
|
|
.edition-#{$img}.minion {
|
2020-05-03 23:05:17 +02:00
|
|
|
background-image: url("../../assets/editions/#{$img}-minion.png");
|
2020-05-02 21:11:20 +02:00
|
|
|
}
|
|
|
|
.edition-#{$img}.demon {
|
2020-05-03 23:05:17 +02:00
|
|
|
background-image: url("../../assets/editions/#{$img}-demon.png");
|
2020-05-02 21:11:20 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ul.editions .edition {
|
|
|
|
text-align: center;
|
|
|
|
padding-top: 100px;
|
|
|
|
background-position: center center;
|
|
|
|
background-size: 100% auto;
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
width: 200px;
|
|
|
|
margin: 5px;
|
|
|
|
font-size: 120%;
|
|
|
|
font-weight: bold;
|
|
|
|
text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000,
|
|
|
|
1px 1px 0 #000, 0 0 5px rgba(0, 0, 0, 0.75);
|
|
|
|
cursor: pointer;
|
|
|
|
&:hover {
|
|
|
|
color: red;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|