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

minimalist expand button

parent a1ee642e
No related branches found
No related tags found
No related merge requests found
<template> <template>
<article v-bind:class="{'v-sheet v-card rounded-xl': !articleLookup, dictionary}" v-if="article"> <article v-bind:class="{'v-sheet v-card rounded-xl': !articleLookup, dictionary, 'collapsable': collapsable}" v-if="article">
<Header :lemmas="article.lemmas" :dictionary="dictionary" :article_id="article.article_id" /> <Header :lemmas="article.lemmas" :dictionary="dictionary" :article_id="article.article_id" />
<InflectionButton :lemmas="article.lemmas" :dictionary="dictionary" :article_id="article.article_id"/> <InflectionButton :lemmas="article.lemmas" :dictionary="dictionary" :article_id="article.article_id"/>
...@@ -253,4 +253,8 @@ ul li.definition { ...@@ -253,4 +253,8 @@ ul li.definition {
padding: 12px; padding: 12px;
} }
.collapsable {
padding-bottom: 38px;
}
</style> </style>
...@@ -23,15 +23,16 @@ ...@@ -23,15 +23,16 @@
</span> </span>
<span v-if="$parent.collapsed && $parent.has_content" class="definition_snippet"> <span v-if="$parent.collapsed && $parent.has_content" class="definition_snippet">
- {{$parent.snippet}} - {{$parent.snippet}}
</span> <span v-if="$parent.collapsable"> </span> <span v-if="$parent.collapsable" >
<v-btn <v-btn class="expand_icon"
text :title="$parent.collapsed? 'Vis mer' : 'Kollaps'"
small width="100%"
plain plain
class="expand_icon"
@click="$parent.collapsed=!$parent.collapsed">{{$parent.collapsed? 'Vis mer' : 'Kollaps'}} @click="$parent.collapsed=!$parent.collapsed">
<v-icon right color="primary">{{$parent.collapsed ? 'expand_more': 'expand_less'}}</v-icon></v-btn></span> <v-icon right>{{$parent.collapsed ? 'expand_more': 'expand_less'}}</v-icon></v-btn></span>
</div> </div>
</template> </template>
...@@ -201,4 +202,14 @@ div.lemma { ...@@ -201,4 +202,14 @@ div.lemma {
color: var(--v-text-base) !important; color: var(--v-text-base) !important;
} }
.expand_icon {
position: absolute;
bottom: 0px;
left: 0px;
width: 100%;
text-align: center;
border-bottom-right-radius: 28px;
border-bottom-left-radius: 28px;
}
</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