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

re meta#288 bruker vuetify sin innebygde mq-støtte

parent 271cc042
No related branches found
No related tags found
No related merge requests found
This diff is collapsed.
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
"vue": "^2.6.11", "vue": "^2.6.11",
"vue-awesome": "^3.5.4", "vue-awesome": "^3.5.4",
"vue-material-design-icons": "^4.11.0", "vue-material-design-icons": "^4.11.0",
"vue-mq": "^1.0.1",
"vue-plausible": "^1.0.0", "vue-plausible": "^1.0.0",
"vue-router": "^3.4.1", "vue-router": "^3.4.1",
"vuetify": "^2.4.0" "vuetify": "^2.4.0"
......
...@@ -63,6 +63,10 @@ p.about-link { ...@@ -63,6 +63,10 @@ p.about-link {
float: right; float: right;
} }
header > p {
padding: 3px;
}
header > p > a { header > p > a {
color: var(--v-tertiary-base) !important; color: var(--v-tertiary-base) !important;
text-decoration: none; text-decoration: none;
......
...@@ -11,7 +11,8 @@ ...@@ -11,7 +11,8 @@
grensesnittet og i dataene våre. Det betyr at det kan være feil og mangler grensesnittet og i dataene våre. Det betyr at det kan være feil og mangler
i den nye løsningen vi ikke har oppdaget ennå, eller ikke har hatt tid til i den nye løsningen vi ikke har oppdaget ennå, eller ikke har hatt tid til
å få på plass. Dersom du oppdager noe som er feil eller mangelfullt vil vi å få på plass. Dersom du oppdager noe som er feil eller mangelfullt vil vi
gjerne ha tilbakemelding om det! Kontakt oss gjerne på <router-link to="mailto:ordbok@uib.no">ordbok@uib.no.</router-link></p> gjerne ha tilbakemelding om det! Kontakt oss gjerne på
<router-link to="mailto:ordbok@uib.no">ordbok@uib.no.</router-link></p>
...@@ -24,4 +25,8 @@ ...@@ -24,4 +25,8 @@
padding-left: calc((100vw - 1000px) / 2); padding-left: calc((100vw - 1000px) / 2);
padding-right: calc((100vw - 1000px) / 2); padding-right: calc((100vw - 1000px) / 2);
} }
h2, p {
padding: 3px;
}
</style> </style>
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
:items="items" :items="items"
:search-input.sync="search" :search-input.sync="search"
item-text="label" item-text="label"
:menu-props="{maxHeight: $mq === 'mobile' ? 250 : 500, transition: 'fade-transition'}" :menu-props="{maxHeight: $vuetify.breakpoint.name === 'xs' ? 250 : 500, transition: 'fade-transition'}"
prepend-inner-icon="search" prepend-inner-icon="search"
append-icon="undefined" append-icon="undefined"
return-object return-object
...@@ -107,5 +107,6 @@ ...@@ -107,5 +107,6 @@
.autocomplete-container { .autocomplete-container {
max-width: 500px; max-width: 500px;
padding-left: 3px;
} }
</style> </style>
...@@ -9,25 +9,21 @@ ...@@ -9,25 +9,21 @@
<v-radio value="bob,nob" color="secondary"> <v-radio value="bob,nob" color="secondary">
<template v-slot:label> <template v-slot:label>
<span> <span>
<mq-layout mq="mobile">begge</mq-layout> begge{{$vuetify.breakpoint.smAndDown ? '' : ' ordbøkene'}}
<mq-layout mq="tablet">begge</mq-layout>
<mq-layout mq="laptop+">begge ordbøkene</mq-layout>
</span> </span>
</template> </template>
</v-radio> </v-radio>
<v-radio value="bob" color="secondary"> <v-radio value="bob" color="secondary">
<template v-slot:label> <template v-slot:label>
<span> <span>
<mq-layout mq="mobile">bm</mq-layout> {{$vuetify.breakpoint.xs ? 'bm' : 'bokmål (bm)'}}
<mq-layout mq="tablet+">bokmål (bm)</mq-layout>
</span> </span>
</template> </template>
</v-radio> </v-radio>
<v-radio value="nob" color="secondary"> <v-radio value="nob" color="secondary">
<template v-slot:label> <template v-slot:label>
<span> <span>
<mq-layout mq="mobile">nn</mq-layout> {{$vuetify.breakpoint.xs ? 'nn' : 'nynorsk (nn)'}}
<mq-layout mq="tablet+">nynorsk (nn)</mq-layout>
</span> </span>
</template> </template>
</v-radio> </v-radio>
...@@ -44,7 +40,7 @@ ...@@ -44,7 +40,7 @@
<Article :key="article_key" :article="article" @article-click="article_link_click" /> <Article :key="article_key" :article="article" @article-click="article_link_click" />
</div> </div>
<div class="welcome" v-if="! (article || error || search_results.length || waiting)"> <div class="welcome" v-if="! (article || error || search_results.length || waiting)">
<div class="monthly" :class="$mq"> <div class="monthly" :class="$vuetify.breakpoint.name">
<div> <div>
<Article :article="monthly_bm" @article-click="article_link_click" /> <Article :article="monthly_bm" @article-click="article_link_click" />
</div> </div>
...@@ -304,7 +300,7 @@ div.monthly > div { ...@@ -304,7 +300,7 @@ div.monthly > div {
flex: 50%; flex: 50%;
} }
div.monthly.tablet, div.monthly.mobile { div.monthly.sm, div.monthly.xs {
flex-direction: column; flex-direction: column;
} }
...@@ -319,13 +315,16 @@ div.monthly article.nob .dict-label::before { ...@@ -319,13 +315,16 @@ div.monthly article.nob .dict-label::before {
.search_container { .search_container {
max-width: 1500px; max-width: 1500px;
padding-top: 10px;
} }
.v-label span { .v-label span {
color: var(--v-primary-base); color: var(--v-primary-base);
} }
.lang_select_container {
padding-left: 3px;
}
li.suggestion { li.suggestion {
font-weight: bold; font-weight: bold;
padding-left: 20px; padding-left: 20px;
......
<template> <template>
<section id="search_results"> <section id="search_results">
<div class="flex-container" :class="$mq"> <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"> <Article :article="result" @article-click="article_link_click">
...@@ -63,7 +63,7 @@ export default { ...@@ -63,7 +63,7 @@ export default {
display: flex; display: flex;
} }
.flex-container.mobile, .flex-container.tablet { .flex-container.xs, .flex-container.sm {
flex-direction: column; flex-direction: column;
} }
......
...@@ -6,21 +6,12 @@ import DictionaryView from './components/DictionaryView.vue' ...@@ -6,21 +6,12 @@ import DictionaryView from './components/DictionaryView.vue'
import VueRouter from 'vue-router' import VueRouter from 'vue-router'
import { VuePlausible } from 'vue-plausible' import { VuePlausible } from 'vue-plausible'
import vuetify from './plugins/vuetify' import vuetify from './plugins/vuetify'
import VueMq from 'vue-mq'
Vue.config.productionTip = false Vue.config.productionTip = false
Vue.use(VueRouter) Vue.use(VueRouter)
Vue.use(VuePlausible, { Vue.use(VuePlausible, {
domain: 'beta.ordbok.uib.no' domain: 'beta.ordbok.uib.no'
}) })
Vue.use(VueMq, {
breakpoints: {
mobile: 470,
tablet: 700,
laptop: 1250,
desktop: Infinity
}
})
Vue.$plausible.enableAutoPageviews() Vue.$plausible.enableAutoPageviews()
......
...@@ -5,6 +5,15 @@ import Vuetify from 'vuetify/lib/framework'; ...@@ -5,6 +5,15 @@ import Vuetify from 'vuetify/lib/framework';
Vue.use(Vuetify); Vue.use(Vuetify);
export default new Vuetify({ export default new Vuetify({
breakpoint: {
thresholds: {
xs: 470,
sm: 700,
md: 1250,
lg: 1900,
},
scrollBarWidth: 24,
},
theme: { theme: {
options: { options: {
customProperties: true customProperties: true
......
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