diff --git a/src/components/Header.vue b/src/components/Header.vue index c81f837db5c89ea848735c296c5b74c2cfa5a1ac..add7d90232888e22b9117ba0c92b093c47d0319c 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; }