refactor: update PostgreSQL import and initialization

- Changed the import statement from "bun" to "postgres".
- Simplified the PostgreSQL client initialization by directly using the connection string.
This commit is contained in:
yuanhau 2025-05-11 00:17:42 +08:00
parent 089c90f79b
commit 666f6ac38b
7 changed files with 998 additions and 211 deletions

View file

@ -3,10 +3,11 @@ import { gsap } from "gsap";
import { TextPlugin } from "gsap/TextPlugin";
gsap.registerPlugin(TextPlugin);
const { t } = useI18n();
const localePath = useLocalePath();
const router = useRouter();
const popMessage = ref(null);
const isAnimating = ref(false);
const messages = [
t("home.moving.newsPlatform"),
t("home.moving.miniWikipedia"),
@ -40,7 +41,7 @@ onMounted(() => {
<template>
<div>
<div
class="flex flex-col justify-center align-center text-center absolute w-full h-screen inset-x-0 inset-y-0"
class="content flex flex-col justify-center align-center text-center absolute w-full h-screen inset-x-0 inset-y-0"
>
<span class="text-3xl">
<span
@ -52,14 +53,27 @@ onMounted(() => {
class="bg-gradient-to-r from-[#2a7b9b] then-[#8d57c7] to-[#ed4242] bg-clip-text text-transparent"
></span
></span>
<NuxtLink :to="localePath('/app/')">
<div class="flex flex-row justify-center align-center gap-0s">
<NuxtLink :to="localePath('/app/')">
<button
class="m-4 bg-[#8C9393] text-white p-3 rounded-full bg-gradient-to-l from-sky-500 to-purple-600 transition-all duration-100"
class="m-4 mr-1 ml-1 bg-[#8C9393] text-white p-3 rounded-full bg-gradient-to-l from-sky-500 to-purple-600 transition-all duration-150 hover:transform hover:scale-105 hover:shadow-lg"
>
<span>{{ t("home.startusing") }}</span>
</button>
</NuxtLink>
<NuxtLink to="#learnmore">
<button
class="m-4 ml-1 mr-1 bg-[#8C9393] text-white p-3 rounded-full bg-gray-700 transition-all duration-150 hover:transform hover:scale-105 hover:shadow-lg"
>
<span>{{ t("home.learnmore") }}</span>
</button>
</NuxtLink>
</div>
</div>
<div class="h-screen"></div>
<div class="">
<h1>Why?</h1>
<span>台灣的新聞是要痲是來自中國控制的媒體或是來自只想獲得點閱的記者</span>
</div>
</div>
</template>