-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathapp.vue
58 lines (48 loc) · 1.25 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
<template>
<div class="wrapper" :class="bgColor">
<Main />
<Footer />
</div>
</template>
<script setup lang="ts">
import shouldIDeploy from "./server/utils/shouldIDeploy";
const getOpenGraphImage = (shouldDeploy: boolean) =>
"https://devodeployar.dev" + (shouldDeploy ? "/yes.png" : "/no.png");
const date = new Date();
const title = "🚀 Devo deployar hoje?";
const description = "🔥 Seu amigo nessa decisão difícil";
const siteName = "https://devodeployar.dev";
const shouldDeploy = shouldIDeploy(date);
const image = getOpenGraphImage(shouldDeploy);
useServerSeoMeta({
title,
ogTitle: title,
twitterTitle: title,
ogSiteName: siteName,
twitterSite: siteName,
description,
ogDescription: description,
twitterDescription: description,
ogImage: image,
twitterImage: image,
twitterCard: "summary_large_image",
});
useHead({
link: [
{
rel: "icon",
type: "image/x-icon",
href: shouldDeploy ? "/yes.ico" : "/no.ico",
},
],
});
type BackgroundColor = "should-deploy-bg" | "should-not-deploy-bg";
const bgColor: BackgroundColor = shouldDeploy
? "should-deploy-bg"
: "should-not-deploy-bg";
</script>
<style lang="postcss">
.wrapper {
@apply font-sans grid place-items-center grid-rows-[1fr_auto] min-h-screen text-center mx-auto;
}
</style>