pre_dev_military

This commit is contained in:
谢思 2022-11-02 14:05:36 +08:00
parent f9c380e372
commit 0adfda1035
4 changed files with 31 additions and 21 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

View File

@ -51,7 +51,7 @@ class Index extends Component {
CategoryList:undefined,
bannerList: undefined,
// 今日、本周热门项目
hotProjectTime: 1,
hotProjectTime: 7,
hotProjectList: undefined,
// 热门开发者
authorList: undefined
@ -68,7 +68,7 @@ class Index extends Component {
this.getLanguage();
this.getBannerList();
// this.getRecommandOri();
this.getList(1);
this.getList(7);
this.getAuthorList();
}
@ -449,17 +449,17 @@ class Index extends Component {
<img src={explore10} alt="" className="helpImg1"/>
</a>
</div>}
{/* 热门项目(今日/本周) */}
{/* 热门项目(本周/本月 */}
<div className='hotProjects mt20'>
<div className='hotProjectsTitle font-17'>
<div className={`oneItemTil ${hotProjectTime === 1 ? 'activeHot' : ''}`} onClick={()=>{this.setState({hotProjectTime: 1}); this.getList(1)}}>
<img src={explore3} alt="" className="helpImg2 mr10" width={18}/>
<span>今日热门</span>
</div>
<div className={`oneItemTil ${hotProjectTime === 7 ? 'activeHot' : ''}`} onClick={()=>{this.setState({hotProjectTime: 7}); this.getList(7)}}>
<img src={explore4} alt="" className="helpImg2 mr10" width={18}/>
<img src={explore3} alt="" className="helpImg2 mr10" width={18}/>
<span>本周热门</span>
</div>
<div className={`oneItemTil ${hotProjectTime === 30 ? 'activeHot' : ''}`} onClick={()=>{this.setState({hotProjectTime: 30}); this.getList(30)}}>
<img src={explore4} alt="" className="helpImg2 mr10" width={18}/>
<span>本月热门</span>
</div>
</div>
{hotProjectList && hotProjectList.length > 0 && hotProjectList.map((i, index)=>{
return <div className='hotProjectItem' key={index}>

View File

@ -6,7 +6,6 @@ import { Link } from 'react-router-dom';
import '../css/index.scss';
import Nodata from '../Nodata';
import './list.scss';
import img_parise from '../Images/parise.png';
import SpecialModal from './SpecialModal';
class IndexItem extends Component {
@ -73,11 +72,15 @@ class IndexItem extends Component {
{
item.platform === "educoder" ?
<a href="javascript:void(0)" style={{ cursor: "default" }} className="show-user-link">
<img className="p-r-photo explore" alt="" src={item.author && item.author.image_url} ></img>
<div className={`${item.recommend ? 'recommendItemPng mr5' : 'mr12'}`}>
<img className="p-r-photo explore" alt="" src={item.author && item.author.image_url} ></img>
</div>
</a>
:
<Link to={`/${item.author && item.author.login}`} className="show-user-link">
<img className="p-r-photo explore" alt="" src={getImageUrl(`/${item.author && item.author.image_url}`)} ></img>
<div className={`${item.recommend ? 'recommendItemPng mr5' : 'mr12'}`}>
<img className="p-r-photo explore" alt="" src={getImageUrl(`/${item.author && item.author.image_url}`)} ></img>
</div>
</Link>
}
<div className="p-r-Infos">
@ -101,13 +104,13 @@ class IndexItem extends Component {
</Tooltip>:""
}
</AlignCenter> */}
<a onClick={() => this.projectHref(`/${item.author.login}/${item.identifier}`, item.user_apply_signatures, item.id, item.is_secret, item.author.login, item.is_member)} className="hide-1 font-16 task-hide" style={{ whiteSpace: "wrap", display: 'flex', flex: 1, color:'#232a39'}}>
<a onClick={() => this.projectHref(`/${item.author.login}/${item.identifier}`, item.user_apply_signatures, item.id, item.is_secret, item.author.login, item.is_member)} className="hide-1 font-16 task-hide" style={{ whiteSpace: "wrap", flex: 1, color:'#232a39'}}>
{item.author.name}/{item.name}
{
item.forked_from_project_id ?
<span className="ml5">
<i className="iconfont icon-fork font-18 color-orange" />
</span>
<Tooltip title="该项目是一个fork仓库" className="ml5">
<i className="iconfont icon-fork font-16 color-orange" />
</Tooltip>
: ""
}
{
@ -123,10 +126,10 @@ class IndexItem extends Component {
</a>
<span className="p-r-tags">
<span className="pariseTag">
<i className='iconfont icon-morendianzan_icon font-14 mr3'></i> {item.praises_count}
<i className='iconfont icon-morendianzan_icon font-12 mr3'></i> {item.praises_count}
</span>
<span>
<i className="iconfont icon-fork mr3 font-16"/>fork {item.forked_count}
<i className="iconfont icon-fork mr3 font-12"/>fork {item.forked_count}
</span>
</span>
</div>

View File

@ -212,14 +212,21 @@
width: 60px;
height: 60px;
border-radius: 50%;
margin-right: 22px;
margin-top: 8px;
&.explore{
width: 32px;
height: 32px;
margin-right: 10px;
}
}
.recommendItemPng{
background-image: url('../Images/recommend1.png');
background-size: 100% 100%;
width: 50px;
height: 55px;
display: flex;
justify-content: center;
padding-top: 7px;
margin-left: -8px;
}
.p-r-Infos{
flex: 1;
width: 0;
@ -279,7 +286,7 @@
height: 28px;
line-height: 28px;
display: block;
font-size: 14px;
font-size: 12px;
display: flex;
}
.p-r-tags > span.pariseTag{