1
0
Fork 0
mirror of https://github.com/em-squared/5e-drs.git synced 2025-10-29 04:34:19 +00:00

amélioration de l'impression des monstres et des sorts

This commit is contained in:
Maxime Moraine 2021-09-20 17:09:42 +02:00
parent b21fe6bf2c
commit 49a36a7567
3 changed files with 26 additions and 7 deletions

View file

@ -56,8 +56,8 @@
</v-data-table> </v-data-table>
</div> </div>
<div class="d-none d-print-block column-count-2"> <div class="d-none d-print-block print-column-count-2 column-count-2">
<div v-for="monster in monsters"> <div class="print-monster print-break-avoid-column" v-for="monster in monsters">
<div v-if="!isHiddenPrint(monster)"> <div v-if="!isHiddenPrint(monster)">
<h1 class="d-flex align-center"> <h1 class="d-flex align-center">
<div class="mr-4">{{ monster.title }}</div> <div class="mr-4">{{ monster.title }}</div>

View file

@ -88,22 +88,22 @@
</v-data-table> </v-data-table>
</div> </div>
<div class="d-none d-print-block"> <div class="d-none d-print-block">
<template v-for="(n, level) in 10" v-if="hasSpellOfLevel(level)"> <div class="print-break-avoid-page" v-for="(n, level) in 10" v-if="hasSpellOfLevel(level)">
<h2 v-if="level == 0">Tours de magie</h2> <h2 v-if="level == 0">Tours de magie</h2>
<h2 v-else>Sorts de niveau {{ level }}</h2> <h2 v-else>Sorts de niveau {{ level }}</h2>
<div class="column-count-2"> <div class="column-count-2 print-column-count-2">
<div v-for="spell in spells"> <div v-for="spell in spells">
<template v-if="spell.frontmatter.level == level && !isHiddenPrint(spell)"> <div class="print-spell print-break-avoid-column" v-if="spell.frontmatter.level == level && !isHiddenPrint(spell)">
<h3 class="d-flex align-center title"> <h3 class="d-flex align-center title">
<div class="mr-4">{{ spell.title }}</div> <div class="mr-4">{{ spell.title }}</div>
<v-btn class="d-print-none mr-2" small depressed link :to="{ path: '/creation-de-sort/', query: { key: spell.key } }"><v-icon left>mdi-pencil</v-icon> Modifier</v-btn> <v-btn class="d-print-none mr-2" small depressed link :to="{ path: '/creation-de-sort/', query: { key: spell.key } }"><v-icon left>mdi-pencil</v-icon> Modifier</v-btn>
<v-btn color="error" class="d-print-none" small depressed @click="removeSpell(spell)"><v-icon left>mdi-delete</v-icon> Supprimer</v-btn> <v-btn color="error" class="d-print-none" small depressed @click="removeSpell(spell)"><v-icon left>mdi-delete</v-icon> Supprimer</v-btn>
</h3> </h3>
<Spell :spell="getSpell(spell)" :isList="true" :hideTitle="true" /> <Spell :spell="getSpell(spell)" :isList="true" :hideTitle="true" />
</template> </div>
</div> </div>
</div> </div>
</template> </div>
</div> </div>
</div> </div>
<template v-else> <template v-else>

View file

@ -89,4 +89,23 @@
main.content { main.content {
padding: 0; padding: 0;
} }
.print-column-count-2 {
column-count: 2;
column-gap: 25pt;
}
.print-monster, .print-spell {
border: 1px solid #000;
padding: 5pt;
margin-bottom: 25pt;
}
.print-break-avoid-page {
break-inside: avoid-page;
}
.print-break-avoid-column {
break-inside: avoid-column;
}
} }