🎉 这会是一个好的开始
This commit is contained in:
commit
b8e2f4282d
|
@ -0,0 +1,24 @@
|
|||
# Nuxt dev/build outputs
|
||||
.output
|
||||
.data
|
||||
.nuxt
|
||||
.nitro
|
||||
.cache
|
||||
dist
|
||||
|
||||
# Node dependencies
|
||||
node_modules
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
|
||||
# Misc
|
||||
.DS_Store
|
||||
.fleet
|
||||
.idea
|
||||
|
||||
# Local env files
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
|
@ -0,0 +1,36 @@
|
|||
## 功能清单 / TODO
|
||||
- [ ] 主页/
|
||||
- [ ] 网站标题
|
||||
- [ ] 文章列表(时间排序)
|
||||
- [ ] 文章标题
|
||||
- [ ] 文章摘要
|
||||
- [ ] 文章标签
|
||||
- [ ] 个人信息展示
|
||||
- [ ] RSS 订阅
|
||||
- [ ] 登录管理页面
|
||||
- [ ] 文章详情页/post
|
||||
- [ ] 文章标题
|
||||
- [ ] 文章内容
|
||||
- [ ] 文章标签
|
||||
- [ ] 评论区 ??
|
||||
- [ ] 评论列表
|
||||
- [ ] 评论表单
|
||||
- [ ] 评论回复
|
||||
- [ ] 评论点赞
|
||||
- [ ] 评论删除
|
||||
- [ ] 上一篇/下一篇文章链接
|
||||
- [ ] 归档页/archive
|
||||
- [ ] 按时间归档
|
||||
- [ ] 按标签归档
|
||||
- [ ] 搜索
|
||||
- [ ] 友链/friend
|
||||
- [ ] 关于
|
||||
- [ ] 后台管理/admin security??
|
||||
- [ ] 文章编辑
|
||||
- [ ] 新建文章
|
||||
- [ ] 编辑文章
|
||||
- [ ] 删除文章
|
||||
- [ ] 文章预览
|
||||
- [ ] markdown mermaid ... 支持
|
||||
- [ ] 友链管理
|
||||
- [ ] 个人页面管理
|
|
@ -0,0 +1,75 @@
|
|||
# Nuxt Minimal Starter
|
||||
|
||||
Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
|
||||
|
||||
## Setup
|
||||
|
||||
Make sure to install dependencies:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm install
|
||||
|
||||
# pnpm
|
||||
pnpm install
|
||||
|
||||
# yarn
|
||||
yarn install
|
||||
|
||||
# bun
|
||||
bun install
|
||||
```
|
||||
|
||||
## Development Server
|
||||
|
||||
Start the development server on `http://localhost:3000`:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run dev
|
||||
|
||||
# pnpm
|
||||
pnpm dev
|
||||
|
||||
# yarn
|
||||
yarn dev
|
||||
|
||||
# bun
|
||||
bun run dev
|
||||
```
|
||||
|
||||
## Production
|
||||
|
||||
Build the application for production:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run build
|
||||
|
||||
# pnpm
|
||||
pnpm build
|
||||
|
||||
# yarn
|
||||
yarn build
|
||||
|
||||
# bun
|
||||
bun run build
|
||||
```
|
||||
|
||||
Locally preview production build:
|
||||
|
||||
```bash
|
||||
# npm
|
||||
npm run preview
|
||||
|
||||
# pnpm
|
||||
pnpm preview
|
||||
|
||||
# yarn
|
||||
yarn preview
|
||||
|
||||
# bun
|
||||
bun run preview
|
||||
```
|
||||
|
||||
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
|
|
@ -0,0 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<NuxtRouteAnnouncer />
|
||||
<NuxtPage />
|
||||
</div>
|
||||
</template>;
|
|
@ -0,0 +1,2 @@
|
|||
@import "@nuxt/ui";
|
||||
@import "tailwindcss";
|
|
@ -0,0 +1,87 @@
|
|||
import withNuxt from './.nuxt/eslint.config.mjs';
|
||||
|
||||
import { globalIgnores } from 'eslint/config';
|
||||
import { defineConfigWithVueTs, vueTsConfigs, configureVueProject } from '@vue/eslint-config-typescript';
|
||||
import tseslint from 'typescript-eslint';
|
||||
import globals from 'globals';
|
||||
import pluginVue from 'eslint-plugin-vue';
|
||||
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting';
|
||||
import stylistic from '@stylistic/eslint-plugin';
|
||||
import stylisticJsx from '@stylistic/eslint-plugin-jsx';
|
||||
import vueEslintParser from 'vue-eslint-parser';
|
||||
|
||||
// 支持 .vue 里的 ts/tsx
|
||||
configureVueProject({ scriptLangs: ['ts', 'tsx'] });
|
||||
|
||||
export default withNuxt(
|
||||
...(defineConfigWithVueTs(
|
||||
{
|
||||
name: 'app/files-to-lint',
|
||||
files: [
|
||||
'**/*.{ts,mts,tsx,js,mjs,cjs,cts,vue}',
|
||||
'server/**/*.{ts,js}',
|
||||
'composables/**/*.{ts,js}',
|
||||
'plugins/**/*.{ts,js}',
|
||||
'app.config.{ts,js}',
|
||||
'nuxt.config.{ts,js,mjs}',
|
||||
],
|
||||
},
|
||||
|
||||
globalIgnores([
|
||||
'**/dist/**',
|
||||
'**/.output/**', // Nuxt 3 build output
|
||||
'**/dist-ssr/**',
|
||||
'**/coverage/**',
|
||||
]),
|
||||
|
||||
// 扩展 Nuxt + 浏览器全局
|
||||
{
|
||||
files: ['**/*.{js,mjs,cjs,ts,mts,cts,vue}'],
|
||||
languageOptions: {
|
||||
globals: {
|
||||
...globals.browser,
|
||||
...globals.node,
|
||||
$fetch: 'readonly',
|
||||
defineNuxtConfig: 'readonly',
|
||||
useState: 'readonly',
|
||||
useFetch: 'readonly',
|
||||
useAsyncData: 'readonly',
|
||||
useRuntimeConfig: 'readonly',
|
||||
// 其他 Nuxt helpers 可按需添加
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
pluginVue.configs['flat/essential'],
|
||||
{
|
||||
files: ['**/*.vue'],
|
||||
languageOptions: {
|
||||
parser: vueEslintParser,
|
||||
parserOptions: { parser: tseslint.parser },
|
||||
},
|
||||
rules: {
|
||||
'vue/multi-word-component-names': ['error', { ignores: ['index'] }],
|
||||
},
|
||||
},
|
||||
vueTsConfigs.recommended,
|
||||
skipFormatting,
|
||||
tseslint.configs.recommended,
|
||||
// 针对 .vue 文件用 ts parser
|
||||
{
|
||||
files: ['**/*.vue'], languageOptions: {
|
||||
parser: vueEslintParser,
|
||||
parserOptions: { parser: tseslint.parser },
|
||||
},
|
||||
},
|
||||
stylisticJsx.configs.all,
|
||||
stylistic.configs.customize({
|
||||
indent: 2,
|
||||
quotes: 'single',
|
||||
semi: true,
|
||||
jsx: true,
|
||||
braceStyle: '1tbs',
|
||||
arrowParens: true,
|
||||
},
|
||||
),
|
||||
) as unknown as ResolvableFlatConfig[]),
|
||||
);
|
|
@ -0,0 +1,20 @@
|
|||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||
import tailwindcss from '@tailwindcss/vite';
|
||||
|
||||
export default defineNuxtConfig({
|
||||
compatibilityDate: '2025-05-15',
|
||||
devtools: { enabled: false },
|
||||
vite: {
|
||||
plugins: [
|
||||
tailwindcss(),
|
||||
],
|
||||
},
|
||||
modules: [
|
||||
'@nuxt/eslint',
|
||||
'@nuxt/icon',
|
||||
'@nuxt/ui',
|
||||
'@pinia/nuxt',
|
||||
'@nuxtjs/color-mode',
|
||||
],
|
||||
css: ['~/assets/css/main.css'],
|
||||
});
|
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"name": "nuxt-app",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"build": "nuxt build",
|
||||
"dev": "nuxt dev",
|
||||
"generate": "nuxt generate",
|
||||
"preview": "nuxt preview",
|
||||
"postinstall": "nuxt prepare"
|
||||
},
|
||||
"dependencies": {
|
||||
"@nuxt/eslint": "1.5.2",
|
||||
"@nuxt/icon": "1.15.0",
|
||||
"@nuxt/ui": "3.2.0",
|
||||
"@nuxtjs/color-mode": "3.5.2",
|
||||
"@pinia/nuxt": "^0.11.1",
|
||||
"@tailwindcss/vite": "^4.1.11",
|
||||
"@vue/eslint-config-prettier": "^10.2.0",
|
||||
"eslint": "^9.0.0",
|
||||
"nuxt": "^3.17.6",
|
||||
"tailwindcss": "^4.1.11",
|
||||
"typescript": "^5.6.3",
|
||||
"vue": "^3.5.17",
|
||||
"vue-router": "^4.5.1"
|
||||
},
|
||||
"packageManager": "pnpm@10.7.1+sha512.2d92c86b7928dc8284f53494fb4201f983da65f0fb4f0d40baafa5cf628fa31dae3e5968f12466f17df7e97310e30f343a648baea1b9b350685dafafffdf5808",
|
||||
"devDependencies": {
|
||||
"@stylistic/eslint-plugin": "^5.1.0",
|
||||
"@stylistic/eslint-plugin-jsx": "^4.4.1",
|
||||
"@vue/eslint-config-typescript": "^14.6.0",
|
||||
"eslint-plugin-vue": "^10.3.0",
|
||||
"globals": "^16.3.0",
|
||||
"typescript-eslint": "^8.35.1",
|
||||
"vue-eslint-parser": "^10.2.0"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
<script setup lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
{{useRoute().params.articleID}}
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,13 @@
|
|||
<script setup lang="ts">
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,45 @@
|
|||
<script setup lang="ts">
|
||||
|
||||
import type { NavigationMenuItem } from '@nuxt/ui';
|
||||
|
||||
const items = ref<NavigationMenuItem[]>([
|
||||
{
|
||||
label: '首页',
|
||||
icon: 'i-lucide-home',
|
||||
to: '/',
|
||||
},
|
||||
{
|
||||
label: '归档',
|
||||
icon: 'i-lucide-paperclip',
|
||||
to: '/archive',
|
||||
},
|
||||
{
|
||||
label: '关于',
|
||||
icon: 'i-lucide-info',
|
||||
to: '/about',
|
||||
},
|
||||
{
|
||||
label: 'Contact',
|
||||
to: '/contact',
|
||||
},
|
||||
]);
|
||||
useColorMode().preference = 'light';
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<NuxtRouteAnnouncer />
|
||||
<UApp>
|
||||
<div class="w-full flex justify-center">
|
||||
<div class="xl:w-[1220px] lg:w-[964px] md:w-[708px]">
|
||||
<UNavigationMenu :items="items" class="w-full"/>
|
||||
<NuxtPage />
|
||||
</div>
|
||||
</div>
|
||||
</UApp>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
|
@ -0,0 +1,2 @@
|
|||
User-Agent: *
|
||||
Disallow:
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"extends": "../.nuxt/tsconfig.server.json"
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
export const store = defineStore('counter', {
|
||||
|
||||
});
|
||||
export default store;
|
|
@ -0,0 +1,46 @@
|
|||
// tailwind config file
|
||||
import plugin from 'tailwindcss/plugin';
|
||||
|
||||
export default {
|
||||
mode: 'jit',
|
||||
darkMode: 'class',
|
||||
theme: {
|
||||
extend: {
|
||||
colors: {},
|
||||
letterSpacing: {
|
||||
doublewidest: '.2em',
|
||||
},
|
||||
},
|
||||
screens: {
|
||||
'sm': '640px',
|
||||
'md': '768px',
|
||||
'lg': '1024px',
|
||||
'xl': '1280px',
|
||||
'2xl': '1536px',
|
||||
},
|
||||
},
|
||||
plugins: [
|
||||
plugin(function ({ addUtilities }) {
|
||||
addUtilities({
|
||||
'.scrollbar-hide': {
|
||||
/* IE and Edge */
|
||||
'-ms-overflow-style': 'none',
|
||||
|
||||
/* Firefox */
|
||||
'scrollbar-width': 'none',
|
||||
|
||||
/* Safari and Chrome */
|
||||
'&::-webkit-scrollbar': {
|
||||
display: 'none',
|
||||
},
|
||||
},
|
||||
});
|
||||
}),
|
||||
],
|
||||
content: [
|
||||
'./app.vue',
|
||||
'./components/**/*.{vue,js,ts}',
|
||||
'./layouts/**/*.vue',
|
||||
'./pages/**/*.vue',
|
||||
],
|
||||
};
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
// https://nuxt.com/docs/guide/concepts/typescript
|
||||
"extends": "./.nuxt/tsconfig.json"
|
||||
}
|
Loading…
Reference in New Issue