mirror of
https://github.com/em-squared/5e-drs.git
synced 2025-10-30 13:14:20 +00:00
liste des sorts
This commit is contained in:
parent
f3643e6eaf
commit
b1b97a01e9
373 changed files with 9259 additions and 34 deletions
54
docs/.vuepress/theme/global-components/RT.vue
Normal file
54
docs/.vuepress/theme/global-components/RT.vue
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
<template>
|
||||
<span>
|
||||
<template v-if="tooltipObject">
|
||||
<router-link :to="{ path: tooltipObject.basePath + '#' + tooltipObject.id }">
|
||||
<v-tooltip content-class="condition-tooltip-container" top>
|
||||
<template v-slot:activator="{ on }">
|
||||
<em v-on="on">{{ l }}</em>
|
||||
</template>
|
||||
<div class="condition-tooltip">
|
||||
<p class="condition-tooltip-title"><strong>{{ tooltipObject.title }}</strong></p>
|
||||
<ul class="condition-description"><li v-for="d in tooltipObject.description" v-html="d"></li></ul>
|
||||
</div>
|
||||
</v-tooltip>
|
||||
</router-link>
|
||||
</template>
|
||||
<template v-else><em>{{ l }}</em></template>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/*
|
||||
** Condition tooltip
|
||||
*/
|
||||
import {displaySchoolLevel} from '@theme/util/spellHelpers'
|
||||
import {tooltips} from '../../data/ruleTooltips.js'
|
||||
|
||||
export default {
|
||||
name: 'RuleTooltip',
|
||||
|
||||
props: [
|
||||
'l', // label
|
||||
't' // condition
|
||||
],
|
||||
|
||||
data () {
|
||||
return {
|
||||
tooltipObject: null,
|
||||
tooltips: tooltips
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
},
|
||||
|
||||
mounted () {
|
||||
this.tooltipObject = this.tooltips[this.t]
|
||||
console.log(this.tooltipObject)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
</style>
|
||||
|
|
@ -19,23 +19,26 @@
|
|||
</div>
|
||||
<div class="spell-duration"><strong>Durée</strong> : <span v-if="spell.frontmatter.concentration">concentration, </span>{{ spell.frontmatter.duration }}</div>
|
||||
</div>
|
||||
<div class="spell-description">{{ spell.frontmatter.description }}</div>
|
||||
<div class="spell-description" v-html="spell.frontmatter.description"></div>
|
||||
</div>
|
||||
</v-tooltip>
|
||||
</router-link>
|
||||
<router-link :to="{ path: spellPath }" v-else>{{ label }}</router-link>
|
||||
<router-link :to="{ path: spellPath }" v-else><em>{{ label }}</em></router-link>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
/*
|
||||
** Spell tooltip
|
||||
*/
|
||||
import {displaySchoolLevel} from '@theme/util/spellHelpers'
|
||||
|
||||
export default {
|
||||
name: 'SpellTooltip',
|
||||
|
||||
props: [
|
||||
'label',
|
||||
'path'
|
||||
'l', // label
|
||||
's' // spell slug
|
||||
],
|
||||
|
||||
data () {
|
||||
|
|
@ -45,6 +48,17 @@ export default {
|
|||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
label () {
|
||||
if (this.l) {
|
||||
return this.l
|
||||
} else if (this.spell) {
|
||||
return this.spell.title.toLowerCase()
|
||||
}
|
||||
return '[Sort non trouvé]'
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
displaySchoolLevel () {
|
||||
return displaySchoolLevel(this.spell.frontmatter)
|
||||
|
|
@ -52,10 +66,8 @@ export default {
|
|||
},
|
||||
|
||||
mounted () {
|
||||
console.log(this.path)
|
||||
this.spellPath = '/grimoire/' + this.path + '/'
|
||||
this.spellPath = '/grimoire/' + this.s + '/'
|
||||
this.spell = this.$site.pages.find((el) => el.path === this.spellPath || el.path === this.spellPath + "/")
|
||||
console.log(this.spell)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
Loading…
Add table
Add a link
Reference in a new issue