mirror of
https://github.com/YouHaveTrouble/GuildMaster.git
synced 2026-05-12 14:36:58 +00:00
actually bearable mobile view for quests board
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -0,0 +1,85 @@
|
||||
<template>
|
||||
<div class="missives-wrapper">
|
||||
<h1 v-if="label !== undefined">{{ label }}</h1>
|
||||
<section class="missives">
|
||||
<QuestMissive
|
||||
v-for="(missive, key) in quests"
|
||||
:key="key"
|
||||
:adventurers="adventurers"
|
||||
:missive="missive"
|
||||
@click="finalizeQuest(missive)"
|
||||
/>
|
||||
</section>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {defineComponent} from 'vue'
|
||||
import QuestMissive from "@/components/QuestMissive.vue";
|
||||
|
||||
export default defineComponent({
|
||||
name: "QuestGroup",
|
||||
components: {QuestMissive},
|
||||
props: {
|
||||
quests: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
adventurers: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
finalizeQuest: {
|
||||
type: Function,
|
||||
required: true,
|
||||
},
|
||||
label: {
|
||||
type: String,
|
||||
default: undefined,
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.missives-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.missives {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
justify-content: start;
|
||||
align-items: stretch;
|
||||
gap: 1rem;
|
||||
padding-block: 0.5rem;
|
||||
padding-inline: 40%;
|
||||
overflow-x: auto;
|
||||
scroll-snap-type: x mandatory;
|
||||
width: max-content;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
@media(min-width: 800px) {
|
||||
.missives-wrapper {
|
||||
padding-inline: 1rem;
|
||||
}
|
||||
|
||||
.missives {
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
overflow-x: inherit;
|
||||
padding-inline: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -114,11 +114,13 @@ export default defineComponent({
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.missive {
|
||||
width: min(100%, 14rem);
|
||||
width: 14rem;
|
||||
min-width: 14rem;
|
||||
text-align: center;
|
||||
border: 2px solid #000;
|
||||
padding: 0.5rem;
|
||||
position: relative;
|
||||
scroll-snap-align: center;
|
||||
|
||||
.parchment {
|
||||
position: absolute;
|
||||
@@ -257,4 +259,5 @@ export default defineComponent({
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user