-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathFooter.vue
51 lines (49 loc) · 2.1 KB
/
Footer.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
<script setup lang="ts">
import siteConfig from '~/site.config'
import { isPluginEnabled } from '~/helpers'
import { useSubstackNewsletterConfig } from '~/plugins/substack/hooks'
const isDonationPluginEnabled = computed(() => isPluginEnabled('donation'))
const { isSubstackNewsletterPluginEnabled, substackNewsletterConfig } = useSubstackNewsletterConfig(siteConfig)
</script>
<template>
<footer>
<div class="grid grid-cols-2 space-y-6 mb-3">
<div v-if="isSubstackNewsletterPluginEnabled" class="flex items-center justify-center col-span-2 lg:col-span-1">
<SubstackNewsletter v-bind="substackNewsletterConfig" />
</div>
<div v-if="isDonationPluginEnabled" class="flex flex-wrap items-center justify-center space-x-4 space-y-4 col-span-2 lg:col-span-1">
<Donation />
</div>
<div class="flex flex-wrap items-center justify-center space-x-4 col-span-2">
<div class="mb-3">
<Link href="/">
<Icon icon="bi:house-heart-fill" :width="32" :height="32" />
</Link>
</div>
<ThemeSwitcher :size="24" class="mb-3" />
<LocaleSwitcher :size="24" class="mb-3" />
<div class="hidden sm:block">
{{ ` • ` }}
</div>
<SocialIcon v-for="(networkProfile, network) in siteConfig.socialNetworks" :key="network" :kind="network" :href="networkProfile" class="mb-3 hidden sm:block" />
</div>
<div class="sm:hidden flex flex-wrap items-center justify-center space-x-4 col-span-2">
<SocialIcon v-for="(networkProfile, network) in siteConfig.socialNetworks" :key="network" :kind="network" :href="networkProfile" class="mb-3" />
</div>
<div class="flex items-center justify-center space-x-2 text-sm text-gray-500 dark:text-gray-400 col-span-2">
<div>
<Link href="/">
{{ siteConfig.title }}
</Link>
</div>
<div>{{ ` • ` }}</div>
<div>
{{ `© 2019-${new Date().getFullYear()} by` }}
<Link href="/">
{{ siteConfig.author }}
</Link>
</div>
</div>
</div>
</footer>
</template>