Skip to content
Snippets Groups Projects
Commit 1afbe7f4 authored by Paul Meurer's avatar Paul Meurer
Browse files

responsive footer

parents 589465b1 9dd277db
No related branches found
No related tags found
No related merge requests found
......@@ -56,11 +56,10 @@ export default {
ref: '/' + lang + '/' + item.article_id + '/' + encodeURIComponent(item.word_form || item.lemmas[0].lemma) + (item.definition_id ? '#def' + item.definition_id : ''),
article_id: item.article_id,
definition_id: item.definition_id,
definition_order: item.definition_order,
source: path
}
else if (item.type_ == 'pronunciation') return {type: item.type_, html: item.string}
else if (item.type_ == 'pronunciation_guide') return {type: 'pronunciation_guide', html: replace_grammar_id(item, lang)}
else if (item.type_ == 'pronunciation_guide') return {type: item.type_, body: item, html: '', tag: 'DefElement', props: {body: item, tag: 'i', dictionary: lang}}
else if (item.type_ == 'superscript') return {type: item.type_, html: item.text, tag: 'sup'}
else if (item.type_ == 'subscript') return {type: item.type_, html: item.text, 'tag': 'sub'}
else if (item.type_ == 'quote_inset') return {type: item.type_, body: item, html: '', tag: 'DefElement', props: {body: item, tag: 'i', dictionary: lang}}
......
......@@ -2,7 +2,7 @@
<main>
<div class="search_container">
<div class="lang_select_container">
<v-radio-group row v-model="lang">
<v-radio-group row v-model="lang" @change="update_lang_form">
<template v-slot:label>
<span>VIS</span>
</template>
......@@ -37,6 +37,7 @@
</div>
<SearchResults :hits="search_results"
:lang="lang"
:key="lang"
@article-click="article_link_click"
@details-click="details_click"
v-if="search_results.length && ! waiting && ! article" />
......@@ -177,7 +178,8 @@ export default {
article: null,
error: null,
monthly_bm: null,
monthly_nn: null
monthly_nn: null,
event: null
}
},
computed: {
......@@ -195,6 +197,7 @@ export default {
},
methods: {
select_result: function(event) {
this.event = event
if(event.articles){
let source = '/' + this.lang + '/w/' + event.word
this.$router.push(source)
......@@ -211,6 +214,15 @@ export default {
this.$plausible.trackEvent('dropdown selection', {props: {query: event.label, match: '<fritekstsøk>'}})
}
},
update_lang_form: function(event) {
if (this.event){
this.event.articles = null
this.select_result(this.event)
}
else{
navigate_to_search(this, this.$router.history.current.params.word || this.$router.history.current.params.query)
}
},
article_link_click: function(item) {
if (this.article && this.article.article_id == item.article_id){
this.article_key++
......
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