From 7a827f38ca4b231cef0a26139dc63fb637ebf8df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= Date: Tue, 30 Dec 2025 15:25:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=8A=A8=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/button/index.scss | 10 ++++ .../Main/projecthome/v2/components/banner.jsx | 14 +++-- .../v2/components/openSourceCollaboration.jsx | 27 ++++----- src/forge/Main/projecthome/v2/index.scss | 38 +++++++++---- src/forge/projectHome/explore/index.jsx | 4 +- src/forums/list/index.jsx | 13 ++--- src/forums/list/index.scss | 56 ++++++++++++++++--- src/news/list/index.jsx | 3 +- 8 files changed, 120 insertions(+), 45 deletions(-) diff --git a/src/components/button/index.scss b/src/components/button/index.scss index 9b6ef67d1..ea6ebf3f0 100644 --- a/src/components/button/index.scss +++ b/src/components/button/index.scss @@ -60,6 +60,16 @@ &.white { background-color: #ffffff; color: #091221; + &:hover{ + color: #ffffff; + background-color: #091221; + } + } + + &.black-border-button{ + border:1px solid #091221; + color:#091221; + background-color: transparent; } span { diff --git a/src/forge/Main/projecthome/v2/components/banner.jsx b/src/forge/Main/projecthome/v2/components/banner.jsx index ac90aef75..a24672f08 100644 --- a/src/forge/Main/projecthome/v2/components/banner.jsx +++ b/src/forge/Main/projecthome/v2/components/banner.jsx @@ -7,7 +7,8 @@ import gif2 from '../image/gif.webp'; import './index.scss'; function Banner({isVisible}) { - const [active, setActive] = useState(1); + const [active, setActive] = useState(0); + const [active1, setActive1] = useState(0); const lines1 = [ 'if(!isVisible)', @@ -61,6 +62,11 @@ function Banner({isVisible}) { setActive(prevActive => { return prevActive < 2 ? prevActive+1 : 0; }); + setTimeout(() => { + setActive1(prevActive => { + return prevActive < 2 ? prevActive+1 : 0; + }); + }, 300); }, 4000); // 清理定时器 @@ -107,8 +113,8 @@ function Banner({isVisible}) {
持续汇聚多源需求 {/* 四张banner轮播 */} -
-
+
+
{bannerList.map((item, index) => { return
{item.title}
})} @@ -121,7 +127,7 @@ function Banner({isVisible}) { */}
- +
diff --git a/src/forge/Main/projecthome/v2/components/openSourceCollaboration.jsx b/src/forge/Main/projecthome/v2/components/openSourceCollaboration.jsx index f060a8f79..b74e92d94 100644 --- a/src/forge/Main/projecthome/v2/components/openSourceCollaboration.jsx +++ b/src/forge/Main/projecthome/v2/components/openSourceCollaboration.jsx @@ -56,19 +56,20 @@ const OpenSourceCollaboration = ({isVisible}) => {
- {features.map((feature, index) => ( -
- - - {feature.title} - -
{feature.description}
-
- ))} - +
+ {features.map((feature, index) => ( +
+ + + {feature.title} + +
{feature.description}
+
+ ))} +
{rollingButton({href: `/projects`, classname: 'mt10 white'})}
diff --git a/src/forge/Main/projecthome/v2/index.scss b/src/forge/Main/projecthome/v2/index.scss index 83f052680..61214b457 100644 --- a/src/forge/Main/projecthome/v2/index.scss +++ b/src/forge/Main/projecthome/v2/index.scss @@ -391,7 +391,7 @@ color: #091221; text-align: left; position: relative; - top: 10px; + top: 15px; &-img{ position: absolute; width: 68px; @@ -400,13 +400,13 @@ } } &-avtive-img{ - width: 100%; + width: 105%; } } .banner_img4 { position: absolute; - bottom: -80px; - right: -35px; + bottom: -78px; + right: -62px; width: 260px; transform: scaleX(-1); } @@ -987,18 +987,26 @@ .left-panel-features-list { margin: 93px 0 98px 100px; } - - .feature-item:not(:last-of-type) { + .feature-item-box{ position: relative; - - &::before { + &::before{ content: ''; position: absolute; width: 1px; - height: 95%; + height: 74%; border-right: 1px dashed white; left: 7px; - top: 29px; + top: 25px; + } + &-active::after{ + content: ''; + position: absolute; + left: 7px; + top: 25px; + width: 1px; + height: 0; + background-color: white; + animation: height0-74 5.8s linear 0s infinite; } } } @@ -1368,4 +1376,14 @@ 100% { width: 100%; } +} + +@keyframes height0-74 { + 0% { + height: 0; + } + + 100% { + height: 74%; + } } \ No newline at end of file diff --git a/src/forge/projectHome/explore/index.jsx b/src/forge/projectHome/explore/index.jsx index 4a9713b46..7b7ef0c50 100644 --- a/src/forge/projectHome/explore/index.jsx +++ b/src/forge/projectHome/explore/index.jsx @@ -195,11 +195,11 @@ function ProjectHomePage(props) { const url = i.author ? `/${i.author.login}/${i.identifier}${i.author.login === "gh_mirrors" ? "/about" : "/about"}` : `` return
-
+
{i.topics &&
{i.topics.slice(0, 2).map(item => {item.name})}
} -
{i.name}
+
{i.name}
{i.description &&
{i.description}
} {rollingButton({href: url, name: "查看详情", hoverName: "查看详情", classname: 'mt10'})}
diff --git a/src/forums/list/index.jsx b/src/forums/list/index.jsx index 2e7618a80..46111a159 100644 --- a/src/forums/list/index.jsx +++ b/src/forums/list/index.jsx @@ -45,11 +45,8 @@ function List(props) { function init(updatedTags){ const tagByState = updatedTags.filter(i=>i.title.includes(tagNameByState)) setForumTagDetail(tagByState && !!tagByState.length ? tagByState[0] : updatedTags[0]); - if(tagByState && !tagByState.length) return - const targetDiv = document.getElementById("forums-list3-id"); - const targetDivRect = targetDiv.getBoundingClientRect(); - targetDiv && window.scrollTo({ - top: targetDivRect.top+window.screenY, + tagByState && !!tagByState.length && window.scrollTo({ + top: 850, behavior: 'smooth' }) } @@ -154,7 +151,7 @@ function List(props) {
{item.subject} - {index === 0 && new} + {index === 0 && NEW} {item.is_original && 原创}
@@ -186,7 +183,7 @@ function List(props) {
{forumTag.map((item, index) => { const isSelected = forumTagDetail && forumTagDetail.id === item.id; - const forums = item.essencePosts[0] || {}; + const forums = item.essencePosts && item.essencePosts[0] || {}; return (
{setForumTagDetail(item)}}>
@@ -247,7 +244,7 @@ function List(props) { {forumListByTag.length === 0 && ( )} - { setPage(page) }} className='center mt30' /> + { setPage(page) }} className='edu-txt-right mt30' />
diff --git a/src/forums/list/index.scss b/src/forums/list/index.scss index ee0c3eaea..38ac47286 100644 --- a/src/forums/list/index.scss +++ b/src/forums/list/index.scss @@ -7,6 +7,9 @@ padding: 0 3px; margin-left: 10px; margin-right: 0px; + &+.ant-tag{ + margin-left: 6px; + } } } @@ -71,6 +74,7 @@ cursor: pointer; padding: 10px 15px 10px 15px; line-height: normal; + position: relative; .forums-subject { padding: 8px 0; @@ -79,6 +83,18 @@ color: #091221; } } + &::after { + position: absolute; + bottom: -1px; + left: 5%; + content: ''; + width: 0; + height: 1px; + background-color: #2149d4; + } + &-active::after{ + animation: bottomflowLight 3s forwards; + } } .forums-list-item:not(:last-of-type):not(.forums-list-item-active) { @@ -89,8 +105,8 @@ } .forums-list-item:hover, .forums-list-item-active { - background-color: #f7f9fd; - border-radius: 10px; + background-image: linear-gradient(180deg,#f7f9fd00 0%, #f7f9fd 100%); + border-radius: 4px; font-weight: bold; .forums-subject { @@ -132,16 +148,16 @@ &.active{ border-color: #2149d4; &::before{ - content: '\e791'; + content: '\e880'; font-family: "iconfont"; position: absolute; - bottom: -32px; - font-size: 26px; + bottom: -20px; + font-size: 13px; left: 48%; color: #2149d4; } } - &:nth-of-type(2) .forums-section-item{ + &:nth-of-type(2) .forums-section-item, &:nth-of-type(4) .forums-section-item{ background-image:linear-gradient(90deg,#D7DEFF 0% 49.37%,#C7CFFF 100%); } } @@ -212,15 +228,31 @@ } } .forums-list4-item-link{ + position: relative; .icon-jiantou3{ display: none; } + &::before{ + content: ''; + position: absolute; + bottom: 0; + left: 0; + width: 0; + height: 1px; + background-color: #2149d4; + transition: width 1s ease; + } &:hover{ - padding-right: 20px; color:#2149d4; + &::before{ + width: 100%; + } .icon-jiantou3{ display: inline-block; } + & ~ .ant-tag{ + display: none; + } } } } @@ -238,4 +270,14 @@ transform: rotate(-8deg); transform-origin: center bottom; } +} + +@keyframes bottomflowLight { + 0% { + width: 0; + } + + 100% { + width: 90%; + } } \ No newline at end of file diff --git a/src/news/list/index.jsx b/src/news/list/index.jsx index 481a58860..4acd16eb8 100644 --- a/src/news/list/index.jsx +++ b/src/news/list/index.jsx @@ -9,6 +9,7 @@ import RenderHtml from "../../components/render-html"; import icon2 from '../image/icon2.png' import icon13 from '../image/icon13.png' import icon14 from '../image/icon14.png' +import { rollingButton } from "../../components/button"; function List() { const [list1, setList1] = useState([]); @@ -72,7 +73,7 @@ function List() {
{item.summary}
- + {rollingButton({href: `/news/${item.id}`, classname: "black-border-button"})} {item.publishTime}发布