add popup welcome on first visit
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template lang="html">
|
||||
<div class="page wh-100" :class="'page-' + slug">
|
||||
<div class="page" :class="'page-' + slug">
|
||||
<div class="page-wrapper" v-html="page.content" />
|
||||
</div>
|
||||
</template>
|
||||
@@ -13,16 +13,9 @@ export default {
|
||||
slug: { type: String, required: true }
|
||||
},
|
||||
|
||||
data () {
|
||||
return {
|
||||
links: undefined
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
addFootnotes () {
|
||||
const links = this.$el.querySelectorAll('.page-wrapper a')
|
||||
console.log('addFootnotes', links)
|
||||
links.forEach((link, i) => {
|
||||
const number = parseInt(link.hash.replace('#', ''))
|
||||
if (!isNaN(number)) {
|
||||
@@ -38,8 +31,6 @@ export default {
|
||||
this.addFootnoteContent(link, i)
|
||||
}
|
||||
})
|
||||
|
||||
this.links = links
|
||||
},
|
||||
|
||||
addFootnoteContent (link, i) {
|
||||
@@ -51,13 +42,14 @@ export default {
|
||||
},
|
||||
|
||||
onFootnoteLinkClick (e) {
|
||||
document.getElementById(e.target.id + '-content').classList.toggle('show')
|
||||
console.log('onFootnoteLinkClick', e.target.dataset.number, e)
|
||||
const container = document.getElementById(e.target.id + '-content')
|
||||
if (container) {
|
||||
container.classList.toggle('show')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
mounted () {
|
||||
console.log('mounted', this.page.notes)
|
||||
if (this.page.notes) this.addFootnotes()
|
||||
}
|
||||
}
|
||||
@@ -65,6 +57,12 @@ export default {
|
||||
|
||||
<style lang="scss">
|
||||
.page {
|
||||
font-size: 1rem;
|
||||
|
||||
@include media-breakpoint-up($size-bp) {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
|
||||
padding: $node-view-spacer-sm-y $node-view-spacer-sm-x;
|
||||
|
||||
@include media-breakpoint-up($size-bp) {
|
||||
@@ -135,7 +133,5 @@ export default {
|
||||
margin: 0 0 1em 2em;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div
|
||||
class="node-view-footer" :class="'node-view-footer-' + mode"
|
||||
>
|
||||
<div class="node-view-footer-wrapper d-flex w-100">
|
||||
<div class="node-view-footer-wrapper w-100">
|
||||
<div class="tags mb-n2">
|
||||
<b-badge
|
||||
v-for="tag in node.tags" :key="tag.id"
|
||||
|
||||
Reference in New Issue
Block a user