forked from Gitlink/forgeplus-react
新增首页可配置
This commit is contained in:
parent
fe4215ad5c
commit
8f10072ef2
|
|
@ -15,7 +15,7 @@ const settings = {
|
|||
function Contributor(props) {
|
||||
const { personList } = props
|
||||
return(
|
||||
<div className="boxmain zone_c_lists">
|
||||
<div className="boxmain zone_c_lists pt40">
|
||||
{
|
||||
personList && personList.length > 0 ?
|
||||
<Slider {...settings}>
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import { Link } from 'react-router-dom';
|
|||
import shijian from '../img/shijian.png';
|
||||
import axios from 'axios';
|
||||
import Nodata from '../../Nodata';
|
||||
import Partner from '../Component/partner';
|
||||
|
||||
function HeaderPage(props){
|
||||
const [ projectList , setProjectList ] = useState(undefined);
|
||||
|
|
@ -56,6 +57,7 @@ function HeaderPage(props){
|
|||
<div className="zone_box">
|
||||
{data && <p className="in_title">{data.firstTitle}</p> }
|
||||
{
|
||||
// 专区简介
|
||||
data && (data.introductionTitle || data.introductionContent || data.introductionImage) &&
|
||||
<div className="boxmain zone_infos">
|
||||
<div className="zone_infos_desc">
|
||||
|
|
@ -69,9 +71,10 @@ function HeaderPage(props){
|
|||
</div>
|
||||
}
|
||||
{
|
||||
newsList && newsList.length>0 &&
|
||||
// 新闻动态
|
||||
data && data.cmsShow && newsList && newsList.length>0 &&
|
||||
<div className="zone_news">
|
||||
<p className="in_title mb40">新闻动态</p>
|
||||
<p className="in_title mb40">{ data.homepageCmsTitle }</p>
|
||||
<div className="boxmain" style={{display:"flex"}}>
|
||||
<div className="zone_new_first">
|
||||
<img src={newsList[0].headImg || img1} alt="" height="302px" style={{width:"100%",objectFit:"cover"}} className="mb30"/>
|
||||
|
|
@ -107,69 +110,64 @@ function HeaderPage(props){
|
|||
</div>
|
||||
</div>
|
||||
}
|
||||
<div className="zone_projects">
|
||||
<p className="in_title mb40">精选项目</p>
|
||||
{
|
||||
projectList && projectList.length>0&&
|
||||
<div className="boxmain zone_p_lists">
|
||||
{
|
||||
projectList.map((i,k)=>{
|
||||
return(
|
||||
{
|
||||
// 精选项目
|
||||
data && data.projectShow &&
|
||||
<div className="zone_projects">
|
||||
<p className="in_title mb40">{ data.homepageProjectTitle }</p>
|
||||
{
|
||||
projectList && projectList.length>0&&
|
||||
<div className="boxmain zone_p_lists">
|
||||
{
|
||||
projectList.map((i,k)=>{
|
||||
return(
|
||||
<li>
|
||||
<div className="imgBox">{i.projectProperties && i.projectProperties.authorImageUrl && <img src={i.projectProperties.authorImageUrl} alt="" /> }</div>
|
||||
<div className="infosBox">
|
||||
<a onClick={()=>window.open(i.projectURL)} className="z_p_title task-hide">{i.projectProperties && i.projectProperties.name}</a>
|
||||
<p className="z_p_desc task-hide-2">{i.projectProperties && i.projectProperties.description ? i.projectProperties.description : "暂无~"}</p>
|
||||
</div>
|
||||
</li>
|
||||
)
|
||||
})
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
{
|
||||
// 核心贡献者
|
||||
data && data.memberShow &&
|
||||
<div className="zone_contributor">
|
||||
<p className="in_title">{ data.homepageMemberTitle }</p>
|
||||
{
|
||||
personList && personList.length > 0 &&
|
||||
<ul className="boxmain zone_c_lists">
|
||||
{
|
||||
personList.map((i,k)=>{
|
||||
return(
|
||||
<li>
|
||||
<div className="imgBox">{i.projectProperties && i.projectProperties.authorImageUrl && <img src={i.projectProperties.authorImageUrl} alt="" /> }</div>
|
||||
<div className="infosBox">
|
||||
<a onClick={()=>window.open(i.projectURL)} className="z_p_title task-hide">{i.projectProperties && i.projectProperties.name}</a>
|
||||
<p className="z_p_desc task-hide-2">{i.projectProperties && i.projectProperties.description ? i.projectProperties.description : "暂无~"}</p>
|
||||
</div>
|
||||
<Link to={`/${i.login}`}><img src={i.imageUrl} alt="" /></Link>
|
||||
<span>{i.name}</span>
|
||||
<p className="task-hide-2" style={{display:i.introduction?"":"flex"}}>{i.introduction || "暂无~"}</p>
|
||||
</li>
|
||||
)
|
||||
})
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div className="zone_contributor">
|
||||
<p className="in_title">核心贡献者</p>
|
||||
{
|
||||
personList && personList.length > 0 &&
|
||||
<ul className="boxmain zone_c_lists">
|
||||
{
|
||||
personList.map((i,k)=>{
|
||||
return(
|
||||
<li>
|
||||
<Link to={`/${i.login}`}><img src={i.imageUrl} alt="" /></Link>
|
||||
<span>{i.name}</span>
|
||||
<p className="task-hide-2" style={{display:i.introduction?"":"flex"}}>{i.introduction || "暂无~"}</p>
|
||||
</li>
|
||||
)
|
||||
})
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
})
|
||||
}
|
||||
</ul>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
|
||||
{/* <div className="zone_parter">
|
||||
<p className="in_title">合作伙伴</p>
|
||||
<ul className="boxmain zone_part_lists">
|
||||
<li>合作伙伴一</li>
|
||||
<li>合作伙伴一</li>
|
||||
<li>合作伙伴一</li>
|
||||
<li>合作伙伴一</li>
|
||||
<li>合作伙伴一</li>
|
||||
<li>合作伙伴一</li>
|
||||
<li>合作伙伴一</li>
|
||||
<li>合作伙伴一</li>
|
||||
<li>合作伙伴一</li>
|
||||
<li>合作伙伴一</li>
|
||||
<li>合作伙伴一</li>
|
||||
<li>合作伙伴一</li>
|
||||
<li>合作伙伴一</li>
|
||||
<li>合作伙伴一</li>
|
||||
<li>合作伙伴一</li>
|
||||
<li>合作伙伴一</li>
|
||||
<li>合作伙伴一</li>
|
||||
</ul>
|
||||
</div> */}
|
||||
{
|
||||
// 合作伙伴
|
||||
data && data.partnersShow &&
|
||||
<div className="zone_parter">
|
||||
<p className="in_title">{ data.homepagePartnersTitle }</p>
|
||||
<Partner id={ id }></Partner>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import intro1 from '../img/intro1.png';
|
|||
import intro2 from '../img/intro2.png';
|
||||
import intro3 from '../img/intro3.png';
|
||||
import intro4 from '../img/intro4.png';
|
||||
import guideArrow from '../img/guideArrow.png';
|
||||
import guideArrow from '../img/guideArrow1.png';
|
||||
import ra from '../img/ra.png'
|
||||
import { Link } from 'react-router-dom';
|
||||
import shijian from '../img/shijian.png';
|
||||
|
|
@ -98,6 +98,7 @@ function HeaderPage(props){
|
|||
return(
|
||||
<div className="zone1_box">
|
||||
{
|
||||
// 专区简介
|
||||
data && (data.introductionTitle || data.introductionContent || data.introductionImage) &&
|
||||
<div className="boxmain zone_infos mb30">
|
||||
<div className="zone_infos_desc">
|
||||
|
|
@ -129,10 +130,11 @@ function HeaderPage(props){
|
|||
</div>
|
||||
</div>
|
||||
{
|
||||
newsList && newsList.length>0 &&
|
||||
// 新闻动态
|
||||
data && data.cmsShow && newsList && newsList.length>0 &&
|
||||
<div className="zone_news">
|
||||
<div className="boxmain" style={{display:"flex"}}>
|
||||
<p className="news_title">新闻动态</p>
|
||||
<p className="news_title">{ data.homepageCmsTitle }</p>
|
||||
<div className="zone_new_first">
|
||||
<p className="task-hide">
|
||||
<span className="item_index">1</span>
|
||||
|
|
@ -175,17 +177,23 @@ function HeaderPage(props){
|
|||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div className="zone_projects pt50 pb30">
|
||||
<p className="in_title mb40">精选项目</p>
|
||||
<Projects projectList={projectList}></Projects>
|
||||
</div>
|
||||
|
||||
<div className="zone_contributor">
|
||||
<p className="in_title">核心贡献者</p>
|
||||
<Contributor personList={personList}></Contributor>
|
||||
</div>
|
||||
|
||||
{
|
||||
// 精选项目
|
||||
data && data.projectShow &&
|
||||
<div className="zone_projects pt50 pb30">
|
||||
<p className="in_title mb40">{ data.homepageProjectTitle }</p>
|
||||
<Projects projectList={projectList}></Projects>
|
||||
</div>
|
||||
}
|
||||
{
|
||||
// 核心贡献者
|
||||
data && data.memberShow &&
|
||||
<div className="zone_contributor">
|
||||
<p className="in_title">{ data.homepageMemberTitle }</p>
|
||||
<Contributor personList={personList}></Contributor>
|
||||
</div>
|
||||
}
|
||||
|
||||
<div className="zone_community pt60 pb60">
|
||||
<p className="in_title mb20">参与社区</p>
|
||||
<p className="sub_title mb50"><img src={ra} alt="" className="mr5" />成为社区成员,尽情发挥您的创意</p>
|
||||
|
|
@ -252,11 +260,15 @@ function HeaderPage(props){
|
|||
<p className="in_title">集萃群智经验 交流心得体会</p>
|
||||
<button>立即加入</button>
|
||||
</div>
|
||||
|
||||
<div className="zone_parter">
|
||||
<p className="in_title">合作伙伴</p>
|
||||
<Partner id={ id }></Partner>
|
||||
</div>
|
||||
{
|
||||
// 合作伙伴
|
||||
data && data.partnersShow &&
|
||||
<div className="zone_parter">
|
||||
<p className="in_title">{ data.homepagePartnersTitle }</p>
|
||||
<Partner id={ id }></Partner>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,9 +94,11 @@ function Main(props){
|
|||
<div className="main_tag">
|
||||
{
|
||||
mainList.map((i,k)=>{
|
||||
return(
|
||||
<div className={`main_tag_item task-hide ${newCateId === i.id ? 'main_tag_selected' : ''}`} key={`${i.id}`} onClick={() => selectCate(i.id)} >{i.name}</div>
|
||||
)
|
||||
if (k <= 4) {
|
||||
return(
|
||||
<div className={`main_tag_item task-hide ${newCateId === i.id ? 'main_tag_selected' : ''}`} key={`${i.id}`} onClick={() => selectCate(i.id)} >{i.name}</div>
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import { Link } from 'react-router-dom';
|
|||
import { Spin } from 'antd';
|
||||
import { httpUrl } from '../fetch';
|
||||
import axios from 'axios';
|
||||
import { tempConfig } from '../tempInfo'
|
||||
import '../indexZone1.scss'
|
||||
|
||||
|
||||
|
|
@ -35,7 +36,7 @@ function ZoneVIP(props){
|
|||
return(
|
||||
<div className={`boxmain ${temp}_VIP_box`}>
|
||||
<p className="in_title">专区会员</p>
|
||||
<p className="vip_sub_title">社区根据您的贡献与扮演角色将用户划分成为不同的人员团队,并构建会员成长体系。您有兴趣成为会员,尽情发挥创意与智慧,与专区共同成长吗?</p>
|
||||
<p className="vip_sub_title">{ tempConfig[temp].vipDesc }</p>
|
||||
<Spin spinning={isSpin}>
|
||||
<div style={{minHeight:400}}>
|
||||
{
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 370 B |
|
|
@ -357,6 +357,7 @@
|
|||
width: 1200px;
|
||||
margin:0px auto;
|
||||
.main_tag {
|
||||
margin: auto;
|
||||
height: 50px;
|
||||
width: fit-content;
|
||||
border-radius: 4px;
|
||||
|
|
@ -994,4 +995,52 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.zone_parter{
|
||||
background-color: #fff;
|
||||
padding:70px 0px 90px;
|
||||
#scrollBox1{
|
||||
max-height: 332px;
|
||||
overflow: hidden;
|
||||
margin: 35px 0px 0px;
|
||||
width: 100%;
|
||||
.unitMainSlider{
|
||||
width: 1200px;
|
||||
margin:0px auto;
|
||||
.slick-list{
|
||||
height: 140px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
.slickMainline{
|
||||
display: flex!important;
|
||||
padding:10px 2px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
a{
|
||||
background: #FFFFFF;
|
||||
box-shadow: 0px 1px 8px 1px rgba(0, 0, 0, 0.06);
|
||||
border-radius: 4px;
|
||||
border: 1px solid #FFFFFF;
|
||||
margin-right: 20px;
|
||||
padding:20px;
|
||||
height: 120px;
|
||||
width: 220px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
&:hover{
|
||||
border: 1px solid #8FCEFF;
|
||||
}
|
||||
img{
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
&:last-child{
|
||||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -2,12 +2,14 @@ export const tempConfig = {
|
|||
zone: {
|
||||
mainTitle: '领域资讯',
|
||||
hotTitle: '热门资讯',
|
||||
member: '专区会员'
|
||||
member: '专区会员',
|
||||
vipDesc: '社区根据您的贡献与扮演角色将用户划分成为不同的人员团队,并构建会员成长体系。您有兴趣成为会员,尽情发挥创意与智慧,与专区共同成长吗?',
|
||||
},
|
||||
zone1: {
|
||||
mainTitle: '新闻资讯',
|
||||
hotTitle: '热门新闻资讯',
|
||||
member: '荣誉榜单'
|
||||
member: '荣誉榜单',
|
||||
vipDesc: '荣誉榜单记录用户在开源芯片社区的社区角与成长进度,欢迎广大用户参与到开源芯片项目,与社区共同成长!',
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue