星云-首页

This commit is contained in:
caishi 2023-05-10 16:20:51 +08:00
parent 3172f09fdf
commit 67bd3a41a4
12 changed files with 149 additions and 45 deletions

View File

@ -288,14 +288,14 @@ class NewHeader extends Component {
{...this.props}
{...this.state}
/> : ""}
<div style={{width:"78px"}}>
{/* <div style={{width:"78px"}}>
{
publicNav &&
<a href={'https://www.ccf.org.cn/'} className={"fl"}>
<img src={MainLogo} alt="ccf" width="63px"/>
</a>
}
</div>
</div> */}
{
settings && settings.nav_logo_url ?
<a href={settings && settings.new_course.default_url} className={"fl mr50"}>

BIN
src/home/Img/com-1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

BIN
src/home/Img/com-2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 KiB

BIN
src/home/Img/com-3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 KiB

BIN
src/home/Img/com-back.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 340 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

View File

@ -1,7 +1,8 @@
import React , { useEffect , useState } from 'react';
import "./Index.scss";
import TopEdition from './TopEdition';
import ThirdEdition from './ThirdEdition';
// import ThirdEdition from './ThirdEdition';
import ThirdeditionXing from './ThirdEditionXing';
import { Anchor } from 'antd';
import F41 from './Img/4-1.png';
import F42 from './Img/4-2.png';
@ -10,7 +11,6 @@ import F44 from './Img/4-4.png';
import SecondEdition from './SecondEdition';
import FifthEdition from './FifthEdition';
import { TPMIndexHOC } from '../modules/tpm/TPMIndexHOC';
import Axios from 'axios';
function Index(props) {
const [ value , setValue ] = useState("");
@ -23,7 +23,7 @@ function Index(props) {
useEffect(()=>{
window.addEventListener("scroll",scrollListener);
getTab();
// getTab();
return ComponentWillUnmount;
},[])
@ -35,18 +35,18 @@ function Index(props) {
window.removeEventListener("scroll",scrollListener);
}
function getTab() {
const url = `/topics.json?topic_type=card`;
Axios.get(url,{
params:{
limit:3
}
}).then(result=>{
if(result){
setBannerTab(result.data.topics);
}
}).catch(error=>{})
}
// function getTab() {
// const url = `/topics.json?topic_type=card`;
// Axios.get(url,{
// params:{
// limit:3
// }
// }).then(result=>{
// if(result){
// setBannerTab(result.data.topics);
// }
// }).catch(error=>{})
// }
function scrollListener(event) {
@ -93,29 +93,13 @@ function Index(props) {
}
</ul>
:
<ul className="topEditionUl">
<a href="https://forum.trustie.net/forums/4666/detail" target="_blank" className="font-18">
<li>
CCF开源发展委员会首批执行委员名单发布
</li>
</a>
<a href="https://www.gitlink.org.cn/Gitlink/forgeplus" target="_blank" className="font-18">
<li>
平台精选仓库GitLink/GitLink
</li>
</a>
<a href="https://forum.trustie.net/forums/4663/detail" target="_blank" className="font-18">
<li>
OpenHarmony系统介绍及赛题说明
</li>
</a>
</ul>
""
}
</div>
<div className="secondEdition">
<p className="theTitle">GitLink新一代开源创新服务平台</p>
<p className="theTitle">星云协同开发平台</p>
{
flag &&
<Anchor>
@ -129,11 +113,12 @@ function Index(props) {
<SecondEdition {...props} setValue={setValue}/>
</div>
<div id="thirdContent">
<ThirdEdition />
{/* <ThirdEdition /> */}
<ThirdeditionXing />
</div>
<div className="forthEdition">
<p className="theTitle">加入GitLink和社区伙伴们一起踏上开源创新的辉煌旅程</p>
<p className="theTitle">加入星云协同开发平台和社区伙伴们一起踏上开源创新的辉煌旅程</p>
<div style={{marginBottom:"80px"}}>
{ !(current_user && current_user.login) && <a className="qulikyreg" href={register}>立即注册</a> }
</div>
@ -161,11 +146,11 @@ function Index(props) {
</ul>
</div>
<div className="fifthEdition">
{/* <div className="fifthEdition">
<p className="title">开源生态</p>
<p className="subtitle">GitLink与各大企业高校科研机构开展广泛的技术合作推动我国开源软件生态的快速构建与发展</p>
<FifthEdition />
</div>
</div> */}
</div>
)
}

View File

@ -9,7 +9,7 @@ body{
.topEdition{
position: relative;
background-image: linear-gradient(to right,#081843,#000A1D);
margin-bottom: 159px;
margin-bottom: 70px;
.headNav{
position: absolute;
width: 100%;
@ -54,7 +54,7 @@ body{
}
}
.slick-track{
height: 679px;
height: 560px;
display: flex;
.slick-slide{
position: relative;
@ -1110,4 +1110,72 @@ body{
a{
color: #BDC2D1!important;
}
}
.xingEdition{
background-image: url('./Img/xing-threeEdition.png');
background-size: 100% 100%;
position: relative;
padding-top: 56px;
.theTitle{
font-size: 34px;
font-weight: 500;
margin:0px auto;
text-align: center;
position: absolute;
width: 100%;
top:79px;
}
.xingBanner{
width: 965px;
height: 708px;
background-image: url('./Img/com-back.png');
background-size: 100% 100%;
margin:0px auto;
display: flex;
align-items: center;
justify-content: center;
position: relative;
.slick-dots{
position: absolute;
bottom: 70px;
display: flex!important;
align-items: center;
width: 100%;
justify-content: center;
li{
width: 6px;
height: 6px;
border-radius: 50%;
margin:0px 3px;
background-color: #eee;
button{
display: none;
}
&.slick-active{
background-color: #466AFF;
}
}
}
.slick-list{
display: flex;
align-items: center;
height: 380px;
width: 616px;
overflow: hidden;
margin-top: -35px;
border-radius: 10px 10px 0px 0px;
.slick-track{
display: flex;
.regform{
position: relative;
height: 100%;
text-align: center;
img{
height: 380px;
width: 626px;
}
}
}
}
}
}

View File

@ -0,0 +1,37 @@
import React from 'react';
import './Index.scss';
import Slider from 'react-slick';
import Back from './Img/xing-threeEdition.png';
import com1 from './Img/com-1.png';
import com2 from './Img/com-2.png';
import com3 from './Img/com-3.png';
let setting={
dots:true,
infinite: true,
speed: 2000,
slidesToShow: 1,
slidesToScroll: 1,
pauseOnDotsHover:true,
autoplaySpeed:3000,
pauseOnFocus:true,
autoplay:true,
arrows:false,
// prevArrow:<button type='button' class='slick-prev slick-arrow'><img src={Left} width="70px" alt=""/></button>,
// nextArrow:<button type='button' class='slick-prev slick-arrow'><img src={Right} width="70px" alt=""/></button>
}
function ThirdEditionXing() {
return(
<div className="xingEdition">
<p className="theTitle">星云操作系统简介</p>
<Slider {...setting} className="xingBanner">
<div className="regform"><img src={com1} alt="" /></div>
<div className="regform"><img src={com2} alt="" /></div>
<div className="regform"><img src={com3} alt="" /></div>
</Slider>
</div>
)
}
export default ThirdEditionXing;

View File

@ -4,6 +4,7 @@ import axios from 'axios';
import { getImageUrl } from 'educoder';
import Left from './Img/left.png';
import Right from './Img/right.png';
import xingBanner1 from './Img/xing-banner1.png';
let setting={
@ -25,7 +26,16 @@ function TopEdition({register,current_user}) {
const [ bannerList , setBannerList ] = useState(undefined);
useEffect(()=>{
getBanner();
// getBanner();
let list = [
{
id: 1,
image: xingBanner1,
title: "星云协同开发",
url: ""
}
]
setBannerList(list);
},[])
function getBanner() {
@ -49,12 +59,12 @@ function TopEdition({register,current_user}) {
<div className={`regform`}>
{/* style={{backgroundImage:`url(${getImageUrl(i.image)})`}} */}
<div onClick={()=>{if(i.url){window.location.href=i.url}}} style={{cursor: i.url ? 'pointer' : ''}}>
<img src={getImageUrl(i.image)} alt="" height="100%"/>
{
<img src={i.image} alt="" height="100%"/>
{/* {
k +1 === bannerList.length && (!(current_user && current_user.login)) ?
<p className="regPrg"><a href={register}>立即注册</a></p>
:""
}
} */}
</div>
</div>
)

View File

@ -36,6 +36,10 @@ body>.-task-title {
position: absolute;
background: rgba(27, 36, 64,0.2);
}
.newHeaders.publicNav .headerContent{
width: 1200px;
padding:0px;
}
.headerContent{
margin:0px auto;
padding:0px 30px;