feat: improve page readability, add thumbnail switcher, CI/CD config
Some checks failed
ci/woodpecker/manual/woodpecker Pipeline failed

- Improve spacing and typography on product intro and scenarios pages
- Add thumbnail click switching for architecture hardware showcase
- Fix thumbnail click target and z-index overlap issues
- Add .woodpecker.yml, Dockerfile, and docker-compose.yml for CI/CD
- Set Vite base path to /lnbox/ for sub-path deployment
This commit is contained in:
kkfluous
2026-06-05 16:14:55 +08:00
parent 9f4de27243
commit fc47801968
6 changed files with 3179 additions and 268 deletions

63
.woodpecker.yml Normal file
View File

@@ -0,0 +1,63 @@
steps:
- name: pnpm-build
image: node:22-alpine
when:
event:
- push
- pull_request
- manual
branch:
- master
- develop
- main
commands: |
cd $CI_WORKSPACE
npm install -g pnpm
pnpm install
pnpm build
# 获取分支名
BRANCH_NAME=$(echo $CI_COMMIT_BRANCH | tr / -)
echo "Branch name: $BRANCH_NAME"
# 版本号: 分支名-package.json版本
PKG_VERSION=$(node -e "console.log(require('./package.json').version)")
PROJECT_VERSION="$BRANCH_NAME-$PKG_VERSION"
echo "Docker tag: $PROJECT_VERSION"
echo $PROJECT_VERSION > $CI_WORKSPACE/project_version.txt
- name: docker-build
image: docker:24.0.5-cli
when:
event:
- push
- pull_request
- manual
branch:
- master
- develop
- main
volumes:
- /var/run/docker.sock:/var/run/docker.sock
commands: |
PROJECT_VERSION=$(cat $CI_WORKSPACE/project_version.txt)
MODULE_NAME=lnbox
echo "Building Docker image: $MODULE_NAME:$PROJECT_VERSION"
cd $CI_WORKSPACE
docker build -t harbor.lnh2e.com/lingniu-v1/$MODULE_NAME:$PROJECT_VERSION .
mkdir -p /root/.docker
cat > /root/.docker/config.json <<EOF
{
"auths": {
"harbor.lnh2e.com": {
"auth": "$(echo Y2ljZDpMbkBjaWNkMDE=)"
}
}
}
EOF
docker push harbor.lnh2e.com/lingniu-v1/$MODULE_NAME:$PROJECT_VERSION

30
Dockerfile Normal file
View File

@@ -0,0 +1,30 @@
FROM node:22-alpine as builder
WORKDIR /usr/src/app
COPY . .
RUN npm install pnpm -g
RUN pnpm install
RUN pnpm build
FROM nginx:1.26
COPY --from=0 /usr/src/app/dist /usr/share/nginx/html/lnbox
RUN echo "server {\
listen 80;\
server_name localhost;\
location / {\
return 301 /lnbox/;\
}\
location /lnbox {\
alias /usr/share/nginx/html/lnbox;\
index index.html index.htm;\
try_files \$uri \$uri/ /lnbox/index.html;\
}\
}" > /etc/nginx/conf.d/default.conf
EXPOSE 80

16
docker-compose.yml Normal file
View File

@@ -0,0 +1,16 @@
version: '3.8'
services:
lnbox:
image: harbor.lnh2e.com/lingniu-v1/lnbox:main-0.0.0
ports:
- "8029:80"
deploy:
replicas: 1
restart_policy:
condition: on-failure
placement:
constraints: [node.role == manager]
labels:
- portainer.hide=false
- project=lingniu

2795
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -5,6 +5,7 @@ import {defineConfig} from 'vite';
export default defineConfig(() => {
return {
base: '/lnbox/',
plugins: [react(), tailwindcss()],
resolve: {
alias: {