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

always show search toolbar in desktop version

parent ab53a1e8
No related branches found
No related tags found
No related merge requests found
<template> <template>
<div> <div>
<v-card v-if="$store.state.showSearchToolbar" rounded="xl"> <v-card v-if="$vuetify.breakpoint.smAndDown" rounded="xl">
<v-container fluid v-if="expanded || $vuetify.breakpoint.mdAndUp"> <v-list two-line v-if="expanded">
<v-row > <v-list-item>
<v-col :cols="$vuetify.breakpoint.smAndDown ? 12 : 3">
<v-autocomplete <v-autocomplete
auto-select-first auto-select-first
clearable clearable
v-model="$parent.pos_selected" v-model="$parent.pos_selected"
hide-details hide-details
:menu-props="{ offsetY: true }" :menu-props="{ offsetY: true }"
:dense="$vuetify.breakpoint.smAndDown" placeholder="Ordklasse"
label="Ordklasse"
:items="pos_items" :items="pos_items"
append-icon="expand_more" append-icon="expand_more"
@input="updatePos"> @input="updatePos">
</v-autocomplete> </v-autocomplete>
</v-col> </v-list-item>
<v-col :cols="$vuetify.breakpoint.smAndDown ? 12 : 3"> <v-list-item>
<v-checkbox <v-checkbox
v-model="inflected_results" v-model="inflected_results"
:dense="$vuetify.breakpoint.smAndDown" hide-details=""
label="Vis bøyde former"/> label="Vis bøyde former"/>
</v-list-item>
</v-col> <v-list-item>
<v-col :cols="$vuetify.breakpoint.smAndDown ? 12 : 3">
<v-checkbox <v-checkbox
v-model="fulltext" v-model="fulltext"
:dense="$vuetify.breakpoint.smAndDown" hide-details
label="Fulltekstsøk"/> label="Fritekstsøk"/>
</v-col> </v-list-item>
</v-row>
</v-list>
</v-container>
<v-btn v-if="$vuetify.breakpoint.smAndDown" <v-btn v-if="$vuetify.breakpoint.smAndDown"
class="search_options" class="search_options"
v-bind:class="{'expanded': expanded}" v-bind:class="{'expanded': expanded}"
x-small x-small
rounded rounded
text text
@click="expanded=!expanded"> @click="expanded=!expanded">
{{expanded? '' : 'Søkealternativer'}}<v-icon small :right="!expanded">{{expanded ? 'expand_less': 'expand_more'}}</v-icon></v-btn> {{expanded? '' : 'Søkealternativer'}}<v-icon small :right="!expanded">{{expanded ? 'expand_less': 'expand_more'}}</v-icon></v-btn>
</v-card> </v-card>
<div v-else> <div class="desktop_toolbar" v-else>
<span>
<v-checkbox <v-checkbox
class="single_checkbox"
v-model="fulltext" v-model="fulltext"
dense dense
hide-details hide-details
label="Fulltekstsøk"/> label="Fritekstsøk"/>
</span>
<span>
<v-checkbox
v-model="inflected_results"
dense
hide-details
label="Vis bøyde former"/>
</span>
<span>
<v-autocomplete
auto-select-first
clearable
v-model="$parent.pos_selected"
hide-details
:menu-props="{ offsetY: true }"
dense
placeholder="Ordklasse"
:items="pos_items"
append-icon="expand_more"
@input="updatePos">
</v-autocomplete>
</span>
</div> </div>
</div> </div>
</template> </template>
...@@ -123,10 +143,8 @@ export default { ...@@ -123,10 +143,8 @@ export default {
<style scoped> <style scoped>
.v-card { .v-card {
padding-top: 10px !important; padding-top: 0px !important;
padding-left: 24px !important; padding-bottom: 24px !important;
padding-right: 24px !important;
padding-bottom: 10px !important;
padding-top: 10px; padding-top: 10px;
margin-top: 10px; margin-top: 10px;
margin-right: 10px; margin-right: 10px;
...@@ -134,6 +152,11 @@ export default { ...@@ -134,6 +152,11 @@ export default {
min-height: 36px; min-height: 36px;
} }
.v-list-item {
padding-left: 24px;
padding-right: 24px;
}
.search_options { .search_options {
position: absolute; position: absolute;
min-height: 36px; min-height: 36px;
...@@ -153,9 +176,18 @@ export default { ...@@ -153,9 +176,18 @@ export default {
min-height: 24px; min-height: 24px;
} }
.single_checkbox {
.desktop_toolbar {
display: flex;
padding-left: 10px; padding-left: 10px;
margin-left: 10px; margin-left: 10px;
padding-right: 10px;
margin-right: 10px;
gap: 24px;
}
.desktop_toolbar v-combobox {
width: 300px;
} }
</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