From eec073d9ad335b340be83046b85d4f5adf77c7f0 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 14 Oct 2024 16:30:54 +0800 Subject: structure: font, lib remove(layout): removed reveal animation, instead, its a wrapper now --- app/fonts/Big500-8MLOM.ttf | Bin 12696 -> 0 bytes app/fonts/Hacked-KerX.ttf | Bin 26664 -> 0 bytes app/fonts/Inter.ttf | Bin 804612 -> 0 bytes app/fonts/LigaJetBrainsMonoNerdFont-Regular.ttf | Bin 1036344 -> 0 bytes app/fonts/Monoton.ttf | Bin 49908 -> 0 bytes app/fonts/RockSalt-Regular.ttf | Bin 119328 -> 0 bytes app/fonts/SmoothElegantRegular-ZLv3.ttf | Bin 11708 -> 0 bytes app/fonts/audiowide.ttf | Bin 47676 -> 0 bytes app/fonts/devicon.eot | Bin 484768 -> 0 bytes app/fonts/devicon.svg | 510 ------------------------ app/fonts/devicon.ttf | Bin 484604 -> 0 bytes app/fonts/devicon.woff | Bin 484680 -> 0 bytes app/layout.tsx | 4 +- app/lib/fonts.tsx | 41 -- app/lib/isMobile.tsx | 9 - bun.lockb | Bin 155581 -> 155581 bytes components/blob.tsx | 2 +- components/styles/header.css | 27 +- lib/fonts.tsx | 41 ++ lib/isMobile.tsx | 9 + package.json | 18 +- 21 files changed, 70 insertions(+), 591 deletions(-) delete mode 100644 app/fonts/Big500-8MLOM.ttf delete mode 100644 app/fonts/Hacked-KerX.ttf delete mode 100644 app/fonts/Inter.ttf delete mode 100644 app/fonts/LigaJetBrainsMonoNerdFont-Regular.ttf delete mode 100644 app/fonts/Monoton.ttf delete mode 100644 app/fonts/RockSalt-Regular.ttf delete mode 100644 app/fonts/SmoothElegantRegular-ZLv3.ttf delete mode 100644 app/fonts/audiowide.ttf delete mode 100755 app/fonts/devicon.eot delete mode 100755 app/fonts/devicon.svg delete mode 100755 app/fonts/devicon.ttf delete mode 100755 app/fonts/devicon.woff delete mode 100644 app/lib/fonts.tsx delete mode 100644 app/lib/isMobile.tsx create mode 100644 lib/fonts.tsx create mode 100644 lib/isMobile.tsx diff --git a/app/fonts/Big500-8MLOM.ttf b/app/fonts/Big500-8MLOM.ttf deleted file mode 100644 index 35ec776..0000000 Binary files a/app/fonts/Big500-8MLOM.ttf and /dev/null differ diff --git a/app/fonts/Hacked-KerX.ttf b/app/fonts/Hacked-KerX.ttf deleted file mode 100644 index 2917611..0000000 Binary files a/app/fonts/Hacked-KerX.ttf and /dev/null differ diff --git a/app/fonts/Inter.ttf b/app/fonts/Inter.ttf deleted file mode 100644 index e724708..0000000 Binary files a/app/fonts/Inter.ttf and /dev/null differ diff --git a/app/fonts/LigaJetBrainsMonoNerdFont-Regular.ttf b/app/fonts/LigaJetBrainsMonoNerdFont-Regular.ttf deleted file mode 100644 index fb81e18..0000000 Binary files a/app/fonts/LigaJetBrainsMonoNerdFont-Regular.ttf and /dev/null differ diff --git a/app/fonts/Monoton.ttf b/app/fonts/Monoton.ttf deleted file mode 100644 index 0c32913..0000000 Binary files a/app/fonts/Monoton.ttf and /dev/null differ diff --git a/app/fonts/RockSalt-Regular.ttf b/app/fonts/RockSalt-Regular.ttf deleted file mode 100644 index 0f72fe6..0000000 Binary files a/app/fonts/RockSalt-Regular.ttf and /dev/null differ diff --git a/app/fonts/SmoothElegantRegular-ZLv3.ttf b/app/fonts/SmoothElegantRegular-ZLv3.ttf deleted file mode 100644 index f8f70d7..0000000 Binary files a/app/fonts/SmoothElegantRegular-ZLv3.ttf and /dev/null differ diff --git a/app/fonts/audiowide.ttf b/app/fonts/audiowide.ttf deleted file mode 100644 index 348817d..0000000 Binary files a/app/fonts/audiowide.ttf and /dev/null differ diff --git a/app/fonts/devicon.eot b/app/fonts/devicon.eot deleted file mode 100755 index 5cd3afd..0000000 Binary files a/app/fonts/devicon.eot and /dev/null differ diff --git a/app/fonts/devicon.svg b/app/fonts/devicon.svg deleted file mode 100755 index b5d8b63..0000000 --- a/app/fonts/devicon.svg +++ /dev/null @@ -1,510 +0,0 @@ - - - -Generated by IcoMoon - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/fonts/devicon.ttf b/app/fonts/devicon.ttf deleted file mode 100755 index 6820a41..0000000 Binary files a/app/fonts/devicon.ttf and /dev/null differ diff --git a/app/fonts/devicon.woff b/app/fonts/devicon.woff deleted file mode 100755 index 926b9e2..0000000 Binary files a/app/fonts/devicon.woff and /dev/null differ diff --git a/app/layout.tsx b/app/layout.tsx index 8da348a..1b04718 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -5,7 +5,7 @@ import type { Metadata, Viewport } from "next"; import "./styles.css"; import { ThemeProvider } from "@/components/theme-provider" import Header from "@/components/header"; -import { MonotonFont, RockSaltFont, InterFont, JetBrainsMonoFont } from "./lib/fonts"; +import { MonotonFont, RockSaltFont, InterFont, JetBrainsMonoFont } from "@/lib/fonts"; import { Analytics } from "@vercel/analytics/react" import Performance from "@/components/performance"; @@ -70,7 +70,7 @@ export default function RootLayout({children,}: Readonly<{children: React.ReactN return ( -
+
{children} diff --git a/app/lib/fonts.tsx b/app/lib/fonts.tsx deleted file mode 100644 index 34cc459..0000000 --- a/app/lib/fonts.tsx +++ /dev/null @@ -1,41 +0,0 @@ -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/app/lib/isMobile.tsx b/app/lib/isMobile.tsx deleted file mode 100644 index 4ad8b03..0000000 --- a/app/lib/isMobile.tsx +++ /dev/null @@ -1,9 +0,0 @@ -"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 diff --git a/bun.lockb b/bun.lockb index 9cea316..e10d8d3 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/components/blob.tsx b/components/blob.tsx index fe9cf04..d5cfa54 100644 --- a/components/blob.tsx +++ b/components/blob.tsx @@ -1,6 +1,6 @@ "use client" import React, { useState, useEffect, useRef } from 'react'; -import isMobile from '@/app/lib/isMobile'; +import isMobile from '@/lib/isMobile'; import styles from './styles/blob.module.css'; function getRandomInt(min: number, max: number): number { diff --git a/components/styles/header.css b/components/styles/header.css index 845168a..0ca9a35 100644 --- a/components/styles/header.css +++ b/components/styles/header.css @@ -11,7 +11,7 @@ header { align-items: center; text-align: center; z-index: 1000; - background-color: #000; + background-color: rgba(0,0,0,0.3); border-radius: 32px; -webkit-user-select: none; /* Safari */ -ms-user-select: none; /* IE 10 and IE 11 */ @@ -36,13 +36,11 @@ header { text-decoration: none; margin-left: 10mm; margin-right: 10mm; - padding-top: 5mm; + padding-top: 4mm; /* padding-bottom: 3mm; */ border-radius: 32px; color: #F4E8C1; transition: all .3s; - -webkit-user-select: none; /* Safari */ - -ms-user-select: none; /* IE 10 and IE 11 */ user-select: none; /* Standard syntax */ } @@ -59,7 +57,7 @@ header { .navBar a::after { content: ''; - position: fixed; + position: absolute; left: 0; bottom: 0; width: 100%; @@ -67,20 +65,15 @@ header { background: rgba(128, 128, 128, 0.2); border-radius: 1mm; transform: scaleX(0); - -webkit-transition: all 0.3s; transition: all 0.3s; } .navBar a:hover::after { - transform: scaleX(1.1); + position: absolute; + transform: scaleX(1); } .navBar a:hover { - /* background: rgba(255, 255, 255, 0.2); */ - /* outline: ridge rgba(128, 128, 128, .6); */ - /* -webkit-backdrop-filter: blur(10px); - backdrop-filter: blur(10px); */ - -webkit-transition: all 1s; transition: all 1s } @@ -100,18 +93,15 @@ header { .navBar:hover, header:hover, #navBarHeader:hover -/* #navBarHeader:active */ { transform: scale(1.005); - /* -webkit-backdrop-filter: blur(10px); - backdrop-filter: blur(10px); */ transition: all 0.5s } header:active, #navBarHeader:active, .navBar:active { - transform: scale(1.01); + transform: scale(1.01) /* transition: transform 700ms; */ } @@ -126,8 +116,7 @@ header, header.minimizedIsland { opacity: 0; scale: 0; - -webkit-animation-name: minimizeIsland; - animation-name: minimizeIsland; + transform: translateY(-100%); animation-fill-mode: forwards; - transition: all 0.3s + transition: all 3s } \ No newline at end of file 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 diff --git a/package.json b/package.json index d1f41fd..214b867 100644 --- a/package.json +++ b/package.json @@ -18,20 +18,20 @@ "lucide-react": "^0.451.0", "next": "14.2.15", "next-themes": "^0.3.0", - "react": "^18", - "react-dom": "^18", + "react": "^18.3.1", + "react-dom": "^18.3.1", "react-next-parallax": "^0.1.0", "tailwind-merge": "^2.5.3", "tailwindcss-animate": "^1.0.7" }, "devDependencies": { - "@types/node": "^20", - "@types/react": "^18", - "@types/react-dom": "^18", - "eslint": "^8", + "@types/node": "^20.16.11", + "@types/react": "^18.3.11", + "@types/react-dom": "^18.3.1", + "eslint": "^8.57.1", "eslint-config-next": "14.2.15", - "postcss": "^8", - "tailwindcss": "^3.4.1", - "typescript": "^5" + "postcss": "^8.4.47", + "tailwindcss": "^3.4.13", + "typescript": "^5.6.3" } } -- cgit v1.2.3