add Bpopover default props & add text_rebond body and tags
This commit is contained in:
@@ -8,8 +8,7 @@
|
|||||||
v-for="node in nodes" :key="'popover-' + node.id"
|
v-for="node in nodes" :key="'popover-' + node.id"
|
||||||
custom-class="popover-node-preview"
|
custom-class="popover-node-preview"
|
||||||
:target="'preview-node-' + node.id" container="preview-zone"
|
:target="'preview-node-' + node.id" container="preview-zone"
|
||||||
placement="auto"
|
placement="auto" triggers="manual"
|
||||||
triggers="manual" :boundary-padding="0"
|
|
||||||
>
|
>
|
||||||
<node-view
|
<node-view
|
||||||
:node="node"
|
:node="node"
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
class="node-view"
|
class="node-view"
|
||||||
:class="['node-view-' + mode, 'node-view-' + type, 'node-view-' + nodeVariant, { 'preview': preview }]"
|
:class="['node-view-' + mode, 'node-view-' + type, 'node-view-' + nodeVariant, { 'preview': preview }]"
|
||||||
>
|
>
|
||||||
<div v-if="!loading" class="node-view-wrapper" :id="'node-' + node.id">
|
<div v-if="!loading" class="node-view-wrapper" :id="`node-${mode}-${node.id}`">
|
||||||
<component
|
<component
|
||||||
:is="'node-view-header-' + nodeType"
|
:is="'node-view-header-' + nodeType"
|
||||||
v-bind="{ node, mode }"
|
v-bind="{ node, mode }"
|
||||||
|
|||||||
@@ -9,9 +9,9 @@
|
|||||||
<b-popover
|
<b-popover
|
||||||
v-for="note in notes" :key="note.number"
|
v-for="note in notes" :key="note.number"
|
||||||
custom-class="footnote"
|
custom-class="footnote"
|
||||||
:target="'note-' + note.number" :container="'node-' + nodeId"
|
:target="'note-' + note.number" :container="`node-${mode}-${nodeId}`"
|
||||||
placement="top" :fallback-placement="['bottom', 'right', 'left']"
|
placement="top" :fallback-placement="['bottom', 'right', 'left']"
|
||||||
:triggers="['focus']" :boundary-padding="0"
|
:triggers="['focus']"
|
||||||
>
|
>
|
||||||
<div class="footnote-content" v-html="note.content" />
|
<div class="footnote-content" v-html="note.content" />
|
||||||
|
|
||||||
@@ -91,6 +91,7 @@ export default {
|
|||||||
|
|
||||||
mounted () {
|
mounted () {
|
||||||
if (this.mode === 'view' && this.notes) this.addFootnotes()
|
if (this.mode === 'view' && this.notes) this.addFootnotes()
|
||||||
|
this.$el.querySelectorAll('img, video, audio').forEach(elem => elem.parentElement.classList.add('media-container'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -18,9 +18,9 @@
|
|||||||
</b-button>
|
</b-button>
|
||||||
|
|
||||||
<b-popover
|
<b-popover
|
||||||
:target="'siblings-' + node.id" triggers="click" placement="top"
|
:target="'siblings-' + node.id"
|
||||||
|
triggers="focus" placement="top" boundary="viewport"
|
||||||
custom-class="popover-siblings"
|
custom-class="popover-siblings"
|
||||||
boundary="viewport"
|
|
||||||
>
|
>
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="sibling in node.siblings" :key="sibling.id">
|
<li v-for="sibling in node.siblings" :key="sibling.id">
|
||||||
@@ -29,6 +29,17 @@
|
|||||||
link edition block
|
link edition block
|
||||||
@open-node="onOpenSibling(sibling.id, 'siblings-' + node.id)"
|
@open-node="onOpenSibling(sibling.id, 'siblings-' + node.id)"
|
||||||
/>
|
/>
|
||||||
|
<node-view-body
|
||||||
|
v-bind="{ content: sibling.content, nodeId: sibling.id, type: sibling.type || 'ref', mode: 'card' }"
|
||||||
|
/>
|
||||||
|
<div class="tags mb-n2 mt-2" v-if="sibling.tags">
|
||||||
|
<b-badge
|
||||||
|
v-for="tag in sibling.tags" :key="tag.id"
|
||||||
|
variant="dark" pill class="mr-2 mb-2"
|
||||||
|
>
|
||||||
|
{{ tag.name }}
|
||||||
|
</b-badge>
|
||||||
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</b-popover>
|
</b-popover>
|
||||||
@@ -46,14 +57,15 @@
|
|||||||
<script>
|
<script>
|
||||||
import { toCommaList } from '@/helpers/common'
|
import { toCommaList } from '@/helpers/common'
|
||||||
import { getRelation } from '@/store/utils'
|
import { getRelation } from '@/store/utils'
|
||||||
import { NodeViewTitle } from '@/components/nodes'
|
import { NodeViewTitle, NodeViewBody } from '@/components/nodes'
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NodeViewFooter',
|
name: 'NodeViewFooter',
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
NodeViewTitle
|
NodeViewTitle,
|
||||||
|
NodeViewBody
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
@@ -108,8 +120,11 @@ export default {
|
|||||||
.popover-siblings {
|
.popover-siblings {
|
||||||
background-color: $white;
|
background-color: $white;
|
||||||
border: $line;
|
border: $line;
|
||||||
|
max-width: 350px;
|
||||||
|
|
||||||
.popover-body {
|
.popover-body {
|
||||||
|
max-height: 70vh;
|
||||||
|
overflow: auto;
|
||||||
color: $black;
|
color: $black;
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
@@ -117,14 +132,35 @@ export default {
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
li:not(:last-of-type) {
|
li {
|
||||||
margin-bottom: 1rem;
|
margin-bottom: 2rem;
|
||||||
|
|
||||||
|
&:last-of-type {
|
||||||
|
margin-bottom: 18px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
h6 {
|
h6 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.edition {
|
||||||
|
font-size: .7rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.node-view-body {
|
||||||
|
font-size: 1rem;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.media-container {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge {
|
||||||
|
font-size: 0.875rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
+2
-1
@@ -10,7 +10,8 @@ import store from './store'
|
|||||||
|
|
||||||
Vue.use(BootstrapVue, {
|
Vue.use(BootstrapVue, {
|
||||||
BButton: { pill: true },
|
BButton: { pill: true },
|
||||||
BOverlay: { blur: null, spinnerType: 'grow', opacity: 0 }
|
BOverlay: { blur: null, spinnerType: 'grow', opacity: 0 },
|
||||||
|
BPopover: { boundaryPadding: 0, zIndex: 0 }
|
||||||
})
|
})
|
||||||
Vue.use(Meta)
|
Vue.use(Meta)
|
||||||
Vue.use(Vue2TouchEvents)
|
Vue.use(Vue2TouchEvents)
|
||||||
|
|||||||
Reference in New Issue
Block a user