Better level alignment
This commit is contained in:
parent
894532668e
commit
4ad1414be7
2 changed files with 35 additions and 32 deletions
|
@ -1,6 +1,9 @@
|
|||
<template>
|
||||
<tr>
|
||||
<td colspan="3" class="spell">
|
||||
<tr class="spell">
|
||||
<td class="spell-level">
|
||||
{{level}}
|
||||
</td>
|
||||
<td colspan="2" class="spell-label">
|
||||
<q-collapsible
|
||||
group="spells"
|
||||
:label="label"
|
||||
|
@ -19,7 +22,7 @@ export default {
|
|||
return this.spell.level.toLowerCase() === 'cantrip' ? '0' : this.spell.level.charAt(0)
|
||||
},
|
||||
label () {
|
||||
return this.level + this.schoolCapitalized + '\n' + this.spell.name
|
||||
return this.schoolCapitalized + '\n' + this.spell.name
|
||||
},
|
||||
schoolCapitalized () {
|
||||
return this.spell.school.charAt(0).toUpperCase() + this.spell.school.slice(1)
|
||||
|
@ -32,15 +35,15 @@ export default {
|
|||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
.spell .item-content
|
||||
position: relative
|
||||
.spell .item-content > *
|
||||
white-space: pre-line !important
|
||||
overflow: visible !important
|
||||
line-height: 0
|
||||
padding-top: .5em
|
||||
text-indent: 33.333%
|
||||
&::first-letter
|
||||
margin-right: 2em
|
||||
float: right
|
||||
.spell
|
||||
.item-content
|
||||
position: relative
|
||||
& > *
|
||||
white-space: pre-line !important
|
||||
overflow: visible !important
|
||||
line-height: 0
|
||||
padding-top: .5em
|
||||
text-indent: 55%
|
||||
.spell-level
|
||||
padding-left: 1em !important
|
||||
</style>
|
||||
|
|
|
@ -10,21 +10,21 @@
|
|||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="text-left no-padding">
|
||||
<a class="sort-name"
|
||||
<th class="sort-level">
|
||||
<a
|
||||
v-on:click="sortBy = 'level'"
|
||||
>Level</a>
|
||||
</th>
|
||||
<th class="sort-name">
|
||||
<a
|
||||
v-on:click="sortBy = 'name'"
|
||||
>Name</a>
|
||||
</th>
|
||||
<th class="text-left no-padding">
|
||||
<a class="sort-school"
|
||||
<th class="sort-school">
|
||||
<a
|
||||
v-on:click="sortBy = 'school'"
|
||||
>School</a>
|
||||
</th>
|
||||
<th class="text-right no-padding">
|
||||
<a class="sort-level"
|
||||
v-on:click="sortBy = 'level'"
|
||||
>Level</a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
@ -100,13 +100,13 @@ export default {
|
|||
<style scoped lang="stylus">
|
||||
.spell-list
|
||||
width: 100%
|
||||
th a
|
||||
display: inline-block
|
||||
padding: 1em 0
|
||||
&.sort-name
|
||||
margin-left: 1em
|
||||
margin-right: -1em
|
||||
&.sort-level
|
||||
margin-left: -5em
|
||||
margin-right: 5em
|
||||
th
|
||||
a
|
||||
display: inline-block
|
||||
padding: 1em 0
|
||||
&.sort-level
|
||||
padding-left: 1em
|
||||
width: 5em
|
||||
&.sort-name
|
||||
padding-left: 1em
|
||||
</style>
|
||||
|
|
Loading…
Add table
Reference in a new issue