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

la til uttale

parent 8424c2a2
No related branches found
No related tags found
No related merge requests found
<template> <template>
<div class="article" v-show="article.lemmas.length"> <div class="article" v-show="article.lemmas.length">
<Header :lemmas="article.lemmas" /> <Header :lemmas="article.lemmas" />
<div class="" v-if="article.pronounciation.length">
<h3>Uttale</h3>
<ul>
<DefElement v-for="(element, index) in article.pronounciation" :key="index" :body='element' v-if="element.content" />
</ul>
</div>
<div class="" v-if="article.etymology"> <div class="" v-if="article.etymology">
<h3>Etymologi</h3> <h3>Etymologi</h3>
<ul> <ul>
<DefElement v-for="(element, index) in article.etymology" :key="index" :body='element' v-if="element.content" /> <DefElement v-for="(element, index) in article.etymology" :key="index" :body='element' v-if="element.content" />
</ul> </ul>
</div> </div>
<div class=""> <div class="">
<h3>Definisjoner</h3> <h3>Definisjoner</h3>
......
<template> <template>
<li :class="body.type"> <li :class="body.type">
<div> <span v-for="item in assemble_text" :class="item.type" v-html="item.html"></span>
<span v-for="item in assemble_text" :class="item.type" v-html="item.html"></span>
</div>
</li> </li>
</template> </template>
...@@ -21,6 +19,7 @@ export default { ...@@ -21,6 +19,7 @@ export default {
function(item){ function(item){
if (item.type == 'usage') return {type: item.type, html: item.text} if (item.type == 'usage') return {type: item.type, html: item.text}
else if (item.type == 'article_ref') return {type: item.type, html: `<a href="${item.article_id}${item.definition_id ? '#def'+item.definition_id : ''}">${item.lemmas.join(',')}</a>`} else if (item.type == 'article_ref') return {type: item.type, html: `<a href="${item.article_id}${item.definition_id ? '#def'+item.definition_id : ''}">${item.lemmas.join(',')}</a>`}
else if (item.type == 'pronounciation') return {type: item.type, html: item.string}
else if (item.id) return {type: item.type, html: entities[item.id] || languages[item.id] || item.id} else if (item.id) return {type: item.type, html: entities[item.id] || languages[item.id] || item.id}
else return {type: item.type || 'plain', html: item} else return {type: item.type || 'plain', html: item}
} }
...@@ -45,11 +44,13 @@ export default { ...@@ -45,11 +44,13 @@ export default {
<!-- Add "scoped" attribute to limit CSS to this component only --> <!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped> <style scoped>
span.usage { span.usage, span.pronounciation {
font-style: italic; font-style: italic;
} }
span.language { span.language {
font-weight: bold; font-weight: bold;
} }
</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