summaryrefslogtreecommitdiff
path: root/app/lib
diff options
context:
space:
mode:
authorlittleblack111 <littleblack11111@gmail.com>2024-10-13 00:38:37 +0800
committerlittleblack111 <littleblack11111@gmail.com>2024-10-13 00:38:37 +0800
commit433e08f2f798b4c04d57cd2d61b16a58aa5196be (patch)
tree699df47962e2fc921c9ddde8a034f41af92b3c63 /app/lib
parent308eb96365a7cee0ebc8118673c3b6c85497ce3e (diff)
core: added home page
Diffstat (limited to 'app/lib')
-rw-r--r--app/lib/fonts.tsx41
-rw-r--r--app/lib/isMobile.tsx9
2 files changed, 50 insertions, 0 deletions
diff --git a/app/lib/fonts.tsx b/app/lib/fonts.tsx
new file mode 100644
index 0000000..3edbc52
--- /dev/null
+++ b/app/lib/fonts.tsx
@@ -0,0 +1,41 @@
+import localFont from "next/font/local";
+import { Inter, Audiowide, 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/app/lib/isMobile.tsx b/app/lib/isMobile.tsx
new file mode 100644
index 0000000..4ad8b03
--- /dev/null
+++ b/app/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