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

re meta#300 bøyningsboksene mer som i prototype, scroller finere, ikke fokus på bøyningsknapp

parent 929bd23a
No related branches found
No related tags found
No related merge requests found
...@@ -4,15 +4,17 @@ ...@@ -4,15 +4,17 @@
<h2 class="article_header">{{header_text}}</h2> <h2 class="article_header">{{header_text}}</h2>
{{group_list}} {{group_list}}
<details :title="inflect_tooltip" @toggle="toggle()" v-if="group_list" :class="$vuetify.breakpoint.name"> <details :title="inflect_tooltip" @toggle="toggle()" v-if="group_list" :class="$vuetify.breakpoint.name">
<summary :class="dictionary">bøying</summary> <summary :class="dictionary" onclick="this.blur()">bøying</summary>
<div class="inflection"> <div class="inflection-wrapper">
<div v-for="(lemma, index) in inflection_groups_by_lemma" :key="index"> <div class="inflection">
<h4>{{lemma.lemma}}</h4> <div v-for="(lemma, index) in inflection_groups_by_lemma" :key="index">
<component v-for="grp in Object.keys(lemma.inflection_groups)" <h4>{{lemma.lemma}}</h4>
:key="grp.replace('/', '_')" <component v-for="grp in Object.keys(lemma.inflection_groups)"
:is="grp.replace('/', '_')" :key="grp.replace('/', '_')"
:dictionary="dictionary" :is="grp.replace('/', '_')"
:standardisations="lemma.inflection_groups[grp]"></component> :dictionary="dictionary"
:standardisations="lemma.inflection_groups[grp]"></component>
</div>
</div> </div>
</div> </div>
</details> </details>
...@@ -135,6 +137,7 @@ article h2 { ...@@ -135,6 +137,7 @@ article h2 {
details { details {
margin-top: 10px; margin-top: 10px;
position: relative;
} }
details > summary { details > summary {
...@@ -198,13 +201,16 @@ details[open] summary ~ * { ...@@ -198,13 +201,16 @@ details[open] summary ~ * {
animation: open 0.3s ease-in-out; animation: open 0.3s ease-in-out;
} }
.inflection { .inflection-wrapper {
color: var(--v-primary-base); padding:20px;
background-color: #ffffff;
margin-top: 5px;
overflow: scroll; overflow: scroll;
position: absolute;
z-index: 10;
background-color: rgba(255, 255, 255, 0);
max-width: 100vw;
} }
.inflection table { .inflection table {
border-collapse: collapse; border-collapse: collapse;
margin: 10px; margin: 10px;
...@@ -222,12 +228,21 @@ details > summary::-webkit-details-marker { ...@@ -222,12 +228,21 @@ details > summary::-webkit-details-marker {
display: none; display: none;
} }
details > div { .inflection {
border-radius: 0 0 10px 10px; color: var(--v-primary-base);
background-color: #eee; margin-top: 5px;
padding: 2px 6px; background-color: #ffffff;
margin: 0; width: max-content;
box-shadow: 3px 3px 4px black; border-radius: 30px;
padding: 10px;
margin-top: 10px;
border-style: solid;
border-width: 1px;
border-color: var(--primary-base)
}
article:not(.righ_hand_column) .inflection-wrapper {
left: -35px;
} }
</style> </style>
...@@ -3,13 +3,20 @@ ...@@ -3,13 +3,20 @@
<div class="flex-container" :class="$vuetify.breakpoint.name"> <div class="flex-container" :class="$vuetify.breakpoint.name">
<ul class="hits" v-if="results_bob.length"> <ul class="hits" v-if="results_bob.length">
<li class="article_container" v-for="(result, index) in results_bob" :key="index + results_hash"> <li class="article_container" v-for="(result, index) in results_bob" :key="index + results_hash">
<Article :article="result" @article-click="article_link_click" @details-click="details_click"> <Article
:article="result"
@article-click="article_link_click"
@details-click="details_click">
</Article> </Article>
</li> </li>
</ul> </ul>
<ul class="hits" v-if="results_nob.length"> <ul class="hits" v-if="results_nob.length">
<li class="article_container" v-for="(result, index) in results_nob" :key="index + results_hash"> <li class="article_container" v-for="(result, index) in results_nob" :key="index + results_hash">
<Article :article="result" @article-click="article_link_click" @details-click="details_click"> <Article
:article="result"
@article-click="article_link_click"
@details-click="details_click"
:class="right_col_class_name">
</Article> </Article>
</li> </li>
</ul> </ul>
...@@ -27,6 +34,14 @@ export default { ...@@ -27,6 +34,14 @@ export default {
lang: String lang: String
}, },
computed: { computed: {
right_col_class_name: function() {
if (this.$vuetify.breakpoint.mdAndUp) {
if (this.results_bob.length) {
return 'righ_hand_column'
}
}
return ''
},
results_bob: function(){ results_bob: function(){
return this.hits.filter(hit => hit.dictionary == 'bob') return this.hits.filter(hit => hit.dictionary == 'bob')
}, },
...@@ -111,4 +126,8 @@ export default { ...@@ -111,4 +126,8 @@ export default {
top:40px; top:40px;
background:linear-gradient(rgba(255, 255, 255, 0) 0px, var(--v-tertiary-base)); background:linear-gradient(rgba(255, 255, 255, 0) 0px, var(--v-tertiary-base));
} }
article.righ_hand_column div.inflection-wrapper {
right: -35px;
}
</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