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

homografnummer (unntatt søkeresultater)

parent 696de454
No related branches found
No related tags found
No related merge requests found
<template>
<li :class="body.type_">
<span v-for="(item, index) in assemble_text"
<li :class="body.type_"><!--
--><span v-for="(item, index) in assemble_text"
:class="item.type_"
:key="index">
{{item.html}}
<router-link v-if="item.type == 'article_ref'" :to="item.ref" @click.native="article_link_click(item)" v-html="item.label">
</router-link>
</span>
</li>
:key="index"><!--
-->{{item.html}}<!--
--><router-link v-if="item.type == 'article_ref'" :to="item.ref" @click.native="article_link_click(item)"><!--
--><span class="homograph" :key="index">{{item.lemmas[0].hgno ? String.fromCharCode(0x215f + item.lemmas[0].hgno) + ' ' : ''}}</span>{{item.lemmas[0].lemma}} {{item.definition_order ? ` (${item.definition_order})` : ''}}<!--
--></router-link><!--
--></span></li>
</template>
<script>
......@@ -27,10 +27,11 @@ export default {
else if (item.type_ == 'article_ref') return {
type: item.type_,
html: '',
label: item.lemmas.join(',') + (item.definition_order ? ` (${item.definition_order})` : ''),
lemmas: item.lemmas,
ref: item.article_id + (item.definition_id ? '#def' + item.definition_id : ''),
article_id: item.article_id,
definition_id: item.definition_id
definition_id: item.definition_id,
definition_order: item.definition_order
}
else if (item.type_ == 'pronunciation') return {type: item.type_, html: item.string}
else if (item.id) return {type: item.type_, html: entities[item.id] || languages[item.id] || item.id}
......@@ -70,5 +71,8 @@ span.language {
font-weight: bold;
}
.homograph {
font-family: serif;
}
</style>
<template>
<VueTooltipster :showClosebutton="false">
<h1>{{header_text}} </h1><span class="word-classification">{{group_list}}</span>
<h1 v-for="(lemma, index) in lemmas" :key="index">
<span class="homograph">{{lemma.hgno ? String.fromCharCode(0x215f + lemma.hgno) : ''}}</span>
{{lemma.lemma}} </h1>
<span class="word-classification">{{group_list}}</span>
<div slot="content" class="tooltip">
<div v-for="(lemma, index) in lemmas" :key="index">
<h4>{{lemma.lemma}}</h4>
......@@ -30,13 +33,6 @@ export default {
lemmas: Array
},
computed: {
header_text: function() {
return this.lemmas.map(
function(item){
return item.lemma
}
).join(', ')
},
group_list: function() {
return helpers.group_list(this.lemmas)
}
......@@ -68,6 +64,11 @@ h1 {
margin: 10px;
}
.homograph {
font-size: smaller;
font-weight: normal;
}
.tooltip td, .tooltip th {
border: solid;
border-width: 1px;
......
......@@ -36,7 +36,7 @@ export default {
entities[item.id] ||
languages[item.id] ||
item.id ||
(item.lemmas || []).join(',')).reverse()
item.lemmas[0].lemma).reverse()
let replacement = () => replacements.pop()
......
......@@ -3,7 +3,6 @@
<h2 v-if="hits.length">Søkeresultater</h2>
<ul class="hits">
<Preview v-for="(result, index) in hits" :key="index" :searchHit="result" @click.native="article_link_click(result._source)">
</Preview>
</ul>
</section>
......
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