From 7c9cef25a8dcacd1fbdd7910d6fcceef18f50c92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Volds=C3=A6ter?= <ole.voldsater@uib.no> Date: Fri, 18 Jun 2021 10:35:02 +0200 Subject: [PATCH] fikser meta#382 --- src/components/Header.vue | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/components/Header.vue b/src/components/Header.vue index c81f837d..add7d902 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -2,6 +2,7 @@ <template> <div> <h2 class="article_header">{{header_text}}</h2> + <h2 class="secondary_header" v-if="secondary_header_text.length">{{secondary_header_text}}</h2> {{group_list}} <details :title="inflect_tooltip" @toggle="toggle()" v-if="inflected" :class="$vuetify.breakpoint.name"> <summary :class="dictionary" onclick="this.blur()">bøying</summary> @@ -30,6 +31,18 @@ export default { header_text: function() { return this.lemmas.map(lemma => lemma.lemma).join(', ') }, + secondary_header_text: function() { + let a_forms = [] + this.lemmas.forEach((lemma, i) => { + if (lemma.paradigm_info[0] && lemma.paradigm_info[0].inflection_group == 'VERB') { + let inf2 = lemma.paradigm_info[0].inflection[1] && lemma.paradigm_info[0].inflection[1].word_form + if (inf2 && inf2.length) { + a_forms.push(inf2) + } + } + }); + return a_forms.join(', ') + }, inflect_tooltip: function() { return this.dictionary == 'bob' ? 'Klikk for å se bøyinger' : 'Klikk for å sjå bøyingar' }, @@ -95,11 +108,17 @@ summary { } article h2 { - padding: 4px; + padding-top: 4px; + padding-bottom: 0px; font-family: Inria Serif; font-size: 30px; } +article h2.secondary_header { + padding-top: 0px; + padding-bottom: 4px; +} + .word-classification { text-decoration: underline dashed; } -- GitLab