summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2024-10-14 16:30:54 +0800
committerlittleblack111 <littleblack11111@gmail.com>2024-10-14 16:54:38 +0800
commiteec073d9ad335b340be83046b85d4f5adf77c7f0 (patch)
tree6faa54ba0ababd64b48dc6102cd751f268068abb /lib
parent0d69b7f5b85282fd84dac2c411fc38d5bb4374bb (diff)
structure: font, lib
remove(layout): removed reveal animation, instead, its a wrapper now
Diffstat (limited to 'lib')
-rw-r--r--lib/fonts.tsx41
-rw-r--r--lib/isMobile.tsx9
2 files changed, 50 insertions, 0 deletions
diff --git a/lib/fonts.tsx b/lib/fonts.tsx
new file mode 100644
index 0000000..34cc459
--- /dev/null
+++ b/lib/fonts.tsx
@@ -0,0 +1,41 @@
+import localFont from "next/font/local";
+import { Inter, Rock_Salt, Monoton, JetBrains_Mono } from 'next/font/google'
+
+export const InterFont = Inter({
+ variable: "--font-inter",
+ subsets: ['latin'],
+ display: 'swap',
+})
+
+export const MonotonFont = Monoton({
+ weight: ['400'],
+ variable: "--font-monoton",
+ subsets: ['latin'],
+ display: 'swap',
+})
+
+export const RockSaltFont = Rock_Salt({
+ weight: ['400'],
+ variable: "--font-rocksalt",
+ subsets: ['latin'],
+ display: 'swap',
+})
+
+export const JetBrainsMonoFont = JetBrains_Mono({
+ weight: ['400'],
+ variable: "--font-jetbrains",
+ subsets: ['latin'],
+ display: 'swap',
+})
+
+export const hackedFont = localFont({
+ src: "../fonts/Hacked-KerX.ttf"
+})
+
+export const smoothFont = localFont({
+ src: "../fonts/SmoothElegantRegular-ZLv3.ttf"
+})
+
+export const bigFont = localFont({
+ src: "../fonts/Big500-8MLOM.ttf"
+}) \ No newline at end of file
diff --git a/lib/isMobile.tsx b/lib/isMobile.tsx
new file mode 100644
index 0000000..4ad8b03
--- /dev/null
+++ b/lib/isMobile.tsx
@@ -0,0 +1,9 @@
+"use server"
+
+import { userAgent } from 'next/server'
+import { headers } from 'next/headers';
+
+export default async function isMobile() {
+ const { device } = userAgent({ headers: headers() });
+ return device.type === 'mobile';
+} \ No newline at end of file