forked from Gitlink/forgeplus-react
update
This commit is contained in:
parent
1c24baf3b9
commit
d5f989bbe2
|
@ -87,7 +87,7 @@ class Index extends Component {
|
|||
<Route
|
||||
path="/"
|
||||
render={(props) => (
|
||||
<ProjectIndex {...this.props} {...props} />
|
||||
<ProjectHome {...this.props} {...props} />
|
||||
)}
|
||||
></Route>
|
||||
</Switch>
|
||||
|
|
|
@ -50,7 +50,7 @@ class Index extends Component {
|
|||
|
||||
this.getCategory();
|
||||
|
||||
this.getRecommand();
|
||||
// this.getRecommand();
|
||||
|
||||
this.getLanguage();
|
||||
|
||||
|
@ -304,9 +304,9 @@ class Index extends Component {
|
|||
|
||||
return (
|
||||
<div>
|
||||
<p className="t_project_banner">
|
||||
{/* <p className="t_project_banner">
|
||||
<img src={banner} width="100%" alt=""/>
|
||||
</p>
|
||||
</p> */}
|
||||
{/* {
|
||||
recommendOriList && recommendOriList.length>0?
|
||||
<Slider {...settings} className="recommandOri">
|
||||
|
@ -320,7 +320,7 @@ class Index extends Component {
|
|||
</Slider>
|
||||
:""
|
||||
} */}
|
||||
{
|
||||
{/* {
|
||||
recommendList && recommendList.length>0 &&
|
||||
<Slider {...setting} className={recommendList.length>5 ? "recommandProjects":"recommandProjects mb20"}>
|
||||
{
|
||||
|
@ -341,7 +341,7 @@ class Index extends Component {
|
|||
})
|
||||
}
|
||||
</Slider>
|
||||
}
|
||||
} */}
|
||||
<div className="ProjectListIndex">
|
||||
<div className="list-left">
|
||||
<ul className="list-l-Menu">
|
||||
|
|
|
@ -65,11 +65,14 @@
|
|||
line-height: 28px;
|
||||
font-size: 20px;
|
||||
font-weight: 500;
|
||||
color: #25EBFF;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 250px;
|
||||
color: #25EBFF;
|
||||
a{
|
||||
color: #25EBFF!important;
|
||||
}
|
||||
}
|
||||
.company{
|
||||
height: 20px;
|
||||
|
@ -81,6 +84,9 @@
|
|||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 250px;
|
||||
a{
|
||||
color: #FFFFFF!important;
|
||||
}
|
||||
}
|
||||
}
|
||||
.desc{
|
||||
|
@ -370,7 +376,7 @@
|
|||
.itemTitle{
|
||||
flex:1;
|
||||
.item-title-infos{
|
||||
height: 32px;
|
||||
height: 22px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.infotitle{
|
||||
|
@ -379,7 +385,7 @@
|
|||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
line-height: 21px;
|
||||
color: #262626!important;
|
||||
color: #333!important;
|
||||
&:hover{
|
||||
color: #466AFF!important;
|
||||
}
|
||||
|
@ -393,13 +399,12 @@
|
|||
}
|
||||
}
|
||||
.item-desc{
|
||||
height: 48px;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: #414141;
|
||||
line-height: 24px;
|
||||
max-width: 548px;
|
||||
margin-bottom: 10px;
|
||||
margin: 5px 0px;
|
||||
}
|
||||
.item-data{
|
||||
font-size: 13px;
|
||||
|
|
|
@ -62,10 +62,10 @@ function SubBanner() {
|
|||
return(
|
||||
<li>
|
||||
<div className="projectinfos">
|
||||
<img src={getImageUrl(`/${i.author && i.author.image_url}`)} alt="" />
|
||||
<Link to={`/${i.author && i.author.login}`}><img src={getImageUrl(`/${i.author && i.author.image_url}`)} alt="" /></Link>
|
||||
<div>
|
||||
<p className="name">{i.name}</p>
|
||||
<p className="company">{i.author && i.author.name}</p>
|
||||
<p className="name"><Link to={`/${i.author && i.author.login}/${i.identifier}`}>{i.name}</Link></p>
|
||||
<p className="company"><Link to={`/${i.author && i.author.login}`}>{i.author && i.author.name}</Link></p>
|
||||
</div>
|
||||
</div>
|
||||
<p className="desc">{i.description}</p>
|
||||
|
|
|
@ -56,11 +56,11 @@ function SubList() {
|
|||
return(
|
||||
<li>
|
||||
<div>
|
||||
<img src={getImageUrl(`/${i.avatar_url}`)} alt=""/>
|
||||
<Link to={`/${i.login}`}><img src={getImageUrl(`/${i.avatar_url}`)} alt=""/></Link>
|
||||
<div>
|
||||
<Link to={`/${i.login}`} className="font-15">{i.name}</Link>
|
||||
<p className="task-hide" style={{maxWidth:"260px"}}>
|
||||
<i className="iconfont icon-daimakuicon1 font-14 mr8"></i>{i.project && i.project.name}
|
||||
<Link to={`/${i.login}/${i.project && i.project.identifier}`}><i className="iconfont icon-daimakuicon1 font-14 mr8"></i>{i.project && i.project.name}</Link>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -84,7 +84,7 @@ function SubList() {
|
|||
<li>
|
||||
<div className="mInfos">
|
||||
<span className="num">{k+1}</span>
|
||||
<Link to={`/${i.owner && i.owner.login}`} className="name task-hide">{i.owner && i.owner.name}/{i.name}</Link>
|
||||
<Link to={`/${i.owner && i.owner.login}/${i.identifier}`} className="name task-hide">{i.owner && i.owner.name}/{i.name}</Link>
|
||||
<span>
|
||||
<i className="iconfont icon-dianzan11 font-16 mr4"></i>{i.praises}
|
||||
</span>
|
||||
|
@ -113,7 +113,7 @@ function SubList() {
|
|||
<li>
|
||||
<div className="mInfos">
|
||||
<span className="num">{k+1}</span>
|
||||
<a className="name task-hide">{i.owner && i.owner.name}/{i.name}</a>
|
||||
<Link to={`/${i.owner && i.owner.login}/${i.identifier}`} className="name task-hide">{i.owner && i.owner.name}/{i.name}</Link>
|
||||
<span>
|
||||
<i className="iconfont icon-dianzan11 font-16 mr4"></i>{i.praises}
|
||||
</span>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import React from 'react';
|
||||
import React , { useEffect , useState } from 'react';
|
||||
import Hot from '../img/index/hot.png';
|
||||
import Slider from "react-slick";
|
||||
import huawei from '../img/index/unit/huawei.png';
|
||||
|
@ -9,6 +9,9 @@ import xigongye from '../img/index/unit/xigongye.png';
|
|||
import feiteng from '../img/index/unit/feiteng.png';
|
||||
import xiuos from '../img/index/unit/xiuos.png';
|
||||
import huake from '../img/index/unit/huake.png';
|
||||
import axios from 'axios';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { getImageUrl } from 'educoder';
|
||||
|
||||
const settings = {
|
||||
dots: false,
|
||||
|
@ -20,31 +23,62 @@ const settings = {
|
|||
autoplay:true,
|
||||
arrows:false
|
||||
};
|
||||
|
||||
const group_size = 6;
|
||||
function SubUnitBanner() {
|
||||
|
||||
const [ list , setlist ] = useState(undefined);
|
||||
|
||||
useEffect(()=>{
|
||||
getRecommandOrz();
|
||||
},[])
|
||||
|
||||
function getRecommandOrz(params) {
|
||||
const url = `/organizations/recommend.json`;
|
||||
axios.get(url,{
|
||||
params:{
|
||||
group_size
|
||||
}
|
||||
}).then(result=>{
|
||||
if(result){
|
||||
setlist(result.data.organizations)
|
||||
}
|
||||
}).catch(error=>{})
|
||||
}
|
||||
return(
|
||||
<div className="unitBanner">
|
||||
<div className="unitContent">
|
||||
<div className="unitTitle">
|
||||
<span>精选开源组织</span>
|
||||
<img src={Hot} alt="" width="47px"/>
|
||||
list && list.length > 0 ?
|
||||
<div className="unitBanner">
|
||||
<div className="unitContent">
|
||||
<div className="unitTitle">
|
||||
<span>精选开源组织</span>
|
||||
<img src={Hot} alt="" width="47px"/>
|
||||
</div>
|
||||
<Slider {...settings} className="unitSlider">
|
||||
{
|
||||
list.map((i,k)=>{
|
||||
return(
|
||||
<div className="slickline">
|
||||
{
|
||||
i.map((j,k1)=>{
|
||||
return(
|
||||
<Link to={j.name}><img src={getImageUrl(`/${j.avatar_url}`)} alt="" height="56px" style={{maxWidth:"180px"}}/></Link>
|
||||
)
|
||||
})
|
||||
}
|
||||
</div>
|
||||
)
|
||||
})
|
||||
}
|
||||
{/* <div className="slickline">
|
||||
<a href="https://www.nwpu.edu.cn/" target="_blank"><img src={xigongye} alt="" height="56px"/></a>
|
||||
<a href="https://www.phytium.com.cn/" target="_blank"><img src={feiteng} alt="" height="56px"/></a>
|
||||
<a href="http://xuos.io" target="_blank"><img src={xiuos} alt="" height="56px"/></a>
|
||||
<a href="https://www.hust.edu.cn/" target="_blank"><img src={huake} alt="" height="56px"/></a>
|
||||
</div> */}
|
||||
</Slider>
|
||||
</div>
|
||||
<Slider {...settings} className="unitSlider">
|
||||
<div className="slickline">
|
||||
<a href="https://www.huawei.com/cn/?ic_medium=direct&ic_source=surlent" target="_blank"><img src={huawei} alt="" height="56px"/></a>
|
||||
<a href="https://www.inspur.com/" target="_blank"><img src={langchao} alt="" height="56px"/></a>
|
||||
<a href="https://www.openatom.org/#/" target="_blank"><img src={jijinhui} alt="" height="56px"/></a>
|
||||
<a href="https://portal.mulanos.cn//" target="_blank"><img src={mulan} alt="" height="56px"/></a>
|
||||
</div>
|
||||
<div className="slickline">
|
||||
<a href="https://www.nwpu.edu.cn/" target="_blank"><img src={xigongye} alt="" height="56px"/></a>
|
||||
<a href="https://www.phytium.com.cn/" target="_blank"><img src={feiteng} alt="" height="56px"/></a>
|
||||
<a href="http://xuos.io" target="_blank"><img src={xiuos} alt="" height="56px"/></a>
|
||||
<a href="https://www.hust.edu.cn/" target="_blank"><img src={huake} alt="" height="56px"/></a>
|
||||
</div>
|
||||
</Slider>
|
||||
</div>
|
||||
</div>
|
||||
:""
|
||||
|
||||
)
|
||||
}
|
||||
export default SubUnitBanner;
|
Loading…
Reference in New Issue