Skip to content

Commit

Permalink
✨ support footer
Browse files Browse the repository at this point in the history
  • Loading branch information
XiYang6666 committed May 4, 2024
1 parent 083d878 commit b9e15b6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ NUXT_OWNER_EMAIL = "example@example.com"
NUXT_OWNER_NAME = "Example"
NUXT_DESCRIPTION = "Welcome to Example's main page"

NUXT_FOOTER = "an example footer"

NUXT_HITOKOTO_URL = "https://v1.hitokoto.cn"
NUXT_GRAVATAR_URL = "https://gravatar.com"

Expand Down
5 changes: 4 additions & 1 deletion app.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="bg h-dvh overflow-y-hidden bg-black bg-opacity-80 flex items-center justify-center">
<div class="bg h-dvh overflow-y-hidden bg-black bg-opacity-80 flex items-center justify-center flex-col">
<div class="content flex items-center flex-col w-[40rem]">
<img
:src="'/api/getAvatar'"
Expand Down Expand Up @@ -35,6 +35,7 @@
</li>
</ul>
</div>
<span class="footer fixed bottom-4 text-lg text-zinc-400 font-thin text-center">{{ footer }}</span>
</div>
</template>

Expand All @@ -61,6 +62,8 @@ const description = ref(config.description);
const hitokotoData: Record<string, string | number> = await $fetch(config.hitokotoUrl);
const hitokoto = hitokotoData.hitokoto;
const footer = ref(config.footer);
const links = ref(config.public.links as Record<string, string>);
const socials = ref(config.public.socials as Record<string, { link: string; icon: string }>);
</script>
Expand Down
1 change: 1 addition & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export default defineNuxtConfig({
ownerEmail: "example@example.com",
ownerName: "Example",
description: "Welcome to Example's main page",
footer: 'an example footer',
hitokotoUrl: "https://v1.hitokoto.cn",
gravatarUrl: "https://gravatar.com",
avatarCacheTime: 60 * 60 * 1000, // 1 hour
Expand Down

0 comments on commit b9e15b6

Please sign in to comment.