-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapp.vue
96 lines (85 loc) · 2.06 KB
/
app.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<template>
<v-app id="appTop">
<div ref="appTop" tabindex="-1"></div>
<a class="skip-to-content-link" id="skip-link" ref="skipLink" href="#main">
Skip to content
</a>
<TheNav></TheNav>
<TheSidebar></TheSidebar>
<NuxtLoadingIndicator color="blue" />
<v-main class="markdown-body" style="min-height: 90vh !important" id="main">
<TheBreadcrumbBar v-if="!isHome"></TheBreadcrumbBar>
<NuxtPage></NuxtPage>
<div></div>
</v-main>
<div style="height: 75px"></div>
<TheFooter></TheFooter>
</v-app>
</template>
<script setup>
const { isTranslationEnabled } = useAppConfig();
const isHome = ref(true);
const route = useRoute();
const appTop = ref();
watchEffect(() => {
//TODO: SEO
const seoURL = ref("https://dvfr.illinois.gov" + route.path);
console.log("route.path: ", route.path);
console.log("seoURL: ", seoURL.value);
useSeoMeta({
ogUrl: () => `${seoURL.value}`,
ogType: "website",
twitterTitle: "Illinois Domestic Violence Fatality Review",
twitterDescription: "Illinois Domestic Violence Fatality Review (DVFR)",
twitterImage: "https://dvfr.icjia.dev/dvfr-splash-text-01.jpg",
twitterCard: "summary_large_image",
});
//TODO: a11y
// console.log("skipLink refocus:", appTop.value);
// if (appTop.value) {
// appTop.value.focus();
// }
if (route.path === "/") {
isHome.value = true;
} else {
isHome.value = false;
}
});
useHead({
htmlAttrs: {
lang: "en",
},
});
const page = useCurrentPage({ slug: "slug-here" });
</script>
<style>
.page-enter-active,
.page-leave-active {
transition: all 0.1s;
}
.page-enter-from,
.page-leave-to {
opacity: 0;
filter: blur(1rem);
}
/* TODO: a11y */
.skip-to-content-link {
left: 50%;
position: absolute;
transform: translateY(-100%);
}
.skip-to-content-link {
background: #2f1804;
color: #fff;
height: 50px;
left: 50%;
padding: 5px;
position: absolute;
transform: translateY(-100%);
transition: transform 0.3s;
z-index: 99999;
}
.skip-to-content-link:focus {
transform: translateY(0%);
}
</style>