From 8db6f33bb277a4973234c4acb28091095acd9dfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= Date: Wed, 31 Dec 2025 16:18:28 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/title/index.scss | 4 ++ src/forge/Head/Header.js | 2 +- .../v2/components/communityDynamic.jsx | 9 ++- src/forge/projectHome/projectList/index.jsx | 7 +- src/forge/projectHome/projectList/index.scss | 64 +++++++------------ src/forums/list/index.jsx | 7 +- src/forums/list/index.scss | 22 +------ src/news/list/index.jsx | 4 +- src/news/list/index.scss | 8 +++ 9 files changed, 60 insertions(+), 67 deletions(-) diff --git a/src/components/title/index.scss b/src/components/title/index.scss index 289057f08..f442a65d9 100644 --- a/src/components/title/index.scss +++ b/src/components/title/index.scss @@ -35,5 +35,9 @@ } &.font-22:hover::before{ font-size: 17px; + top: 4px; + } + &.font-20:hover::before{ + top: 5px; } } \ No newline at end of file diff --git a/src/forge/Head/Header.js b/src/forge/Head/Header.js index e19455b30..234a6bab3 100644 --- a/src/forge/Head/Header.js +++ b/src/forge/Head/Header.js @@ -324,7 +324,7 @@ class NewHeader extends Component { } = this.state; const navbarlist = [ { - "name": "军用可控开源社区", + "name": "菌用可控开源社区", "link": "/factory", "index": "1", "hidden": false diff --git a/src/forge/Main/projecthome/v2/components/communityDynamic.jsx b/src/forge/Main/projecthome/v2/components/communityDynamic.jsx index d15306eb1..4402f5708 100644 --- a/src/forge/Main/projecthome/v2/components/communityDynamic.jsx +++ b/src/forge/Main/projecthome/v2/components/communityDynamic.jsx @@ -4,6 +4,7 @@ import { getSubDocList, getNewsDetail } from '../../../../Information/api'; import { BrowserRouter as Router, Route, Link } from "react-router-dom"; import moment from 'moment'; import { rollingButton, slidingArrowButton } from '../../../../../components/button'; +import { HoverUnderline } from '../../../../../components/title'; const CommunityDynamic = ({isVisible}) => { const [list1, setList1] = useState([]); @@ -65,7 +66,11 @@ const CommunityDynamic = ({isVisible}) => { {list1.slice(1,5).map((item, index) => (
-
{item.name}
+ + + {item.name} + +

{item.summary}

{index < 3 && } @@ -109,7 +114,7 @@ const CommunityDynamic = ({isVisible}) => { {list3.slice(0,4).map((item, index) => (
  • - {/* {item.name} */} + {/* {item.name} */} {item.name} {index === 0 && NEW} diff --git a/src/forge/projectHome/projectList/index.jsx b/src/forge/projectHome/projectList/index.jsx index f86f42b2f..f4ad6402b 100644 --- a/src/forge/projectHome/projectList/index.jsx +++ b/src/forge/projectHome/projectList/index.jsx @@ -5,6 +5,7 @@ import axios from "axios"; import { Link } from "react-router-dom"; import { getImageUrl, timeAgo } from "educoder"; import Nodata from "../../Nodata"; +import { HoverUnderline } from "../../../components/title"; const { Panel } = Collapse; // 开源协作首页 @@ -190,7 +191,11 @@ function ProjectList() {
    {author.image_url && } - {author.name}/{i.name} + + + {author.name}/{i.name} + +
    {/* 点赞数 */} diff --git a/src/forge/projectHome/projectList/index.scss b/src/forge/projectHome/projectList/index.scss index a4eaff96d..ca44e2990 100644 --- a/src/forge/projectHome/projectList/index.scss +++ b/src/forge/projectHome/projectList/index.scss @@ -10,46 +10,6 @@ color: #2149d4; } - // 标题悬停:下划线从左到右滑出 - .title-border-to-right { - display: inline-block; - max-width: 100%; - position: relative; - - &::after { - position: absolute; - bottom: 0; - left: 0; - content: ''; - width: 0; - height: 1px; - background-color: #2149d4; - transition: all 0.5s ease; - } - - &:hover { - padding-right: 30px; - - &+.hot-tag { - display: none; - } - } - - &:hover::after { - width: 100%; - } - - &:hover::before { - content: "\e9c4"; - font-family: 'iconfont'; - font-weight: normal; - position: absolute; - right: 0px; - font-size: 16px; - top: 6px; - } - } - .author_img { width: 24px; height: 24px; @@ -267,12 +227,28 @@ padding: 2px 25px; background-color: #f7f9fd; border-radius: 17px; + position: relative; + overflow: hidden; + &::before { + content: ''; + position: absolute; + top: 0; + left: -100%; + width: 100%; + height: 100%; + background: linear-gradient(120deg, rgba(255, 255, 255, 0)0%, rgba(255, 255, 255, 0.5)50%, rgba(255, 255, 255, 0)100%); + transition-delay: 0.5s; + } &.active { font-weight: normal; font-size: 16px; color: #ffffff; background-color: #091221; + &::before { + left: 100%; + transition: left 0.5s ease-in-out; + } } } } @@ -379,6 +355,14 @@ height: 30px; border-radius: 6px; } + .project_list_all_list_item-name{ + &:hover{ + padding-right: 30px; + &::before{ + top: 5px; + } + } + } .count_box span { padding: 4px 12px; diff --git a/src/forums/list/index.jsx b/src/forums/list/index.jsx index df77ca506..43bf00335 100644 --- a/src/forums/list/index.jsx +++ b/src/forums/list/index.jsx @@ -10,6 +10,7 @@ import icon10 from '../image/icon10.png'; import Nodata from "../../forge/Nodata"; import { forumSectionId } from "../static"; import { rollingButton } from "../../components/button"; +import { HoverUnderline } from "../../components/title"; function List(props) { const {mygetHelmetapi, location} = props; @@ -220,7 +221,11 @@ function List(props) { return
    {orderIndex < 3 ? : {orderIndex + 1}} - {item.subject} + + + {item.subject} + + {item.sticky && 置顶} {item.is_original && 原创} {item.is_fine && 精华} diff --git a/src/forums/list/index.scss b/src/forums/list/index.scss index 80c15245c..5af82a51a 100644 --- a/src/forums/list/index.scss +++ b/src/forums/list/index.scss @@ -238,27 +238,9 @@ } } .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{ - color:#2149d4; - &::before{ - width: 100%; - } - .icon-jiantou3{ - display: inline-block; + .hover-underline{ + padding-right: 30px; } & ~ .ant-tag{ display: none; diff --git a/src/news/list/index.jsx b/src/news/list/index.jsx index e213195e3..a01014340 100644 --- a/src/news/list/index.jsx +++ b/src/news/list/index.jsx @@ -104,11 +104,11 @@ function List() {
    精彩活动
    {firstActivity &&
    - {firstActivity.summary} + {firstActivity.summary} {moment(firstActivity.name).format('MM/DD')}
    {moment(firstActivity.name).format('HH:MM')}
    - +
    }
    {list2.slice(1, 6).map(item=>{ diff --git a/src/news/list/index.scss b/src/news/list/index.scss index f603278ae..6a3d8e209 100644 --- a/src/news/list/index.scss +++ b/src/news/list/index.scss @@ -95,6 +95,14 @@ position: relative; bottom: -15px; } + .icon-jiantou4{ + font-size: 90px !important; + } + &:hover{ + .icon-jiantou4{ + color: #2149d4; + } + } } .firstDynamics{ background-image: url('../image/bk3.png');