Newer
Older

Ole Voldsæter
committed
<div class="" v-if="article.body.pronunciation.length">
<DefElement v-for="(element, index) in article.body.pronunciation" :key="index" :body='element' />

Ole Voldsæter
committed
<div class="" v-if="article.body.etymology">
<DefElement v-for="(element, index) in article.body.etymology" :key="index" :body='element' />
</ul>
</div>
<div class="">
<h3>Definisjoner</h3>

Ole Voldsæter
committed
<Definition v-for="(definition, index) in definitions" :key="index" :body='definition' />
import Definition from './Definition.vue'

Ole Voldsæter
committed
},
computed: {
definitions: function() {
let defs = this.article.body.definitions
if (defs.length == 1) {
let types = defs[0].elements.reduce((acc, toAdd)=>acc.add(toAdd.type_), new Set())
if (types.size == 1 && types.has('definition')) {
return defs[0].elements
}
}
return defs
}
}
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
//color: #42b983;
}
ol > li {
padding-bottom: 2em;
}
ul {
padding-top: 8px;
}
ul li {
list-style:none;
}
li ul .definition ul {
}
ul li.definition {
list-style: disc;