Create the Modal code / apply styling
This commit is contained in:
parent
c813f8c9e5
commit
f7a2c2a7bb
2 changed files with 34 additions and 6 deletions
|
|
@ -1,17 +1,45 @@
|
||||||
<template>
|
<template>
|
||||||
<div></div>
|
<transition name="fade" @after-enter="content = true">
|
||||||
|
<div
|
||||||
|
v-if="show"
|
||||||
|
class="modal-container"
|
||||||
|
@click.self.stop="content = false"
|
||||||
|
>
|
||||||
|
<transition name="burst" @after-leave="$emit('close')">
|
||||||
|
<div v-if="content" class="modal">
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: ``,
|
name: `ModalAnimation`,
|
||||||
components: {},
|
props: {
|
||||||
computed: {},
|
show: {
|
||||||
methods: {},
|
required: true,
|
||||||
|
type: Boolean,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
data() {return {
|
||||||
|
content: false,
|
||||||
|
}},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
@import "css/theme.css";
|
@import "css/theme.css";
|
||||||
@import "css/style.css";
|
@import "css/style.css";
|
||||||
|
@import "css/transitions.css";
|
||||||
|
|
||||||
|
.modal-container {
|
||||||
|
background-color: var(--modal-background-blur);
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal {
|
||||||
|
background-color: var(--modal-content-background);
|
||||||
|
color: var(--modal-content-text);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
@ -48,7 +48,7 @@
|
||||||
/* The fill colour of the eyes on the game board */
|
/* The fill colour of the eyes on the game board */
|
||||||
--eye-colour: #000000;
|
--eye-colour: #000000;
|
||||||
|
|
||||||
/* The colour that is used to bring focus towards the modal */
|
/* The colours for the modals */
|
||||||
--modal-background-blur: #000;
|
--modal-background-blur: #000;
|
||||||
--modal-content-background: var(--background1);
|
--modal-content-background: var(--background1);
|
||||||
--modal-content-text: var(--background1-text);
|
--modal-content-text: var(--background1-text);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue