bug fix
This commit is contained in:
@@ -253,6 +253,7 @@ section[role="main-content"]{
|
||||
@include title1black;
|
||||
}
|
||||
aside.index-tooltip{
|
||||
z-index:10;
|
||||
margin-top: -1.75em;
|
||||
position:absolute;
|
||||
text-align: right;
|
||||
|
||||
@@ -43,7 +43,7 @@ export default {
|
||||
},
|
||||
parseLinks () {
|
||||
let links = this.html.match(/<a[^<]+<\/a>/g)
|
||||
// console.log('links', links)
|
||||
console.log('links', links)
|
||||
if (links) {
|
||||
// let domparser = new DOMParser()
|
||||
// let domlink
|
||||
@@ -51,36 +51,23 @@ export default {
|
||||
let index = null
|
||||
for (var i = 0; i < links.length; i++) {
|
||||
// console.log(`link ${i}:`, links[i])
|
||||
linkparts = RegExp(/<a class="(.+)" href="(.+)">(.+)<\/a>/g).exec(links[i], 'g')
|
||||
// console.log('linkparts', linkparts)
|
||||
switch (linkparts[1]) {
|
||||
case 'persName':
|
||||
index = 'nominum'
|
||||
break
|
||||
case 'placeName':
|
||||
index = 'locorum'
|
||||
break
|
||||
case 'objectName':
|
||||
index = 'operum'
|
||||
break
|
||||
}
|
||||
if (index) {
|
||||
uuid = linkparts[2].replace('#', '')
|
||||
newlink = `<a` +
|
||||
` class="${linkparts[1]} active-link"` +
|
||||
` data-index="${index}"` +
|
||||
` data-uuid="${uuid}"` +
|
||||
` href="/${index}/${uuid}"` +
|
||||
` @click.prevent="onClickRef"` +
|
||||
` @keyup.enter="onClickRef"` +
|
||||
` @mouseover="onHoverLink"` +
|
||||
` @mouseleave="onLeaveLink"` +
|
||||
`>${linkparts[3]}` +
|
||||
`<sup class="mdi mdi-message-text-outline" />` +
|
||||
`</a>`
|
||||
// console.log('newlink', newlink)
|
||||
this.html = this.html.replace(links[i], newlink)
|
||||
}
|
||||
linkparts = RegExp(/<a class="(.+)" href="(.+)" data-index="(.+)">(.+)<\/a>/g).exec(links[i], 'g')
|
||||
index = linkparts[3]
|
||||
uuid = linkparts[2].replace('#', '')
|
||||
newlink = `<a` +
|
||||
` class="${linkparts[1]} active-link"` +
|
||||
` data-index="${index}"` +
|
||||
` data-uuid="${uuid}"` +
|
||||
` href="/${index}/${uuid}"` +
|
||||
` @click.prevent="onClickRef"` +
|
||||
` @keyup.enter="onClickRef"` +
|
||||
` @mouseover="onHoverLink"` +
|
||||
` @mouseleave="onLeaveLink"` +
|
||||
`>${linkparts[4]}` +
|
||||
`<sup class="mdi mdi-message-text-outline" />` +
|
||||
`</a>`
|
||||
// console.log('newlink', newlink)
|
||||
this.html = this.html.replace(links[i], newlink)
|
||||
}
|
||||
// console.log('this.html', this.html)
|
||||
}
|
||||
|
||||
@@ -53,6 +53,7 @@ export default {
|
||||
}),
|
||||
methods: {
|
||||
ocAsArray (oc) {
|
||||
// not necesseary anymore (KB #758)
|
||||
console.log('Array.isArray(oc)', Array.isArray(oc))
|
||||
return Array.isArray(oc) ? oc : [oc]
|
||||
},
|
||||
|
||||
@@ -14,13 +14,16 @@
|
||||
<span v-if="indexitem == 'loading'">Loading ...</span>
|
||||
<template v-if="indexitem !== 'loading'">
|
||||
<h1 v-html="indexitem.title" />
|
||||
<p class="birthdeath">
|
||||
<p v-if="indexitem.birthDate" class="birthdeath">
|
||||
<time>{{ indexitem.birthDate }}</time>, <span class="place">{{ indexitem.birthPlace }}</span><br>
|
||||
<time>{{ indexitem.deathDate }}</time>, <span class="place">{{ indexitem.deathPlace }}</span>
|
||||
</p>
|
||||
<p class="occupation">
|
||||
<p v-if="indexitem.occupation" class="occupation">
|
||||
{{ indexitem.occupation }}
|
||||
</p>
|
||||
<p v-if="indexitem.type" class="type">
|
||||
{{ indexitem.type }}
|
||||
</p>
|
||||
</template>
|
||||
|
||||
</aside>
|
||||
|
||||
Reference in New Issue
Block a user