From d0202bcca6c1049994908560bbafb4ca1446aa8b Mon Sep 17 00:00:00 2001
From: WindowBird <13870814+windows-bird@user.noreply.gitee.com>
Date: Mon, 29 Sep 2025 14:45:33 +0800
Subject: [PATCH] =?UTF-8?q?=E7=95=8C=E9=9D=A2=E6=88=90=E5=8A=9F=E6=B8=B2?=
=?UTF-8?q?=E6=9F=93?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/app.config.ts | 45 ++++++++++++++++++
app/app.vue | 42 +++++++++++++++--
app/assets/css/main.css | 26 ++++++++++
app/components/AppFooter.vue | 24 ++++++++++
app/components/AppHeader.vue | 26 ++++++++++
app/components/ColorModeButton.vue | 76 ++++++++++++++++++++++++++++++
app/layouts/default.vue | 8 ++--
app/pages/index.vue | 11 +++++
app/utils/links.ts | 23 +++++++++
nuxt.config.ts | 27 +++++++----
package.json | 5 ++
pnpm-lock.yaml | 10 ++++
pnpm-workspace.yaml | 10 ++++
tailwind.config.js | 18 +++++++
14 files changed, 334 insertions(+), 17 deletions(-)
create mode 100644 app/app.config.ts
create mode 100644 app/assets/css/main.css
create mode 100644 app/components/AppFooter.vue
create mode 100644 app/components/AppHeader.vue
create mode 100644 app/components/ColorModeButton.vue
create mode 100644 app/pages/index.vue
create mode 100644 app/utils/links.ts
create mode 100644 pnpm-workspace.yaml
create mode 100644 tailwind.config.js
diff --git a/app/app.config.ts b/app/app.config.ts
new file mode 100644
index 0000000..833ee02
--- /dev/null
+++ b/app/app.config.ts
@@ -0,0 +1,45 @@
+export default defineAppConfig({
+ global: {
+ picture: {
+ dark: 'https://cbu01.alicdn.com/img/ibank/O1CN01uZ3fTP1Bs31lE2Mlf_!!0-0-cib.jpg',
+ light: 'https://cbu01.alicdn.com/img/ibank/O1CN01uZ3fTP1Bs31lE2Mlf_!!0-0-cib.jpg',
+ alt: 'My profile picture'
+ },
+ meetingLink: 'https://chuangtewulian.1688.com/page/index.html',
+ email: 'ui-pro@nuxt.com',
+ available: true
+ },
+ ui: {
+ colors: {
+ primary: 'blue',
+ neutral: 'neutral'
+ },
+ pageHero: {
+ slots: {
+ container: 'py-18 sm:py-24 lg:py-32',
+ title: 'mx-auto max-w-xl text-pretty text-3xl sm:text-4xl lg:text-5xl',
+ description: 'mt-2 text-md mx-auto max-w-2xl text-pretty sm:text-md text-muted'
+ }
+ }
+ },
+ footer: {
+ credits: `Built with Nuxt UI • © ${new Date().getFullYear()}`,
+ colorMode: false,
+ links: [{
+ 'icon': 'i-simple-icons-discord',
+ 'to': 'https://www.douyin.com/user/MS4wLjABAAAAdPkGyADnJFLrZBwDM9U7faUJs-wmmyEU9L34SS0CKhs',
+ 'target': '_blank',
+ 'aria-label': 'Nuxt on Discord'
+ }, {
+ 'icon': 'i-simple-icons-x',
+ 'to': 'https://chuangtewulian.1688.com/page/index.html',
+ 'target': '_blank',
+ 'aria-label': 'Nuxt on X'
+ }, {
+ 'icon': 'i-simple-icons-github',
+ 'to': 'https://chuangtewulian.1688.com/page/index.html',
+ 'target': '_blank',
+ 'aria-label': 'Nuxt UI on GitHub'
+ }]
+ }
+})
diff --git a/app/app.vue b/app/app.vue
index 09f935b..6b9ac4f 100644
--- a/app/app.vue
+++ b/app/app.vue
@@ -1,6 +1,40 @@
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/app/assets/css/main.css b/app/assets/css/main.css
new file mode 100644
index 0000000..8788d0c
--- /dev/null
+++ b/app/assets/css/main.css
@@ -0,0 +1,26 @@
+@import "tailwindcss";
+@import "@nuxt/ui";
+
+@source "../../../content/**/*";
+
+@theme static {
+ --font-sans: 'Public Sans', sans-serif;
+ --font-serif: 'Instrument Serif', serif;
+}
+
+:root {
+ --ui-container: var(--container-4xl);
+
+ ::selection {
+ color: #282a30;
+ background-color: #c8c8c8;
+ }
+}
+
+
+.dark {
+ ::selection {
+ color: #ffffff;
+ background-color: #474747;
+ }
+}
diff --git a/app/components/AppFooter.vue b/app/components/AppFooter.vue
new file mode 100644
index 0000000..c763c96
--- /dev/null
+++ b/app/components/AppFooter.vue
@@ -0,0 +1,24 @@
+
+
+
+
+
+ {{ footer.credits }}
+
+
+
+
+
+
+
+
+
diff --git a/app/components/AppHeader.vue b/app/components/AppHeader.vue
new file mode 100644
index 0000000..91e676f
--- /dev/null
+++ b/app/components/AppHeader.vue
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/components/ColorModeButton.vue b/app/components/ColorModeButton.vue
new file mode 100644
index 0000000..b6fa19a
--- /dev/null
+++ b/app/components/ColorModeButton.vue
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/layouts/default.vue b/app/layouts/default.vue
index 408f8e9..c145d3e 100644
--- a/app/layouts/default.vue
+++ b/app/layouts/default.vue
@@ -1,12 +1,12 @@
-
diff --git a/app/pages/index.vue b/app/pages/index.vue
new file mode 100644
index 0000000..2ddf58e
--- /dev/null
+++ b/app/pages/index.vue
@@ -0,0 +1,11 @@
+
+
+
+ 1
+
+
+
\ No newline at end of file
diff --git a/app/utils/links.ts b/app/utils/links.ts
new file mode 100644
index 0000000..e1398d8
--- /dev/null
+++ b/app/utils/links.ts
@@ -0,0 +1,23 @@
+import type {NavigationMenuItem} from '@nuxt/ui'
+
+export const navLinks: NavigationMenuItem[] = [{
+ label: '首页',
+
+ to: '/'
+}, {
+ label: '主营产品',
+
+
+}, {
+ label: '新闻资讯',
+
+
+}, {
+ label: '发展史',
+
+
+}, {
+ label: '关于我们',
+
+
+}]
diff --git a/nuxt.config.ts b/nuxt.config.ts
index cab65ed..a62b28d 100644
--- a/nuxt.config.ts
+++ b/nuxt.config.ts
@@ -1,12 +1,21 @@
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
- compatibilityDate: '2025-07-15',
- devtools: { enabled: true },
- modules: ['@nuxt/eslint', '@nuxt/ui', '@nuxt/image'],
- fonts: {
- providers: {
- google: false, // 禁用 Google Fonts
- googleicons: false // 禁用 Google Icons
- }
- }
+ compatibilityDate: '2025-07-15',
+ devtools: {enabled: true},
+ modules: ['@nuxt/eslint', '@nuxt/ui', '@nuxt/image'],
+ fonts: {
+ providers: {
+ google: false, // 禁用 Google Fonts
+ googleicons: false // 禁用 Google Icons
+ }
+ },
+ css: ['~/assets/css/main.css'],
+ nitro: {
+ prerender: {
+ routes: [
+ '/',
+ ],
+ crawlLinks: true
+ }
+ },
})
\ No newline at end of file
diff --git a/package.json b/package.json
index da0e7f3..c89ec8d 100644
--- a/package.json
+++ b/package.json
@@ -18,5 +18,10 @@
"typescript": "^5.9.2",
"vue": "^3.5.21",
"vue-router": "^4.5.1"
+ },
+ "devDependencies": {
+ "autoprefixer": "^10.4.21",
+ "postcss": "^8.5.6",
+ "tailwindcss": "^4.1.13"
}
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 1f5a89f..8953719 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -32,6 +32,16 @@ importers:
vue-router:
specifier: ^4.5.1
version: 4.5.1(vue@3.5.22(typescript@5.9.2))
+ devDependencies:
+ autoprefixer:
+ specifier: ^10.4.21
+ version: 10.4.21(postcss@8.5.6)
+ postcss:
+ specifier: ^8.5.6
+ version: 8.5.6
+ tailwindcss:
+ specifier: ^4.1.13
+ version: 4.1.13
packages:
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
new file mode 100644
index 0000000..ad40390
--- /dev/null
+++ b/pnpm-workspace.yaml
@@ -0,0 +1,10 @@
+ignoredBuiltDependencies:
+ - '@parcel/watcher'
+ - '@tailwindcss/oxide'
+ - esbuild
+ - unrs-resolver
+ - vue-demi
+
+onlyBuiltDependencies:
+ - better-sqlite3
+ - sharp
diff --git a/tailwind.config.js b/tailwind.config.js
new file mode 100644
index 0000000..4d0edcd
--- /dev/null
+++ b/tailwind.config.js
@@ -0,0 +1,18 @@
+// tailwind.config.js
+/** @type {import('tailwindcss').Config} */
+export default {
+ content: [
+ './components/**/*.{js,vue,ts}',
+ './layouts/**/*.vue',
+ './pages/**/*.vue',
+ './plugins/**/*.{js,ts}',
+ './app.vue',
+ './error.vue'
+ ],
+ theme: {
+ extend: {
+ // 自定义主题配置
+ }
+ },
+ plugins: []
+}