Merge remote-tracking branch 'origin/factory' into factory
This commit is contained in:
commit
16a4ff3dd1
|
|
@ -4,7 +4,7 @@
|
|||
}
|
||||
|
||||
to {
|
||||
top: 0
|
||||
top: var(--top, 0px)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,16 +4,16 @@ import arrowIcon from '../../images/icon_arrow.png'
|
|||
import './index.scss';
|
||||
|
||||
// 鼠标悬停箭头往右上角走的效果
|
||||
export const slidingArrowButton = ({href="/", name="探索更多内容", classname="font-16 font-bd", imageSrc}) =>{
|
||||
return <Link to={href} className={`slidingArrowButton ${classname}`}>
|
||||
export const slidingArrowButton = ({href="/", name="探索更多内容", classname="font-16 font-bd", imageSrc, target="_self"}) =>{
|
||||
return <Link to={href} className={`slidingArrowButton ${classname}`} target={target}>
|
||||
{name}
|
||||
<span className="arrowIconBox"><img src={imageSrc || arrowIcon} className="arrowIcon"/></span>
|
||||
</Link>
|
||||
}
|
||||
|
||||
// 鼠标悬停文本往上翻滚,再加背景光从左往右
|
||||
export const rollingButton = ({href="/", name="了解更多", hoverName="了解更多", classname="mt20"}) =>{
|
||||
return <a className={`rollingButton ${classname}`} href={href}>
|
||||
export const rollingButton = ({href="/", name="了解更多", hoverName="了解更多", classname="mt20", target="_self"}) =>{
|
||||
return <a className={`rollingButton ${classname}`} href={href} target={target}>
|
||||
<span>{name}</span>
|
||||
<span>{hoverName}</span>
|
||||
</a>
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 177 KiB |
|
|
@ -9,6 +9,7 @@ import './index.scss';
|
|||
function Banner({isVisible}) {
|
||||
const [active, setActive] = useState(0);
|
||||
const [active1, setActive1] = useState(0);
|
||||
const [intervalId, setIntervalId] = useState(null);
|
||||
|
||||
const lines1 = [
|
||||
'if(!isVisible)',
|
||||
|
|
@ -77,6 +78,7 @@ function Banner({isVisible}) {
|
|||
});
|
||||
}, 400);
|
||||
}, 3000);
|
||||
setIntervalId(interval);
|
||||
|
||||
// 清理定时器
|
||||
return () => {
|
||||
|
|
@ -84,6 +86,29 @@ function Banner({isVisible}) {
|
|||
};
|
||||
}, []);
|
||||
|
||||
const pauseInterval = () => {
|
||||
if (intervalId) {
|
||||
clearInterval(intervalId);
|
||||
setIntervalId(null);
|
||||
}
|
||||
};
|
||||
|
||||
const resumeInterval = () => {
|
||||
if (!intervalId) {
|
||||
const interval = setInterval(() => {
|
||||
setActive(prevActive => {
|
||||
return prevActive < 3 ? prevActive+1 : 0;
|
||||
});
|
||||
setTimeout(() => {
|
||||
setActive1(prevActive => {
|
||||
return prevActive < 3 ? prevActive+1 : 0;
|
||||
});
|
||||
}, 400);
|
||||
}, 3000);
|
||||
setIntervalId(interval);
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="banner_v2 color-white home_v2_child eco_home_banner" id="home_v2_child1">
|
||||
{/* 主要内容区域 */}
|
||||
|
|
@ -114,22 +139,24 @@ function Banner({isVisible}) {
|
|||
</div>
|
||||
<div style={{ margin: '3px 25px' }}>
|
||||
{/* <ActionItem className="center-1-bk-wrapper" padding="2px" borderRadius="15px"> */}
|
||||
<div className='center-image-container-content'>
|
||||
<div className='center-image-container-content' onMouseEnter={pauseInterval} onMouseLeave={resumeInterval}>
|
||||
<span className='font-18 center-image-container-content-title'>{bannerList[active].desc1}</span>
|
||||
{/* 四张banner轮播 */}
|
||||
<div className='center-image-container-content-banner-box FlexAJ pt3'>
|
||||
<div className='center-image-container-content-banner-box-left mb20'>
|
||||
{bannerList.map((item, index) => {
|
||||
return <div className={`center-image-container-content-banner-box-left-item ${active === index ? 'active' : ''}`}>{item.title}</div>
|
||||
return <div className={`center-image-container-content-banner-box-left-item pointer ${active === index ? 'active' : ''}`} onClick={()=>{
|
||||
setActive(index);
|
||||
setTimeout(() => {
|
||||
setActive1(index);
|
||||
}, 200);
|
||||
}}>{item.title}</div>
|
||||
})}
|
||||
</div>
|
||||
<div>
|
||||
<div className='center-image-container-content-banner-box-avtive-desc font-15'>
|
||||
{bannerList[active].desc}
|
||||
<img src={gif1} className='center-image-container-content-banner-box-avtive-desc-img'/>
|
||||
{/* <video autoPlay muted>
|
||||
<source src={gif1}/>
|
||||
</video> */}
|
||||
</div>
|
||||
<img src={bannerList[active1].image} className='center-image-container-content-banner-box-avtive-img'/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ const CommunityDynamic = ({isVisible}) => {
|
|||
<p className="opacity8 font-16 task-hide-2 line-normal mt5" title={firstByList1.summary}>
|
||||
{firstByList1.summary}
|
||||
</p>
|
||||
{rollingButton({href: `/news/${firstByList1.id}`})}
|
||||
{rollingButton({href: `/news/${firstByList1.id}`, target:"_blank"})}
|
||||
</div>
|
||||
|
||||
{/* 新闻列表 */}
|
||||
|
|
@ -66,7 +66,7 @@ const CommunityDynamic = ({isVisible}) => {
|
|||
{list1.slice(1,5).map((item, index) => (
|
||||
<Fragment key={index}>
|
||||
<div className="news-item-v2">
|
||||
<Link title={item.name} to={`/news/${item.id}`}>
|
||||
<Link title={item.name} to={`/news/${item.id}`} target="_blank">
|
||||
<HoverUnderline classname='font-20 font-bd task-hide'>
|
||||
{item.name}
|
||||
</HoverUnderline>
|
||||
|
|
@ -90,7 +90,7 @@ const CommunityDynamic = ({isVisible}) => {
|
|||
{list2_home.map((item, index) => (
|
||||
<li key={index} className={`activity-item-v2 df activity-section-item ${activeId === index ? 'activity-section-item-active' : ''}`}>
|
||||
<span className="font-16 flex1 AlignCenter">
|
||||
<Link to={`/news/${item.id}`} className="title-border-to-right-icon task-hide" title={item.summary}>{item.summary}</Link>
|
||||
<Link to={`/news/${item.id}`} className="title-border-to-right-icon task-hide" title={item.summary} target="_blank">{item.summary}</Link>
|
||||
{index === 1 && <span className="hot-tag color-white ml5">HOT</span>}
|
||||
</span>
|
||||
{/* <span className="opacity8 font-15">{moment(item.publishTime).format('MM月DD日')}</span> */}
|
||||
|
|
@ -126,7 +126,7 @@ const CommunityDynamic = ({isVisible}) => {
|
|||
</div>
|
||||
|
||||
<div className='center pt30'>
|
||||
{slidingArrowButton({ href: '/news' })}
|
||||
{slidingArrowButton({ href: '/news', target: "_blank" })}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ const ForumExchange = () => {
|
|||
))}
|
||||
</div>
|
||||
<div className='center mt40 mt-8'>
|
||||
{slidingArrowButton({href:"/forums", classname:"font-16 font-bd color-white", imageSrc: icon_arrow1})}
|
||||
{slidingArrowButton({href:"/forums", classname:"font-16 font-bd color-white", imageSrc: icon_arrow1, target: "_blank"})}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ const OpenSourceCollaboration = ({isVisible}) => {
|
|||
</div>
|
||||
))}
|
||||
</div>
|
||||
{rollingButton({href: `/projects`, classname: 'mt10 white'})}
|
||||
{rollingButton({href: `/projects`, classname: 'mt10 white', target:"_blank"})}
|
||||
</div>
|
||||
|
||||
<div className="right-panel">
|
||||
|
|
|
|||
|
|
@ -43,14 +43,21 @@ const RepositoryV2 = () => {
|
|||
<div className='repository-v2-content'>
|
||||
|
||||
{/* 导航标签 */}
|
||||
<div className="nav-tabs-v2">
|
||||
{tabs.map((tab) => (
|
||||
<div key={tab.id} className={`tab-item-v2 font-18`}>
|
||||
<img src={tab.icon} alt={tab.label} className="mb5 mr3" width={24}/>
|
||||
<span>{tab.label}</span>
|
||||
</div>
|
||||
))}
|
||||
<div className='FlexAJ mb35'>
|
||||
<div className='font-16'>
|
||||
<div className='font-26 font-bd mb10'>菌用开源资源可信服务平台</div>
|
||||
菌用开源软件仓库是国防领域专业化开源服务平台,聚焦可信引入、安全存储、可控访问、高效分发核心能力,<br/>遵循菌用标准,为菌用软件研发提供合规、安全、高效的开源资源支撑
|
||||
</div>
|
||||
<div className="nav-tabs-v2">
|
||||
{tabs.map((tab) => (
|
||||
<div key={tab.id} className={`tab-item-v2 font-20`}>
|
||||
<img src={tab.icon} alt={tab.label} className="mb5 mr3" width={24}/>
|
||||
<span>{tab.label}</span>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
{/* 主要内容区域 */}
|
||||
<div className="content-wrapper-v2 df">
|
||||
|
|
@ -75,7 +82,7 @@ const RepositoryV2 = () => {
|
|||
))}
|
||||
</div>
|
||||
|
||||
{rollingButton({href: `/explore`})}
|
||||
{rollingButton({href: `/explore`, target:"_blank"})}
|
||||
</div>
|
||||
|
||||
{/* 右侧架构图 - 使用图片 */}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ function SoftwareFactory() {
|
|||
<div className='font-16'>极速模式聚焦任务 - 代码 - 制品,助力软件研发快速响应、<br />实现极致效率</div>
|
||||
</div>
|
||||
</div>
|
||||
{rollingButton({href: `/sf`, classname: 'mt70'})}
|
||||
{rollingButton({href: `/sf`, classname: 'mt70', target:"_blank"})}
|
||||
</div>
|
||||
<div className='flex1'>
|
||||
<img src={active === 1 ? img11 : img12} alt='' />
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ const SupplyChainGovernance = () => {
|
|||
</div>
|
||||
|
||||
<div className='center mt40 mt-8'>
|
||||
{slidingArrowButton({href:"/governance"})}
|
||||
{slidingArrowButton({href:"/governance", target: "_blank"})}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -10,18 +10,11 @@ const TerminalAnimation = ({ startAnimation = true, lines, width, height, class_
|
|||
const animationRef = useRef(null);
|
||||
|
||||
const keyColor = {
|
||||
'git clone': '#fff700',
|
||||
'git commit': '#fff700',
|
||||
'git log': '#fff700',
|
||||
'git merge': '#fff700',
|
||||
'git remote': '#fff700',
|
||||
'git pull': '#d24a6f',
|
||||
'git push': '#d24a6f',
|
||||
'git status': '#2977ff',
|
||||
'git fetch': '#2977ff',
|
||||
'git add': '#9aff41',
|
||||
'cd forgeplus': '#9aff41',
|
||||
'git checkout': '#9aff41'
|
||||
'if(!isVisible)': '#e5caff6a',
|
||||
'setInterval': '#e5caff6a',
|
||||
'clearInterval': '#e5caff6a',
|
||||
'const params': '#e5caff6a',
|
||||
'addComment': '#e5caff6a'
|
||||
};
|
||||
|
||||
const fontSize = 12;
|
||||
|
|
|
|||
|
|
@ -496,13 +496,18 @@
|
|||
.nav-tabs-v2 {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 60px;
|
||||
margin-bottom: 50px;
|
||||
flex-wrap: wrap;
|
||||
gap: 20px;
|
||||
width: 710px;
|
||||
|
||||
.tab-item-v2 {
|
||||
padding: 9px 35px;
|
||||
background-color: #f6f7fa;
|
||||
border-radius: 27px;
|
||||
width:223px;
|
||||
height:74px;
|
||||
background-color:#f6f7fa;
|
||||
border-radius:10px;
|
||||
text-align: center;
|
||||
line-height: 74px;
|
||||
|
||||
// transition: all 0.3s ease;
|
||||
// &.active {
|
||||
// background-color: #091221;
|
||||
|
|
@ -541,7 +546,7 @@
|
|||
}
|
||||
|
||||
.supply-chain-governance {
|
||||
padding: 30px 20px 50px;
|
||||
padding: 70px 20px 50px;
|
||||
|
||||
.governance-grid {
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -1,49 +1,24 @@
|
|||
import React, { useEffect } from "react";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import loadingGIf from "../../Images/loading.gif";
|
||||
|
||||
function Sbom(props) {
|
||||
const {mygetHelmetapi, current_user} = props;
|
||||
const {common} = mygetHelmetapi || {};
|
||||
const {governance="http://172.16.6.252:10010"} = common || {};
|
||||
const {user_id} = current_user || {}
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
||||
const { projectsId, owner } = props.match.params;
|
||||
const str = projectsId.replace(/\./g, "_")
|
||||
// const url = `http://localhost:3007/gagaga/accepts_1.3.8/sbom`
|
||||
const url = `${governance}/governancePortal/sbom/${str}?uid=${user_id}`
|
||||
|
||||
// useEffect(() => {
|
||||
// window.addEventListener("message", iframeHeight, false);
|
||||
// return () => {
|
||||
// window.removeEventListener("message", iframeHeight, false);
|
||||
// }
|
||||
// })
|
||||
|
||||
// function iframeHeight(e) {
|
||||
// try {
|
||||
// if (e && e.data && typeof (e.data) === "string") {
|
||||
// let myHeight = JSON.parse(e.data);
|
||||
// if (document.querySelector("#sbomIframe")) {
|
||||
// document.querySelector("#sbomIframe").height = myHeight.height;
|
||||
// }
|
||||
// }
|
||||
// } catch (error) {
|
||||
// console.error(err);
|
||||
// }
|
||||
// }
|
||||
|
||||
// function iframeLoad() {
|
||||
// try {
|
||||
// let myIframe = document.getElementById("sbomIframe");
|
||||
// if (myIframe.contentDocument) {
|
||||
// myIframe.height = myIframe.contentDocument.querySelector('.jyh-card').clientHeight + 260;
|
||||
// }
|
||||
// } catch (err) {
|
||||
// console.error(err);
|
||||
// }
|
||||
// }
|
||||
|
||||
return <div className="main" style={{border: "none", margin: '30px auto', padding: '0'}}>
|
||||
<iframe title={`sbomIframe`} src={url} id={`sbomIframe`} frameBorder="0" name={`sbomIframe`} width="100%" height={'auto'} style={{minHeight: '70vh'}}></iframe>
|
||||
return <div className="main" style={{border: "none", margin: '30px auto', padding: '0', position:'relative'}}>
|
||||
{loading && <div className="center" style={{position: 'absolute', width: '100%'}}>
|
||||
<img src={loadingGIf} width={250}/>
|
||||
<div className="font-16" style={{position: 'relative', top: '-40px', color: '#091221', opacity: '0.6'}}>加载中,请耐心等待</div>
|
||||
</div>}
|
||||
<iframe title={`sbomIframe`} src={url} id={`sbomIframe`} frameBorder="0" name={`sbomIframe`} width="100%" height={'auto'} style={{minHeight: '70vh'}} onLoad={()=>{setLoading(false)}}></iframe>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
import React, { useEffect } from "react";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { TPMIndexHOC } from "../modules/tpm/TPMIndexHOC";
|
||||
import loadingGIf from "./Images/loading.gif";
|
||||
function Sbom(props) {
|
||||
const {current_user, mygetHelmetapi} = props;
|
||||
const {admin, user_id} = current_user || {}
|
||||
const {common} = mygetHelmetapi || {};
|
||||
const {governance="http://172.16.6.252:10010"} = common || {};
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
||||
useEffect(()=>{
|
||||
document.title = '供应链监测预警平台';
|
||||
}, [])
|
||||
|
|
@ -13,7 +16,11 @@ function Sbom(props) {
|
|||
// const url = "http://localhost:3007/"
|
||||
|
||||
return <div className="" style={{border: "none"}}>
|
||||
<iframe title={`sbomIframe`} src={url} id={`sbomIframe`} frameBorder="0" name={`sbomIframe`} width="100%" height={'auto'} style={{minHeight: '90vh'}}></iframe>
|
||||
{loading && <div className="center" style={{minHeight: '60vh', marginTop: '30vh'}}>
|
||||
<img src={loadingGIf} width={250}/>
|
||||
<div className="font-16" style={{position: 'relative', top: '-40px', color: '#091221', opacity: '0.6'}}>加载中,请耐心等待</div>
|
||||
</div>}
|
||||
<iframe title={`sbomIframe`} src={url} id={`sbomIframe`} frameBorder="0" name={`sbomIframe`} width="100%" height={'auto'} style={{minHeight: '90vh'}} onLoad={()=>{setLoading(false)}}></iframe>
|
||||
</div>
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -246,7 +246,7 @@ function ProjectHomePage(props) {
|
|||
<div className="home_project_list_box">
|
||||
{projectsList && !!projectsList.length ? <div className={`df home_project_list ${!topicsLength ? 'sixItemBox' : ''}`}>
|
||||
{projectsList.map(i => {
|
||||
const url = i.author ? `/${i.author.login}/${i.identifier}${i.author.login === "gh_mirrors" ? "/about" : "/about"}` : ``
|
||||
const url = i.author ? `/${i.author.login}/${i.identifier}` : ``
|
||||
return <div className="home_project">
|
||||
<div className="df a-i-center mb5">
|
||||
{i.lesson_url && <img src={getImageUrl(`${i.lesson_url}`)} alt="" className="author_img" />}
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ function ProjectList() {
|
|||
<div className="center pt80 project_home_banner width1600">
|
||||
<div className="font-60 p_h_title"><span>开源协作·</span><span className="p_h_title_text">共建生态</span></div>
|
||||
<ActionItem padding="1px" className="search_p_h_box" borderRadius="32px">
|
||||
<Input.Search placeholder={`输入名称关键字(共${total}个)`} className="search_p_h" onChange={(e)=>{setSearchValue(e.target.value)}} suffix={<span className="search_icon" onClick={()=>{setSearch(searchValue)}}>
|
||||
<Input.Search placeholder={`输入名称关键字`} className="search_p_h" onChange={(e)=>{setSearchValue(e.target.value)}} suffix={<span className="search_icon" onClick={()=>{setSearch(searchValue)}}>
|
||||
<i className="iconfont icon-svg_jiantou1 font-14"></i>
|
||||
</span>} onSearch={(value)=>{
|
||||
setSearch(value)
|
||||
|
|
@ -254,7 +254,7 @@ function ProjectList() {
|
|||
</div>
|
||||
<Collapse accordion expandIconPosition="right" className="hot_project_Collapse" defaultActiveKey={projectsListByHot[1] && projectsListByHot[1].id}>
|
||||
{projectsListByHot.map(project => {
|
||||
return <Panel header={project.name} key={project.id}>
|
||||
return <Panel header={<Link to={project.owner ? `/${project.owner.login}/${project.identifier}` : ''} target="_blank">{project.name}</Link>} key={project.id}>
|
||||
<div>{project.description || '暂无数据'}</div>
|
||||
</Panel>
|
||||
})}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ function detail(props) {
|
|||
const [detail, setDetail] = useState({});
|
||||
const [list1, setList1] = useState([]);
|
||||
const [commentReload, setCommentReload] = useState(undefined);
|
||||
const dirId = detail.cmsDir && detail.cmsDir.id;
|
||||
|
||||
useEffect(() => {
|
||||
id && getNewsDetail(id).then(res => {
|
||||
|
|
@ -42,19 +43,19 @@ function detail(props) {
|
|||
<div className="news-detail-header">
|
||||
<div className="width1600">
|
||||
<div className="font-22 font-bd">新闻资讯</div>
|
||||
<div className="font-15">关注社区最新动态,了解XXX最新成果</div>
|
||||
<div className="font-15">锁定新闻资讯,关注社区最新动态</div>
|
||||
</div>
|
||||
</div>
|
||||
<div className="width1600 pt15 pb20">
|
||||
<Link to="/news" className="opacity7">社区动态<i className="iconfont icon-youjiantou font-12 ml5 mr5"></i></Link>
|
||||
{detail.name}
|
||||
{dirId === 34 ? detail.summary : detail.name}
|
||||
</div>
|
||||
<div className="df width1600" style={{ gap: '20px' }}>
|
||||
{/* 正文 */}
|
||||
<div className="news-detail-center flex1 pb100">
|
||||
<div className="news-detail-content pr30">
|
||||
<div className="font-22 font-bd">
|
||||
{detail.name}
|
||||
{dirId === 34 ? detail.summary : detail.name}
|
||||
</div>
|
||||
<div className="opacity8 mt8">
|
||||
<img src={detail.publishUserImage} alt="" className="user-img" />
|
||||
|
|
@ -85,7 +86,7 @@ function detail(props) {
|
|||
<div className={`font-15 news-author-recent-item ${id == item.id ? 'acitve' : ''}`} key={index}>
|
||||
<div className="AlignCenter">
|
||||
<span className="font-bd mr8">{index + 1}</span>
|
||||
<p className="task-hide"><Link to={`/news/${item.id}`}>{item.name}</Link></p>
|
||||
<p className="task-hide"><Link to={`/news/${item.id}`}>{dirId === 34 ? item.summary : item.name}</Link></p>
|
||||
{index === 0 && <Tag color="#df2659">new</Tag>}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue