From 45d57f7184c2d0d2ead600436f5169fe81c880f4 Mon Sep 17 00:00:00 2001 From: Cxx0822 <1556464090@qq.com> Date: Tue, 28 Apr 2026 23:09:30 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=9B=B4=E6=96=B0=E5=B8=83=E5=B1=80?= =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 5 + nginx.conf | 8 ++ src/App.vue | 75 +++++++++------ src/components/Contact/ContactForm.vue | 22 +---- src/components/Contact/ContactInfo.vue | 6 +- src/components/Contact/ContactSection.vue | 94 +++---------------- src/components/Education/EducationCard.vue | 15 +-- src/components/Education/EducationSection.vue | 40 ++------ src/components/Experience/ExperienceCard.vue | 6 +- .../Experience/ExperienceSection.vue | 30 +----- src/components/Footerbar.vue | 14 +-- src/components/HeroSection.vue | 19 +--- src/components/Navbar.vue | 61 +++--------- src/components/Project/ProjectCard.vue | 8 +- src/components/Project/ProjectSection.vue | 31 ++---- src/components/SkillsSection.vue | 77 ++------------- src/store/profile.ts | 2 +- src/utils/index.ts | 11 +++ 18 files changed, 150 insertions(+), 374 deletions(-) create mode 100644 Dockerfile create mode 100644 nginx.conf diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d694c2e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,5 @@ +FROM nginx:1.27.0 +COPY dist /usr/share/nginx/html +COPY nginx.conf /etc/nginx/conf.d/default.conf +RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime +RUN echo 'Asia/Shanghai' > /etc/timezone diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..49025f2 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,8 @@ +server { + listen 80; + server_name _; + + # 设置根目录 + root /usr/share/nginx/html; + index index.html; +} \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index 65669ba..db3d8af 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,10 +1,9 @@ diff --git a/src/store/profile.ts b/src/store/profile.ts index c847d00..d9dc41f 100644 --- a/src/store/profile.ts +++ b/src/store/profile.ts @@ -62,7 +62,7 @@ export const useProfileStore = defineStore('profile', { education: [ { period: '2015年9月 - 2017年6月', - degree: '自动化专业 专科(偏软件方向)', + degree: '自动化专业', school: '南京工业大学', description: '主修自动化专业,侧重软件与控制系统开发方向,系统学习数据结构、算法、计算机基础等核心课程,参与多个课程设计与项目实践。', detailsTitle: '主要课程', diff --git a/src/utils/index.ts b/src/utils/index.ts index 9b450b3..1454a81 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -20,3 +20,14 @@ export const getObserver = () => { }) }, { threshold: 0.1 }) } + +// 滚动到指定区域 +export const scrollToSection = (sectionId: string) => { + const element = document.getElementById(sectionId) + if (element) { + window.scrollTo({ + top: element.offsetTop - 80, + behavior: 'smooth' + }) + } +}