Skip to content
Snippets Groups Projects
Commit 8424c2a2 authored by Ole Voldsæter's avatar Ole Voldsæter
Browse files

fikk skikk på utheving av definisjoner

parent ff2c07fd
No related branches found
Tags release_2021-11-24
No related merge requests found
<template>
<li class="definition" :id="'def' + body.id">
<li class="definition" :ref="'def' + body.id" :id="'def' + body.id">
<ul>
<li :is="element_wrapper.template" :body="element_wrapper.element" v-for="element_wrapper in template_name_added">{{element_wrapper.element}}</li>
</ul>
......@@ -37,6 +37,13 @@ var Definition = {
}
})
}
},
mounted: function() {
let ref = 'def' + this.body.id
if(location.hash.substring(1) == ref){
this.$refs[ref].scrollIntoView()
this.$refs[ref].classList.add('highlighted')
}
}
}
......@@ -46,4 +53,9 @@ export default Definition
li.quote {
font-style: italic;
}
.highlighted {
background-color: #ddddff;
border-radius: 5px;
}
</style>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment