forked from bcgov/bcregistry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.vue
61 lines (54 loc) · 1.46 KB
/
default.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<template>
<v-app id="app">
<SbcHeader class="sbc-header" />
<!-- Alert banner -->
<v-alert
v-if="bannerText"
tile dense
type="warning"
class="mb-0 text-center color-dk-text"
v-html="bannerText"
/>
<Breadcrumb v-if="isShowBreadcrumb" />
<nuxt class="app-body" />
<SbcFooter />
</v-app>
</template>
<script lang="ts">
import SbcFooter from 'sbc-common-components/src/components/SbcFooter.vue'
import SbcHeader from 'sbc-common-components/src/components/SbcHeader.vue'
import Breadcrumb from '~/components/Breadcrumb.vue'
import { getFeatureFlag } from '~/utils'
import { isLoginRoute } from '@/utils'
export default {
components: {
SbcFooter,
SbcHeader,
Breadcrumb,
},
// initialize Keycloak before rendering any pages
middleware: ['initKeycloak'],
computed: {
isShowBreadcrumb (): boolean {
return !isLoginRoute()
},
bannerText (): string {
const bannerText: string = getFeatureFlag('banner-text')
// remove spaces so that " " becomes falsy
return bannerText?.trim()
}
},
}
</script>
<style lang="scss">
// this imports these SCSS file app-wide
@import '@/assets/scss/base.scss';
@import '@/assets/scss/layout.scss';
#warning-modal .row {
// it looks like the Vuetify used by NUXT sets row margins
// to -12px all around, which breaks the SbcHeader layout,
// so override top and bottom specifically here
margin-top: 0;
margin-bottom: 0;
}
</style>