From 354da12fa76d4e1e7fe005d972a7822e5eb8255d Mon Sep 17 00:00:00 2001 From: PaloMiku Date: Fri, 10 Jan 2025 11:56:52 +0800 Subject: [PATCH] feat: Update dependencies and refactor homepage components (#15) * feat: Update dependencies and refactor homepage components * feat:Update favicon.ico for better branding * fix:Remove unused dependencies and clean up pnpm-lock.yaml * feat: Enhance Hero component with image carousel and update dependencies * fix: Update GitHub Action doc link for Shiroi Docker --------- Signed-off-by: PaloMiku --- app/components/home/Hero.tsx | 118 ++++++++++-------- content/docs/themes/community.mdx | 2 +- package.json | 2 +- pnpm-lock.yaml | 31 ++--- .../assets/images/preview/console.png | Bin 5 files changed, 87 insertions(+), 66 deletions(-) rename app/components/home/img.png => public/assets/images/preview/console.png (100%) diff --git a/app/components/home/Hero.tsx b/app/components/home/Hero.tsx index 9e7c691..0f6a9cd 100644 --- a/app/components/home/Hero.tsx +++ b/app/components/home/Hero.tsx @@ -1,62 +1,80 @@ +"use client" + import Link from 'next/link'; import Image from 'next/image'; -import Img from './img.png'; -import { cn } from '@/utils/cn'; -import { buttonVariants } from '@/app/components/ui/button'; +import { useState } from 'react'; +const images = [ + '/assets/images/preview/shiro.png', + '/assets/images/preview/kami.png', + '/assets/images/preview/console.png' +]; +const imageNames = ['Shiro主题','Kami主题','控制台']; +import { cn } from 'utils/cn'; +import { buttonVariants } from 'app/components/ui/button'; import { LuCirclePlay } from "react-icons/lu"; import { FaGithub } from "react-icons/fa"; export function Hero() { - return ( -
-

- Mix Space -
- An Alternative Personal Space. -

-

- Mix Space 是一个小型个人空间站点程序。不同于传统的博客程序,采用前后端分离设计, - 适合那些喜欢写不同风格或类型的写作爱好者。 -

-
- - 开始使用 - - - Github - + const [currentImage, setCurrentImage] = useState(0); + return ( +
+

+ Mix Space +
+ An Alternative Personal Space. +

+

+ Mix Space 是一个小型个人空间站点程序。不同于传统的博客程序,采用前后端分离设计, + 适合那些喜欢写不同风格或类型的写作爱好者。 +

+
+ + 开始使用 + + + Github + +
+
+
+ {images.map((_, index) => ( + + ))}
preview -
- ); - } \ No newline at end of file +
+
+ ); +} diff --git a/content/docs/themes/community.mdx b/content/docs/themes/community.mdx index ca1b42e..8a82976 100644 --- a/content/docs/themes/community.mdx +++ b/content/docs/themes/community.mdx @@ -11,7 +11,7 @@ import { FileText } from 'lucide-react' } target="_blank" >前端部署方式拓展博文教程 | By Mikuの鬆 diff --git a/package.json b/package.json index 9e1a8b6..7fd5874 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "copy-to-clipboard": "^3.3.3", "cz-conventional-changelog": "^3.3.0", "dotenv": "^16.4.7", - "framer-motion": "^11.16.2", + "framer-motion": "^11.16.4", "fumadocs-core": "14.6.4", "fumadocs-mdx": "11.2.1", "fumadocs-typescript": "^3.0.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b8db1c3..95201ea 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -39,8 +39,8 @@ importers: specifier: ^16.4.7 version: 16.4.7 framer-motion: - specifier: ^11.16.2 - version: 11.16.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0) + specifier: ^11.16.4 + version: 11.16.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0) fumadocs-core: specifier: 14.6.4 version: 14.6.4(@oramacloud/client@2.1.4)(@types/react@19.0.4)(next@15.1.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0))(react-dom@19.0.0(react@19.0.0))(react@19.0.0) @@ -1492,9 +1492,9 @@ packages: eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} - electron-to-chromium@1.5.79: - resolution: {integrity: sha512-nYOxJNxQ9Om4EC88BE4pPoNI8xwSFf8pU/BAeOl4Hh/b/i6V4biTAzwV7pXi3ARKeoYO5JZKMIXTryXSVer5RA==} - + electron-to-chromium@1.5.80: + resolution: {integrity: sha512-LTrKpW0AqIuHwmlVNV+cjFYTnXtM9K37OGhpe0ZI10ScPSxqVSryZHIY3WnCS5NSYbBODRTZyhRMS2h5FAEqAw==} + emoji-regex-xs@1.0.0: resolution: {integrity: sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==} @@ -1629,8 +1629,9 @@ packages: fraction.js@4.3.7: resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} - framer-motion@11.16.2: - resolution: {integrity: sha512-M946d8UhmI4lVZ4Wy2bLxw7D7LWw+OZTK5eCFCpGJNpUKt17oCP7+bBM3iKp6PfJF30ngBxsdxssFjLdD85ThA==} + framer-motion@11.16.4: + resolution: {integrity: sha512-7ncPlBjrYX6iQXcTSw1kvZcHSVjEuOAW3uWuu+/+chUS4UWBMe8kCjniE4VMc2/BMo0su0Uw9sw0aWS9anpPWA==} + peerDependencies: '@emotion/is-prop-valid': '*' react: ^18.0.0 || ^19.0.0 @@ -2168,8 +2169,8 @@ packages: resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} - motion-dom@11.16.1: - resolution: {integrity: sha512-XVNf3iCfZn9OHPZYJQy5YXXLn0NuPNvtT3YCat89oAnr4D88Cr52KqFgKa8dWElBK8uIoQhpJMJEG+dyniYycQ==} + motion-dom@11.16.4: + resolution: {integrity: sha512-2wuCie206pCiP2K23uvwJeci4pMFfyQKpWI0Vy6HrCTDzDCer4TsYtT7IVnuGbDeoIV37UuZiUr6SZMHEc1Vww==} motion-utils@11.16.0: resolution: {integrity: sha512-ngdWPjg31rD4WGXFi0eZ00DQQqKKu04QExyv/ymlC+3k+WIgYVFbt6gS5JsFPbJODTF/r8XiE/X+SsoT9c0ocw==} @@ -3835,7 +3836,7 @@ snapshots: browserslist@4.24.4: dependencies: caniuse-lite: 1.0.30001692 - electron-to-chromium: 1.5.79 + electron-to-chromium: 1.5.80 node-releases: 2.0.19 update-browserslist-db: 1.1.2(browserslist@4.24.4) @@ -4058,7 +4059,7 @@ snapshots: eastasianwidth@0.2.0: {} - electron-to-chromium@1.5.79: {} + electron-to-chromium@1.5.80: {} emoji-regex-xs@1.0.0: {} @@ -4255,9 +4256,10 @@ snapshots: fraction.js@4.3.7: {} - framer-motion@11.16.2(react-dom@19.0.0(react@19.0.0))(react@19.0.0): + framer-motion@11.16.4(react-dom@19.0.0(react@19.0.0))(react@19.0.0): dependencies: - motion-dom: 11.16.1 + motion-dom: 11.16.4 + motion-utils: 11.16.0 tslib: 2.8.1 optionalDependencies: @@ -5147,7 +5149,8 @@ snapshots: minipass@7.1.2: {} - motion-dom@11.16.1: + motion-dom@11.16.4: + dependencies: motion-utils: 11.16.0 diff --git a/app/components/home/img.png b/public/assets/images/preview/console.png similarity index 100% rename from app/components/home/img.png rename to public/assets/images/preview/console.png