2020-04-04 14:14:25 +00:00
|
|
|
<template>
|
|
|
|
<transition name="modal-fade">
|
|
|
|
<div class="modal-backdrop" @click="close">
|
2020-04-05 17:50:33 +00:00
|
|
|
<div
|
|
|
|
class="modal"
|
2021-03-04 10:15:18 +00:00
|
|
|
:class="{ maximized: isMaximized }"
|
2020-04-05 17:50:33 +00:00
|
|
|
role="dialog"
|
|
|
|
aria-labelledby="modalTitle"
|
|
|
|
aria-describedby="modalDescription"
|
|
|
|
@click.stop=""
|
2020-04-04 14:14:25 +00:00
|
|
|
>
|
2021-03-04 10:15:18 +00:00
|
|
|
<div class="top-right-buttons">
|
|
|
|
<font-awesome-icon
|
|
|
|
@click="isMaximized = !isMaximized"
|
|
|
|
class="top-right-button"
|
|
|
|
:icon="['fas', isMaximized ? 'window-minimize' : 'window-maximize']"
|
|
|
|
/>
|
|
|
|
<font-awesome-icon
|
|
|
|
@click="close"
|
|
|
|
class="top-right-button"
|
|
|
|
icon="times-circle"
|
|
|
|
/>
|
|
|
|
</div>
|
2021-03-07 21:55:14 +00:00
|
|
|
<div class="slot">
|
|
|
|
<slot></slot>
|
|
|
|
</div>
|
2020-04-04 14:14:25 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</transition>
|
|
|
|
</template>
|
2020-04-11 20:55:37 +00:00
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
2021-02-10 07:41:57 +00:00
|
|
|
data: function() {
|
2021-02-10 02:04:02 +00:00
|
|
|
return {
|
2021-02-10 07:41:57 +00:00
|
|
|
isMaximized: false
|
|
|
|
};
|
2021-02-10 02:04:02 +00:00
|
|
|
},
|
2020-04-11 20:55:37 +00:00
|
|
|
methods: {
|
|
|
|
close() {
|
|
|
|
this.$emit("close");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
2020-04-04 15:25:11 +00:00
|
|
|
<style lang="scss">
|
2020-04-05 17:50:33 +00:00
|
|
|
.modal-backdrop {
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
background-color: rgba(0, 0, 0, 0.3);
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
z-index: 100;
|
|
|
|
}
|
2020-04-04 14:14:25 +00:00
|
|
|
|
2020-04-05 17:50:33 +00:00
|
|
|
.modal {
|
|
|
|
background: rgba(0, 0, 0, 0.8);
|
|
|
|
padding: 10px 20px;
|
|
|
|
border-radius: 10px;
|
|
|
|
box-shadow: 2px 2px 20px 1px #000;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2021-03-04 10:15:18 +00:00
|
|
|
max-height: 80%;
|
|
|
|
max-width: 80%;
|
2021-02-12 18:00:59 +00:00
|
|
|
|
|
|
|
.vote-history &,
|
|
|
|
.night-reference &,
|
|
|
|
.characters & {
|
|
|
|
overflow-y: auto;
|
|
|
|
}
|
2021-03-14 19:42:39 +00:00
|
|
|
|
2021-03-28 19:56:58 +00:00
|
|
|
.roles &,
|
|
|
|
.characters & {
|
2021-03-11 18:47:10 +00:00
|
|
|
max-height: 100%;
|
2021-03-14 19:42:39 +00:00
|
|
|
max-width: 60%;
|
2021-03-11 18:47:10 +00:00
|
|
|
}
|
2020-05-27 19:42:09 +00:00
|
|
|
|
2020-04-10 15:48:20 +00:00
|
|
|
ul {
|
|
|
|
list-style-type: none;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
align-content: center;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
line-height: 100%;
|
|
|
|
}
|
2021-03-07 21:55:14 +00:00
|
|
|
|
2021-03-04 10:15:18 +00:00
|
|
|
> .top-right-buttons {
|
2020-04-15 20:40:58 +00:00
|
|
|
position: absolute;
|
2021-02-12 18:00:59 +00:00
|
|
|
z-index: 100;
|
2021-03-07 21:55:14 +00:00
|
|
|
top: 15px;
|
2021-03-04 10:15:18 +00:00
|
|
|
right: 20px;
|
|
|
|
> .top-right-button {
|
|
|
|
cursor: pointer;
|
|
|
|
width: 28px;
|
|
|
|
&:hover {
|
|
|
|
color: red;
|
|
|
|
}
|
2021-02-10 02:04:02 +00:00
|
|
|
}
|
2021-02-10 07:41:57 +00:00
|
|
|
}
|
2021-03-07 21:55:14 +00:00
|
|
|
|
|
|
|
> .slot {
|
|
|
|
max-height: 100%;
|
|
|
|
position: initial;
|
|
|
|
}
|
2021-02-10 02:04:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.maximized {
|
|
|
|
background: rgba(0, 0, 0, 0.95);
|
|
|
|
padding: 0;
|
2021-05-15 18:07:54 +00:00
|
|
|
border-radius: 0;
|
2021-02-10 02:04:02 +00:00
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
max-width: 100%;
|
|
|
|
max-height: 100%;
|
2021-02-12 18:00:59 +00:00
|
|
|
display: flex;
|
|
|
|
align-content: center;
|
2021-03-07 21:55:14 +00:00
|
|
|
justify-content: center;
|
2021-03-28 19:56:58 +00:00
|
|
|
.roles &,
|
|
|
|
.characters & {
|
|
|
|
max-width: 100%;
|
2021-03-30 19:33:52 +00:00
|
|
|
padding: 10px;
|
2021-03-28 19:56:58 +00:00
|
|
|
}
|
2020-04-05 17:50:33 +00:00
|
|
|
}
|
2020-04-04 14:14:25 +00:00
|
|
|
|
2020-04-05 17:50:33 +00:00
|
|
|
.modal-fade-enter,
|
|
|
|
.modal-fade-leave-active {
|
|
|
|
opacity: 0;
|
|
|
|
}
|
2020-04-04 14:14:25 +00:00
|
|
|
|
2020-04-05 17:50:33 +00:00
|
|
|
.modal-fade-enter-active,
|
|
|
|
.modal-fade-leave-active {
|
|
|
|
transition: opacity 0.2s ease;
|
|
|
|
}
|
2020-04-04 14:14:25 +00:00
|
|
|
</style>
|