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
No related tags found
No related merge requests found
<template> <template>
<li class="definition" :id="'def' + body.id"> <li class="definition" :ref="'def' + body.id" :id="'def' + body.id">
<ul> <ul>
<li :is="element_wrapper.template" :body="element_wrapper.element" v-for="element_wrapper in template_name_added">{{element_wrapper.element}}</li> <li :is="element_wrapper.template" :body="element_wrapper.element" v-for="element_wrapper in template_name_added">{{element_wrapper.element}}</li>
</ul> </ul>
...@@ -37,6 +37,13 @@ var Definition = { ...@@ -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 ...@@ -46,4 +53,9 @@ export default Definition
li.quote { li.quote {
font-style: italic; font-style: italic;
} }
.highlighted {
background-color: #ddddff;
border-radius: 5px;
}
</style> </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