Skip to content
Snippets Groups Projects
Commit 24c42505 authored by Henrik Askjer's avatar Henrik Askjer
Browse files

cleanup

parent 56de524c
No related branches found
No related tags found
No related merge requests found
...@@ -64,9 +64,6 @@ export default { ...@@ -64,9 +64,6 @@ export default {
}); });
return a_forms.join(', ') return a_forms.join(', ')
}, },
inflect_tooltip: function() {
return this.dictionary == 'bm' ? 'Klikk for å se bøyinger' : 'Klikk for å sjå bøyingar'
},
dict_label: function() { dict_label: function() {
return { return {
'bm': 'bokmålsordboka', 'bm': 'bokmålsordboka',
...@@ -93,15 +90,6 @@ export default { ...@@ -93,15 +90,6 @@ export default {
}) })
return hgnos.join(", ") return hgnos.join(", ")
}, },
inflection_button_text: function() {
return {
"bm": {false: "Se bøyning", true: "Skjul bøyning"},
"nn": {false: "Sjå bøying", true: "Skjul bøying"}
}[this.dictionary][this.inflection_expanded]
},
inflection_arrow: function() {
return this.inflection_expanded? "expand_less" : "expand_more"
},
group_list: function() { group_list: function() {
return helpers.group_list(this.lemmas, this.dictionary) return helpers.group_list(this.lemmas, this.dictionary)
}, },
...@@ -142,13 +130,6 @@ export default { ...@@ -142,13 +130,6 @@ export default {
} }
) )
}, },
lemmas_with_word_class_and_lang: function() {
return this.lemmas.map(lemma => Object.assign({language: this.dictionary == 'bm' ? 'nob' : 'nno',
word_class: lemma.paradigm_info[0].inflection_group.split('_')[0]}, lemma))
},
inflected: function() {
return this.lemmas.reduce((acc, lemma) => acc += lemma.paradigm_info.reduce((acc2, digm) => acc2 += digm.inflection.length, 0), 0) > 0
},
split_inf: function() { split_inf: function() {
return this.lemmas[0].split_inf return this.lemmas[0].split_inf
} }
...@@ -158,19 +139,7 @@ export default { ...@@ -158,19 +139,7 @@ export default {
}, },
data: function() { data: function() {
return { return {
inflect_reported: false,
menu: false, menu: false,
inflection_expanded: false
}
},
methods: {
toggle: function() {
this.inflection_expanded = !this.inflection_expanded
if (! this.inflect_reported) {
this.$plausible.trackEvent('open inflection', {props: {article: `/${this.dictionary}/${this.article_id}/${this.lemmas[0].lemma}`}})
}
this.inflect_reported = true
} }
} }
} }
...@@ -214,86 +183,12 @@ article h2.secondary_header { ...@@ -214,86 +183,12 @@ article h2.secondary_header {
} }
.show-inflection .v-icon {
color: var(--v-primary-base) !important;
}
.inflection-arrow {
position: absolute;
right: -4px;
margin-left: 3px;
font-size: 10px;
}
@keyframes open {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.inflection-canvas {
overflow-x: auto;
/*position: absolute;*/
z-index: 5;
background-color: rgba(255, 255, 255, 0);
/*max-width: 100vw;*/
padding-top: 10px;
}
.inflection-wrapper {
color: var(--v-text-base);
width: min-content;
font-size: 14px;
overflow-x: auto;
margin-top: 10px;
}
#search_results .xs .inflection-wrapper, #search_results .sm .inflection-wrapper {
display: none;
}
.context {
color: var(--v-primary-lighten4) !important;
}
div.lemma { div.lemma {
display: none; display: none;
} }
table {
border-collapse: collapse;
margin-top: 5px;
border-color: var(--v-primary-base);
}
th, td {
border: solid 1px;
padding: 5px;
}
th {
background-color: var(--v-button-base);
}
.infl-label {
text-align: center;
vertical-align: top;
}
article:not(.righ_hand_column) .inflection-canvas {
left: -35px;
}
td.hilite {
background-color: var(--v-tertiary-base);
text-align: center
}
.article_header { .article_header {
display: flex; display: flex;
......
...@@ -27,21 +27,6 @@ export default { ...@@ -27,21 +27,6 @@ export default {
article_id: Number article_id: Number
}, },
computed: { computed: {
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() { inflect_tooltip: function() {
return this.dictionary == 'bm' ? 'Klikk for å se bøyinger' : 'Klikk for å sjå bøyingar' return this.dictionary == 'bm' ? 'Klikk for å se bøyinger' : 'Klikk for å sjå bøyingar'
}, },
...@@ -108,7 +93,6 @@ export default { ...@@ -108,7 +93,6 @@ export default {
data: function() { data: function() {
return { return {
inflect_reported: false, inflect_reported: false,
menu: false,
inflection_expanded: false inflection_expanded: false
} }
}, },
...@@ -127,47 +111,10 @@ export default { ...@@ -127,47 +111,10 @@ export default {
</script> </script>
<style> <style>
article h2 {
padding-top: 4px;
padding-bottom: 0px;
font-family: Inria Serif;
font-size: 30px;
}
article h2.secondary_header {
padding-top: 0px;
padding-bottom: 4px;
}
.info-button {
margin-left: 6px;
margin-right: -2px;
height: 10px;
width: 10px;
}
.word-classification {
text-decoration: underline dashed;
}
.dict-label {
color: var(--v-primary-base) ;
font-weight: bold;
padding-left: 5px;
position: absolute;
top: 0px;
left: 15px;
font-variant-caps: all-small-caps;
}
.show-inflection .v-icon { .show-inflection .v-icon {
color: var(--v-primary-base) !important; color: var(--v-primary-base) !important;
} }
.inflection-arrow { .inflection-arrow {
position: absolute; position: absolute;
right: -4px; right: -4px;
...@@ -238,19 +185,9 @@ article:not(.righ_hand_column) .inflection-canvas { ...@@ -238,19 +185,9 @@ article:not(.righ_hand_column) .inflection-canvas {
left: -35px; left: -35px;
} }
td.hilite { td.hilite {
background-color: var(--v-tertiary-base); background-color: var(--v-tertiary-base);
text-align: center text-align: center
} }
.article_header {
display: flex;
align-items: baseline;
}
.hgno {
padding-left: 3px;
}
</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