diff --git a/src/assets/index.css b/src/assets/index.css index c096faa..c9d9ead 100644 --- a/src/assets/index.css +++ b/src/assets/index.css @@ -8,7 +8,7 @@ /* 首页 hero 区域高度和间距 */ --hero-height: 600px; /* hero 默认高度 */ - --hero-height-small: 200px; + --hero-height-small: 150px; /* hero 收缩后高度 */ --hero-margin-top: 5%; /* hero 顶部外边距 */ @@ -68,11 +68,14 @@ /* 菜单字体大小 */ --font-weight-menu: bold; /* 菜单字体加粗 */ + --body-background-img: url('../img/8.21.1.jpg'); + /* 页面背景图片 */ } /* 页面背景设置 */ body { - background-image: url('../img/8.21.1.jpg'); + background-image: var(--body-background-img); + /* 背景图片 */ background-size: 120% 120%; /* 背景图片缩放比例 */ background-repeat: no-repeat; @@ -180,11 +183,13 @@ p { display: flex; border-right: 0; } + /* 内容通用背景区样式 */ #allstyle { background-color: rgba(255, 255, 255, 0.85); border-radius: 10px; } + /* 内容区样式 */ #content-section { min-height: 100vh; @@ -300,7 +305,11 @@ p { --content-margin: 0; --leftmodlue-width: 100%; --nonsense-title-width: 95%; + --nonsense-title-margin-bottom: 15px; --nav-padding-small: 0 8px; + --nonsenset-margin-top: 10px; + --body-background-img: url(); + /* 移动端不显示背景图片 */ } .elrow-top { @@ -349,11 +358,11 @@ p { .RouterViewpage { width: 100%; - margin: 5% 0 0 0; } .nonsensetitle { - width: var(--nonsense-title-width); + position: relative; + margin-top: 10%; padding: 10px; font-size: 1rem; } diff --git a/src/index.vue b/src/index.vue index dc338f9..d836378 100644 --- a/src/index.vue +++ b/src/index.vue @@ -38,7 +38,7 @@
-
+

发癫中QAQ

@@ -105,7 +105,10 @@ const handleSelect = (key: string) => { */ const updatePageState = (url: string) => { classhero.value = url !== '/:type'; - classnonsenset.value = url === '/nonsense'; + console.log("当前路径是:"+url); + classnonsenset.value = url == '/nonsense'; + console.log( classnonsenset.value); + }; /** @@ -151,12 +154,14 @@ const handleScroll = () => { isconts.value = true; isScrollingleftmodlue.value = true; } + console.log("好耶滚动了"); }; /** * 添加滚动监听 */ const addScrollListener = () => { + console.log("添加滚动监听"); window.addEventListener('scroll', handleScroll); }; @@ -164,6 +169,7 @@ const addScrollListener = () => { * 移除滚动监听 */ const removeScrollListener = () => { + console.log("移除滚动监听"); window.removeEventListener('scroll', handleScroll); }; @@ -178,10 +184,10 @@ const handleResize = () => { isScrollingleftmodlue.value = true; classnonsenset.value = false; isconts.value = true; - removeScrollListener(); + // removeScrollListener(); } else { windowwidth.value = true; - addScrollListener(); + } }; @@ -194,7 +200,7 @@ const setActiveIndex = (locationpathname) => { // 生命周期钩子 onMounted(() => { - handleResize(); + handleResize(); addScrollListener(); window.addEventListener('resize', handleResize); // 初始进入时如果是首页,启动打字机 if (window.location.pathname === '/:type') { @@ -203,10 +209,9 @@ onMounted(() => { }); onUnmounted(() => { - removeScrollListener(); + // removeScrollListener(); window.removeEventListener('resize', handleResize); if (heroTimer) clearInterval(heroTimer); }); - \ No newline at end of file + \ No newline at end of file diff --git a/src/views/articlecontents.vue b/src/views/articlecontents.vue index d68099b..4752da8 100644 --- a/src/views/articlecontents.vue +++ b/src/views/articlecontents.vue @@ -5,9 +5,11 @@

通过传来的{{ urls }}向服务器发送请求获取相关文章的链接

+ - \ No newline at end of file + \ No newline at end of file diff --git a/src/views/home.vue b/src/views/home.vue index 838f487..f0a84c9 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -13,6 +13,7 @@

{{ item.publishedAt }}

+ - - - \ No newline at end of file