commit
fa5978112d
18 changed files with 7489 additions and 0 deletions
@ -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,14 @@
|
||||
## 1. pnpm run build |
||||
## 2. docker build --platform linux/amd64 -t ai-website:0.0.0 . -f Dockerfile |
||||
## 3. docker save -o ai-website:0.0.0.tar <image_id> |
||||
|
||||
FROM node:20-alpine |
||||
ENV HOST 0.0.0.0 |
||||
RUN mkdir -p /nuxt |
||||
COPY .output /nuxt |
||||
WORKDIR /nuxt |
||||
## fix @nuxt/image [https://github.com/nuxt/image/issues/1210] |
||||
RUN rm -rf server/node_modules/sharp && cd server && npm install sharp@0.33.2 |
||||
EXPOSE 3000 |
||||
CMD ["node","server/index.mjs"] |
||||
|
@ -0,0 +1,75 @@
|
||||
# Nuxt 3 Minimal Starter |
||||
|
||||
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more. |
||||
|
||||
## Setup |
||||
|
||||
Make sure to install the 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 run dev |
||||
|
||||
# yarn |
||||
yarn dev |
||||
|
||||
# bun |
||||
bun run dev |
||||
``` |
||||
|
||||
## Production |
||||
|
||||
Build the application for production: |
||||
|
||||
```bash |
||||
# npm |
||||
npm run build |
||||
|
||||
# pnpm |
||||
pnpm run build |
||||
|
||||
# yarn |
||||
yarn build |
||||
|
||||
# bun |
||||
bun run build |
||||
``` |
||||
|
||||
Locally preview production build: |
||||
|
||||
```bash |
||||
# npm |
||||
npm run preview |
||||
|
||||
# pnpm |
||||
pnpm run 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,16 @@
|
||||
<script setup lang="ts"> |
||||
import AOS from "aos" |
||||
|
||||
onMounted(() => { |
||||
AOS.init({ |
||||
easing: "ease-out", |
||||
duration: 800, |
||||
}) |
||||
}) |
||||
</script> |
||||
|
||||
<template> |
||||
<NuxtLayout> |
||||
<NuxtPage /> |
||||
</NuxtLayout> |
||||
</template> |
@ -0,0 +1,83 @@
|
||||
#app { |
||||
width: 100%; |
||||
height: 100vh; |
||||
overflow: auto; |
||||
} |
||||
|
||||
a { |
||||
font-weight: 500; |
||||
color: #646cff; |
||||
text-decoration: inherit; |
||||
} |
||||
|
||||
|
||||
html, |
||||
body, |
||||
ul, |
||||
li, |
||||
ol, |
||||
dl, |
||||
dd, |
||||
dt, |
||||
p, |
||||
h1, |
||||
h2, |
||||
h3, |
||||
h4, |
||||
h5, |
||||
h6, |
||||
form, |
||||
fieldset, |
||||
legend, |
||||
img { |
||||
margin: 0; |
||||
padding: 0; |
||||
} |
||||
|
||||
fieldset, |
||||
img { |
||||
border: none; |
||||
} |
||||
|
||||
img { |
||||
display: block; |
||||
} |
||||
|
||||
address, |
||||
caption, |
||||
cite, |
||||
code, |
||||
dfn, |
||||
th, |
||||
var { |
||||
font-style: normal; |
||||
font-weight: normal; |
||||
} |
||||
|
||||
ul, |
||||
ol, |
||||
li { |
||||
list-style: none; |
||||
} |
||||
|
||||
body { |
||||
color: #333; |
||||
background: #fff; |
||||
overflow-x: hidden; |
||||
} |
||||
|
||||
a { |
||||
color: #666; |
||||
text-decoration: none; |
||||
} |
||||
|
||||
a:visited { |
||||
color: #666; |
||||
} |
||||
|
||||
a:hover, |
||||
a:active, |
||||
a:focus { |
||||
color: #ff8400; |
||||
text-decoration: underline; |
||||
} |
@ -0,0 +1,5 @@
|
||||
<template> |
||||
<div> |
||||
Footer |
||||
</div> |
||||
</template> |
@ -0,0 +1,5 @@
|
||||
<template> |
||||
<div> |
||||
Header |
||||
</div> |
||||
</template> |
@ -0,0 +1,51 @@
|
||||
<script lang="ts" setup> |
||||
const props = defineProps<{ |
||||
listTotal: number |
||||
listSize: number |
||||
}>() |
||||
const currentPage = ref(1) |
||||
const pages = computed(() => Math.ceil(props.listTotal / props.listSize)) |
||||
const pageList = computed(() => { |
||||
const result = [] |
||||
if (pages.value <= 5) { |
||||
for (let i = 1; i <= pages.value; i++) { |
||||
result.push(i) |
||||
} |
||||
} else { |
||||
if (currentPage.value <= 2) { |
||||
for (let i = 1; i <= 5; i++) { |
||||
result.push(i) |
||||
} |
||||
} else if (currentPage.value >= pages.value - 1) { |
||||
for (let i = pages.value - 4; i <= pages.value; i++) { |
||||
result.push(i) |
||||
} |
||||
} else { |
||||
for (let i = currentPage.value - 2; i <= currentPage.value + 2; i++) { |
||||
result.push(i) |
||||
} |
||||
} |
||||
} |
||||
return result |
||||
}) |
||||
</script> |
||||
|
||||
<template> |
||||
<div flex="~ items-center"> |
||||
<div class="cursor-pointer text-#666666 hover:text-#4080f9" @click="currentPage = 1">首页</div> |
||||
<div mx="10px" flex gap="5px"> |
||||
<div v-if='currentPage > 3' w="30px" h="30px" text="center #666" leading="30px">...</div> |
||||
<div |
||||
v-for="item in pageList" :key="item" |
||||
w="30px" h="30px" text="center #666" leading="30px" cursor="pointer" class="hover:text-#4080f9" |
||||
@click="currentPage = item" |
||||
:class="currentPage === item ? '!text-#4080f9' : ''" |
||||
> |
||||
{{ item }} |
||||
</div> |
||||
<div v-if='currentPage < pages - 2' w="30px" h="30px" text="center #666" leading="30px">...</div> |
||||
</div> |
||||
<div class="cursor-pointer text-#666666 hover:text-#4080f9" @click="currentPage = Math.floor(listTotal / listSize)">末页 |
||||
</div> |
||||
</div> |
||||
</template> |
@ -0,0 +1,5 @@
|
||||
<template> |
||||
<AppHeader></AppHeader> |
||||
<slot /> |
||||
<AppFooter></AppFooter> |
||||
</template> |
@ -0,0 +1,31 @@
|
||||
// https://nuxt.com/docs/api/configuration/nuxt-config
|
||||
export default defineNuxtConfig({ |
||||
devtools: { enabled: false }, |
||||
app: { |
||||
head: { |
||||
title: "", |
||||
htmlAttrs: { |
||||
lang: "zh", |
||||
}, |
||||
meta: [ |
||||
{ charset: "utf-8" }, |
||||
{ "http-equiv": "X-UA-Compatible", content: "IE=edge,chrome=1" }, |
||||
{ "http-equiv": "Cache-Control", content: "no-transform" }, |
||||
{ |
||||
name: "viewport", |
||||
content: "width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0", |
||||
}, |
||||
{ property: "og:title", content: "" }, |
||||
{ name: 'keywords', content: '' } |
||||
], |
||||
}, |
||||
}, |
||||
nitro: { |
||||
compressPublicAssets: true, |
||||
}, |
||||
modules: ["nuxt-swiper", '@unocss/nuxt', '@nuxt/image'], |
||||
image: { |
||||
quality: 80, |
||||
}, |
||||
css: ['assets/styles/reset.scss', 'aos/dist/aos.css'] |
||||
}) |
@ -0,0 +1,30 @@
|
||||
{ |
||||
"name": "winglink-iip-website", |
||||
"private": true, |
||||
"type": "module", |
||||
"scripts": { |
||||
"build": "nuxt build", |
||||
"dev": "nuxt dev", |
||||
"generate": "nuxt generate", |
||||
"preview": "nuxt preview", |
||||
"postinstall": "nuxt prepare" |
||||
}, |
||||
"dependencies": { |
||||
"aos": "^2.3.4", |
||||
"lodash-es": "^4.17.21", |
||||
"nuxt": "^3.10.1", |
||||
"swiper": "^11.0.6", |
||||
"vue": "^3.4.15", |
||||
"vue-router": "^4.2.5" |
||||
}, |
||||
"devDependencies": { |
||||
"@iconify-json/tabler": "^1.1.105", |
||||
"@iconify/utils": "^2.1.22", |
||||
"@nuxt/image": "^1.3.0", |
||||
"@types/aos": "^3.0.7", |
||||
"@types/lodash-es": "^4.17.12", |
||||
"@unocss/nuxt": "^0.58.5", |
||||
"nuxt-swiper": "^1.2.2", |
||||
"sass": "^1.70.0" |
||||
} |
||||
} |
@ -0,0 +1,3 @@
|
||||
{ |
||||
"extends": "../.nuxt/tsconfig.server.json" |
||||
} |
@ -0,0 +1,4 @@
|
||||
{ |
||||
// https://nuxt.com/docs/guide/concepts/typescript |
||||
"extends": "./.nuxt/tsconfig.json" |
||||
} |
@ -0,0 +1,39 @@
|
||||
import { defineConfig, presetAttributify, presetUno, presetIcons, transformerVariantGroup, presetWebFonts } from 'unocss' |
||||
import { FileSystemIconLoader } from '@iconify/utils/lib/loader/node-loaders' |
||||
|
||||
export default defineConfig({ |
||||
presets: [ |
||||
presetUno(), |
||||
presetAttributify(), |
||||
presetIcons({ |
||||
extraProperties: { |
||||
'display': 'inline-block', |
||||
'vertical-align': 'middle', |
||||
}, |
||||
collections: { |
||||
'custom': FileSystemIconLoader('./assets/icons') |
||||
} |
||||
}), |
||||
presetWebFonts() |
||||
], |
||||
transformers: [ |
||||
transformerVariantGroup() |
||||
], |
||||
theme: { |
||||
colors: { |
||||
primary: '', |
||||
title: '', |
||||
'sub-title': '', |
||||
'desc': '' |
||||
} |
||||
}, |
||||
rules: [ |
||||
[/^line-clamp-(\d)/, ([, d]) => ({ |
||||
overflow: 'hidden', |
||||
'text-overflow': 'ellipsis', |
||||
'display': '-webkit-box', |
||||
'-webkit-line-clamp': d, |
||||
'-webkit-box-orient': 'vertical' |
||||
})] |
||||
] |
||||
}) |
Loading…
Reference in new issue