Merge pull request '新增glcc,开源夏令营' (#356) from tongChong/forgeplus-react:feature_GLCC into gitlink_server

This commit is contained in:
xxq250 2022-04-15 15:35:41 +08:00
commit eec4fa4204
84 changed files with 2212 additions and 10 deletions

View File

@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 2340181 */
src: url('iconfont.woff2?t=1640585290619') format('woff2'),
url('iconfont.woff?t=1640585290619') format('woff'),
url('iconfont.ttf?t=1640585290619') format('truetype');
src: url('iconfont.woff2?t=1649726899310') format('woff2'),
url('iconfont.woff?t=1649726899310') format('woff'),
url('iconfont.ttf?t=1649726899310') format('truetype');
}
.iconfont {
@ -13,6 +13,114 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-bangzhuzhongxinicon:before {
content: "\e926";
}
.icon-kaiyuanxiangmu:before {
content: "\e91d";
}
.icon-luntanjiaoliu:before {
content: "\e91e";
}
.icon-wangzhanpeizhi:before {
content: "\e91f";
}
.icon-weixuanze-chuangkekongjian:before {
content: "\e920";
}
.icon-tubiao:before {
content: "\e921";
}
.icon-gonggaofabu:before {
content: "\e922";
}
.icon-jingsaihuodong:before {
content: "\e923";
}
.icon-yonghuguanli:before {
content: "\e924";
}
.icon-shenpi:before {
content: "\e925";
}
.icon-zhuanli1:before {
content: "\e918";
}
.icon-daimaicon:before {
content: "\e91c";
}
.icon-jiangxiangicon:before {
content: "\e916";
}
.icon-shuju:before {
content: "\e917";
}
.icon-wendang:before {
content: "\e919";
}
.icon-lunwen:before {
content: "\e91a";
}
.icon-zhuanli:before {
content: "\e91b";
}
.icon-gailan1:before {
content: "\e914";
}
.icon-tuandui:before {
content: "\e915";
}
.icon-icon2:before {
content: "\e912";
}
.icon-a-21:before {
content: "\e913";
}
.icon-a-2:before {
content: "\e90f";
}
.icon-a-3:before {
content: "\e910";
}
.icon-icon1:before {
content: "\e911";
}
.icon-ioon:before {
content: "\e90e";
}
.icon-shanchu_tc_icon1:before {
content: "\e90c";
}
.icon-zhuanjiaicon:before {
content: "\e90d";
}
.icon-shengming:before {
content: "\e90b";
}

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,195 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "28888753",
"name": "帮助中心icon",
"font_class": "bangzhuzhongxinicon",
"unicode": "e926",
"unicode_decimal": 59686
},
{
"icon_id": "28163416",
"name": "开源项目",
"font_class": "kaiyuanxiangmu",
"unicode": "e91d",
"unicode_decimal": 59677
},
{
"icon_id": "28163417",
"name": "论坛交流",
"font_class": "luntanjiaoliu",
"unicode": "e91e",
"unicode_decimal": 59678
},
{
"icon_id": "28163418",
"name": "网站配置",
"font_class": "wangzhanpeizhi",
"unicode": "e91f",
"unicode_decimal": 59679
},
{
"icon_id": "28163419",
"name": "未选择-创客空间",
"font_class": "weixuanze-chuangkekongjian",
"unicode": "e920",
"unicode_decimal": 59680
},
{
"icon_id": "28163420",
"name": "图标",
"font_class": "tubiao",
"unicode": "e921",
"unicode_decimal": 59681
},
{
"icon_id": "28163421",
"name": "公告发布",
"font_class": "gonggaofabu",
"unicode": "e922",
"unicode_decimal": 59682
},
{
"icon_id": "28163422",
"name": "竞赛活动",
"font_class": "jingsaihuodong",
"unicode": "e923",
"unicode_decimal": 59683
},
{
"icon_id": "28163423",
"name": "用户管理",
"font_class": "yonghuguanli",
"unicode": "e924",
"unicode_decimal": 59684
},
{
"icon_id": "28163424",
"name": "审批",
"font_class": "shenpi",
"unicode": "e925",
"unicode_decimal": 59685
},
{
"icon_id": "22773568",
"name": "专利",
"font_class": "zhuanli1",
"unicode": "e918",
"unicode_decimal": 59672
},
{
"icon_id": "27680124",
"name": "代码icon",
"font_class": "daimaicon",
"unicode": "e91c",
"unicode_decimal": 59676
},
{
"icon_id": "27664463",
"name": "奖项icon",
"font_class": "jiangxiangicon",
"unicode": "e916",
"unicode_decimal": 59670
},
{
"icon_id": "27664464",
"name": "数据",
"font_class": "shuju",
"unicode": "e917",
"unicode_decimal": 59671
},
{
"icon_id": "27664466",
"name": "文档",
"font_class": "wendang",
"unicode": "e919",
"unicode_decimal": 59673
},
{
"icon_id": "27664467",
"name": "论文",
"font_class": "lunwen",
"unicode": "e91a",
"unicode_decimal": 59674
},
{
"icon_id": "27664468",
"name": "专利",
"font_class": "zhuanli",
"unicode": "e91b",
"unicode_decimal": 59675
},
{
"icon_id": "27664392",
"name": "概览",
"font_class": "gailan1",
"unicode": "e914",
"unicode_decimal": 59668
},
{
"icon_id": "27664393",
"name": "团队",
"font_class": "tuandui",
"unicode": "e915",
"unicode_decimal": 59669
},
{
"icon_id": "27299393",
"name": "icon",
"font_class": "icon2",
"unicode": "e912",
"unicode_decimal": 59666
},
{
"icon_id": "27299394",
"name": "2",
"font_class": "a-21",
"unicode": "e913",
"unicode_decimal": 59667
},
{
"icon_id": "27200759",
"name": "2",
"font_class": "a-2",
"unicode": "e90f",
"unicode_decimal": 59663
},
{
"icon_id": "27200760",
"name": "3",
"font_class": "a-3",
"unicode": "e910",
"unicode_decimal": 59664
},
{
"icon_id": "27200761",
"name": "icon",
"font_class": "icon1",
"unicode": "e911",
"unicode_decimal": 59665
},
{
"icon_id": "27041503",
"name": "ioon",
"font_class": "ioon",
"unicode": "e90e",
"unicode_decimal": 59662
},
{
"icon_id": "26470602",
"name": "shanchu_tc_icon",
"font_class": "shanchu_tc_icon1",
"unicode": "e90c",
"unicode_decimal": 59660
},
{
"icon_id": "26470603",
"name": "专家icon",
"font_class": "zhuanjiaicon",
"unicode": "e90d",
"unicode_decimal": 59661
},
{
"icon_id": "12505154",
"name": "声明",

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -16,7 +16,8 @@ import marked from './common/marked';
import moment from 'moment'
import { MuiThemeProvider, createMuiTheme } from 'material-ui/styles';
import SiderBar from './forge/Component/SiderBar'
import SiderBar from './forge/Component/SiderBar';
import SiderBarHelp from './glcc/siderBarHelp';
import { SnackbarHOC } from 'educoder';
import { initAxiosInterceptors } from './AppConfig'
@ -112,6 +113,12 @@ const Teaching = Loadable({
loader : () => import("./forge/TeachingPractice/Teaching"),
loading: Loading,
})
const Glcc = Loadable({
loader : () => import("./glcc"),
loading: Loading,
})
// const CreateMerge = Loadable({
// loader: () => import('./forge/Merge/NewMerge'),
// loading: Loading,
@ -279,13 +286,13 @@ class App extends Component {
};
render() {
const { pathType } = this.state;
const { pathType, pathName } = this.state;
return (
<Provider store={store}>
<ConfigProvider locale={zhCN}>
<MuiThemeProvider theme={theme}>
<LoginDialog {...this.props} {...this.state} Modifyloginvalue={() => this.Modifyloginvalue()}></LoginDialog>
<SiderBar />
{pathName && pathName.indexOf("glcc") === -1 ? <SiderBar /> : <SiderBarHelp/>}
{/* <Router> */}
<Switch>
{/* wiki预览 */}
@ -376,6 +383,12 @@ class App extends Component {
render={(props) => <Teaching {...this.props} {...props} />}
></Route>
{/*glcc */}
<Route
path="/glcc"
render={(props) => <Glcc {...this.props} {...props} />}
></Route>
{/* 组织 */}
<Route path={"/organize"}
render={

View File

@ -33,6 +33,7 @@ export function initAxiosInterceptors(props) {
initOnlineOfflineListener();
var proxy = "https://testforgeplus.trustie.net";
//响应前的设置
axios.interceptors.request.use(
config => {

View File

@ -276,7 +276,7 @@ li.ant-menu-item{
.-task-sidebar {
position: fixed;
width: 40px;
right: 0;
right: 10px;
bottom: 80px;
z-index: 10;
}

View File

@ -19,12 +19,11 @@ export default function javaFetch(actionUrl){
// request拦截器
service.interceptors.request.use(config => {
if (cookie.load(TokenKey)) {
console.log(cookie.load(TokenKey));
config.headers['Authorization'] = cookie.load(TokenKey); // 让每个请求携带自定义token 请根据实际情况自行修改
}
if (window.location.port === "3007") {
// 模拟token为登录用户
const token = sessionStorage.token;
const token = cookie.load(TokenKey);
if (config.url.indexOf('?') === -1) {
config.url = `${config.url}?token=${token}`;
} else {

19
src/glcc/api.js Normal file
View File

@ -0,0 +1,19 @@
import fetch from './fetch';
// 获取当前用户报名信息
export function getUserApplyInfo(params) {
return fetch({
url: `/api/applyInformation/getUserApplyInfo`,
method: 'get',
params
});
}
//报名夏令营
export function applyGlcc(data) {
return fetch({
url: '/api/applyInformation/create',
method: 'post',
data: data
});
}

210
src/glcc/apply/index.jsx Normal file
View File

@ -0,0 +1,210 @@
import React , { useCallback, useEffect , useState } from 'react';
import { Breadcrumb, Button, Form, Input, Select, Upload, Modal } from 'antd';
import {getUserApplyInfo, applyGlcc} from '../api';
import axios from 'axios';
import TextArea from 'antd/lib/input/TextArea';
import { httpUrl } from '../fetch';
import banner from "../img/banner.png";
import './index.scss';
const Option = Select.Option;
function Apply(props) {
const {form, current_user, showNotification, isGlccApplyDate} = props;
//
// current_user && (current_user.user_id = 6)
// current_user && (current_user.userName = "使")
const {getFieldDecorator, validateFields, setFieldsValue, validateFieldsAndScroll } = form;
const [reload, setReload] = useState(undefined);
const [imageUrl, setImageUrl] = useState(undefined);
const [loading, setLoading] = useState(false);
const [cateList, setCateList] = useState([]);
const [userApplyInfo, setUserApplyInfo] = useState(undefined);
const helper = useCallback(
(label, extra, name, rules, widget) => (
<Form.Item label={label} extra={extra}>
{getFieldDecorator(name, { rules, validateFirst: true })(widget)}
</Form.Item>
),
[]
);
useEffect(()=>{
//
window.scrollTo(0,0);
if(!isGlccApplyDate){
//
window.location.href="/glcc";
}else if(current_user && current_user.login){
//
const url = `/project_categories/pinned_index.json`;
axios.get(url).then(result=>{
if(result && result.data){
setCateList(result.data.project_categories);
}
}).catch(error=>{})
}else{
window.location.href="/login?go_page=/glcc/apply";
}
}, [])
useEffect(()=>{
//
current_user && getUserApplyInfo({userId: current_user.user_id}).then(response=>{
if(response && response.message === "success"){
response.data && setFieldsValue({
...response.data
})
setUserApplyInfo(response.data);
}
})
}, [reload])
//
function verify(dataIndex){
validateFields([dataIndex],(error, values)=>{
if(error && error[dataIndex]){
return;
}
})
}
//
function handleSubmit(e){
e.preventDefault();
validateFieldsAndScroll((err, values) => {
if (!err) {
Modal.confirm({
title: "报名",
content: "确定提交报名信息,提交后报名信息将无法修改",
onOk: ()=>{
const params ={
...values,
projectLogoId: values.logo.file.response.data.id,
userId: current_user.user_id,
userName: current_user.username
}
applyGlcc(params).then(response=>{
if(response && response.message === "success"){
showNotification("报名成功");
setReload(Math.random());
}
})
}
})}
});
};
//
function beforeUpload(file){
const isLt100M = file.size / 1024 / 1024 < 2;
if (!isLt100M) {
showNotification(`文件大小必须小于${2}MB!`);
}
const isType = file.type === "image/png" || file.type === "image/jpg" || file.type === "image/jpeg";
if (!isType) {
showNotification("只能上传png、jpg、jpeg格式文件");
}
return isLt100M && isType;
}
function getBase64(img, callback) {
const reader = new FileReader();
reader.addEventListener('load', () => callback(reader.result));
reader.readAsDataURL(img);
reader.onload = function(e) {
setImageUrl(e.target.result); //
}
}
//
function handleChange(info){
if(info && info.file && info.file.status === "done"){
getBase64(info.file.originFileObj, imageUrl =>
setImageUrl(imageUrl)
);
}
}
return(
<div className="glcc_apply">
<img className="glcc-banner" src={banner}></img>
<div className='apply'>
<Breadcrumb className='pt20 font-16'>
<Breadcrumb.Item><a href="/glcc">开源夏令营</a></Breadcrumb.Item>
<Breadcrumb.Item>项目报名</Breadcrumb.Item>
</Breadcrumb>
{userApplyInfo && <div className='applySuccess mt20 font-15'>
<i className='iconfont icon-wancheng mr5'></i>您已报名成功请关注活动后续新闻公告!
</div>}
<Form className="pt20 glcc_info_form" onSubmit={handleSubmit}>
{helper('项目名称',
'',
'projectName',
[{ required: true, message: "请正确输入项目名称" },
{ max: 32, message: '超出限制长度32位字符请重新编辑' }],
<Input placeholder="请输入项目名称" onBlur={()=>{verify("name")}} disabled = {userApplyInfo ? true : false} className={userApplyInfo? "disabledInput":""}/>
)}
{helper('项目分类',
'',
'projectType',
[],
<Select placeholder="请选择项目分类" disabled = {userApplyInfo ? true : false} className={userApplyInfo? "disabledInput":""}>
{cateList && cateList.map(item=> {return <Option value={item.name} key={item.id}>{item.name}</Option>})}
</Select>
)}
{helper('GitLink项目地址',
'',
'gitlinkUrl',
[{ required: true, message: "请正确输入预申报项目在GitLink平台的地址" },
{ max: 252, message: '超出限制长度252位字符请重新编辑' }],
<Input placeholder="请输入预申报项目在GitLink平台的地址" onBlur={()=>{verify("gitlink")}} disabled = {userApplyInfo ? true : false} className={userApplyInfo? "disabledInput":""}/>
)}
{helper('官网地址',
'',
'officialWebsiteUrl',
[{ max: 252, message: '超出限制长度252位字符请重新编辑' }],
<Input placeholder="请输入官网地址" disabled = {userApplyInfo ? true : false} className={userApplyInfo? "disabledInput":""}/>
)}
<div className='introArea'>{helper('项目简介',
'',
'projectIntro',
[{ required: true, message: "请正确输入项目简介" },
{ max: 200, message: '超出限制长度200位字符请重新编辑' }],
<TextArea placeholder="请输入项目简介长度不超过200字符" onBlur={()=>{verify("intro")}} rows={4} disabled = {userApplyInfo ? true : false} className={userApplyInfo? "disabledInput":""}/>
)}</div>
<div className='introArea'>{helper('项目logo',
'logo格式为png、jpg、jpeg限制上传大小2m建议上传尺寸为382*228',
'logo',
[{ required: true, message: "请正确上传项目logo" }],
userApplyInfo && userApplyInfo.projectLogoId ? <div className='projectLogo'><img src={`${httpUrl}/busiAttachments/download/${userApplyInfo.projectLogoId}`}/></div>
:<Upload
listType="picture-card"
className="avatar-uploader"
showUploadList={false}
action={`${httpUrl}/busiAttachments/upload`}
accept=".png,.jpg,.jpeg"
beforeUpload={beforeUpload}
onChange={handleChange}
>
{imageUrl ? <img src={imageUrl} alt="avatar" style={{ maxWidth: '100px', maxHeight: '100px' }} /> : <div>
<i className='iconfont icon-tianjiadaohang font-30'></i>
<div className="ant-upload-text font-13">请上传logo图片</div>
</div>}
</Upload>
)}</div>
<p className='introArea tips'>: 课题及导师信息请在GitLink项目中以issue的形式编辑</p>
{!userApplyInfo && <Form.Item className='subInfo introArea'>
<Button type="primary" htmlType="submit" className='sub'>提交</Button>
</Form.Item>}
</Form>
<div className={`explain ${userApplyInfo ? "mt70" : ""}`}>
<p className='font-15 c000'>申请说明</p>
<div>1项目报名时间为<span className='c000'>4月15日5月8日</span>请在报名截止时间北京时间<span className='c000'>2022年5月8日18点</span>前提交报名信息</div>
<div>2本次夏令营使用Gitlink为代码托管平台学员基于Gitlink上项目数量完成课程任务如果您的项目还未在Gitlink中请现将项目迁移到Gitlink迁移事项请查看<a href='https://forum.gitlink.org.cn/forums/7296/detail' target="_blank" className='link'>迁移说明文档</a>如在迁移过程中遇到问题请加qq群: 1071514693 联系qq群管理员</div>
<div>3提交社区和项目信息后欢迎与组委会联系沟通本次编程夏令营宣传推广和后续合作工作联系人: _TigerWang微信号添加请备注Gitlink编程夏令营</div>
</div>
</div>
</div>
)
}
export default Form.create()(Apply);

117
src/glcc/apply/index.scss Normal file
View File

@ -0,0 +1,117 @@
.glcc_apply{
background-image: linear-gradient(180deg,#ebf2ff 0%,#ebf2ff 43.09%,#f3f4f8 100%);
padding-bottom: 120px;
.apply{
width: 1200px;
margin: 0 auto;
}
.glcc_info_form{
display: flex;
flex-wrap: wrap;
.ant-row.ant-form-item{
margin-bottom: 20px;
display: flex;
width: 50%;
justify-content: flex-end;
}
.ant-col.ant-form-item-control-wrapper {
width: 78%;
}
.ant-form-item-label{
margin-right: 15px;
&> label::after{
content: none;
}
}
.ant-upload.ant-upload-select-picture-card{
margin-bottom: 0;
width: 118px;
height: 118px;
border: 1px solid;
}
.icon-tianjiadaohang:before{color: #b3c3db;}
.ant-upload-text{color: #a4aabb;}
.ant-input, .ant-select-selection, .ant-upload.ant-upload-select-picture-card{
background: none !important;
border-color: #b3c3db;
&:hover{border-color:#466aff;}
}
.has-error .ant-input:not([disabled]){
border-color:#ef0000;
}
.disabledInput,.disabledInput .ant-select-selection{
background-color: #e5ebf9 !important;
border: none;
color: #202d40;
}
.projectLogo{
width: 120px;
height: 120px;
border: 1px dashed #b3c3db;
border-radius: 4px;
line-height: 120px;
text-align: center;
img{
max-width: 100px;
max-height: 100px;
}
}
}
.introArea{
width: 100%;
.ant-row.ant-form-item{width: auto;
justify-content: flex-start;}
.ant-col.ant-form-item-control-wrapper {
width: 90%;
}
.ant-form-item-label{width: 118px;}
&.tips{
margin-left: 40px;
color:#e90000;
}
}
.glcc_info_form .introArea.subInfo{
width: 100%;
text-align: center;
margin: 40px 0 70px -60px;
.sub{
width: 200px;
height: 36px;
background-color: #466aff;
border-color: #466aff;
&:hover{
background-color:#5d7cff;
border-color: #5d7cff;
}
&:active{
background-color:#1140ff;
border-color: #1140ff;
}
}
}
.explain{
background-color:#f6f9fe;
border:2px solid;
border-color:#ffffff;
color:#6c7283;
padding: 20px 30px 30px 20px;
.c000{color: #000000;}
div>.c000{font-weight: bold;}
>div{margin: 10px 0;}
.link{
color: rgba(70, 106, 255, 1);
&:hover{opacity: 0.8;}
}
}
.applySuccess{
height: 45px;
border: 1px solid;
border-color: #466aff;
line-height: 45px;
padding-left: 20px;
color:#466aff;
}
}
.glcc-banner {
width: 100%;
}

9
src/glcc/fetch.js Normal file
View File

@ -0,0 +1,9 @@
import javaFetch from '../forge/javaFetch';
let settings = JSON.parse(localStorage.chromesetting);
let actionUrl = settings && settings.common.glcc;
const service = javaFetch(actionUrl);
export const httpUrl = actionUrl;
export const main_site_url = settings && settings.common.main_site_url
export default service;

64
src/glcc/help/index.jsx Normal file
View File

@ -0,0 +1,64 @@
import React , { useEffect , useState } from 'react';
import NodataPanel from '../../components/nodata-panel';
import { wikiPages, getWiki } from '../../forge/Wiki/api';
import bg from '../img/help_bg.png';
import './index.scss';
function Help(props) {
const {showNotification} = props;
const [fileArrInit, setFileArrInit] = useState(null);
const [checkItem, setCheckItem] = useState({});
const [itemDetail, setItemDetail] = useState({});
// locationStatus true false
const locationStatus = window.location.host.indexOf("50008") !== -1 || window.location.host.indexOf("gitlink") !== -1;
// wiki
useEffect(()=>{
wikiPages({
owner: locationStatus ? 'GLCC' : 'forgetest2',
repo: locationStatus ? 'glcc2022' : 'wiki1',
projectId: locationStatus ? '1403785' : '546103'
}).then(res => {
if (res && res.message === "200" && Array.isArray(res.data)) {
setFileArrInit(res.data);
if (res.data.length) {
setCheckItem(res.data[0]);
};
} else {
setFileArrInit([]);
}
});
}, [])
// wiki
useEffect(() => {
checkItem.name && getWiki({
owner: locationStatus ? 'GLCC' : 'forgetest2',
repo: locationStatus ? 'glcc2022' : 'wiki1',
pagename: checkItem.name,
projectId: locationStatus ? '1403785' : '546103'
}).then(res => {
if (res && res.message === "200") {
setItemDetail(res.data);
} else {
showNotification("加载失败")
}
});
}, [checkItem]);
return(
<div className="glcc_help">
{fileArrInit && fileArrInit.length === 0 ? <NodataPanel/> : <div className='help_main'>
<div className='menuList'>
<span className='font-18 mb15'>帮助文档</span>
{fileArrInit && fileArrInit.map(item => {
return <span className={`wiki_title font-15 mb15 ${item.name === checkItem.name? 'active' : ''}`} key={item.name} onClick={() => { setCheckItem(item) }}>{item.name}</span>})}
</div>
<div className="help_cntent pt10" >
<div dangerouslySetInnerHTML={{ __html: itemDetail && itemDetail.simple_content }}></div>
<img src={bg} className='bg' alt='bg'/>
</div>
</div>}
</div>
)
}
export default Help;

35
src/glcc/help/index.scss Normal file
View File

@ -0,0 +1,35 @@
.glcc_help{
background-image:linear-gradient(180deg,#ebf2ff 0%,#f2f4ff 100%);
padding: 30px 0 120px;
min-height: 85vh;
.help_main{
width: 1200px;
margin: 0 auto;
display: flex;
}
.menuList{
display: flex;
flex-direction: column;
width: 16%;
padding: 20px 0 25px 25px;
background-color:#f3f8ff;
border:1px solid;
border-color:#ffffff;
margin-right: 40px;
}
.wiki_title{
cursor: pointer;
&:hover, &.active{
color:#466aff;
}
}
.help_cntent{
position: relative;
width: 80%;
.bg{
position: absolute;
width: 100%;
top: 0;
}
}
}

View File

@ -0,0 +1,38 @@
import React from 'react';
import './index.scss';
function Award() {
return (
<div className="award">
<h3 className="glcc-tit">奖金与奖励</h3>
<div className="glcc-content">
<div className="award-item">
<div className="award-tit">丰厚现金奖励</div>
<div className="award-content">根据项目难度设置高低三个阶梯课题对应奖金为<span className="number">12000</span> <span className="number">9000</span> 元和 <span className="number">6000</span> </div>
<div className="award-line"></div>
</div>
<div className="award-item">
<div className="award-tit">企业实习机会</div>
<div className="award-content">优秀学生有机会进入企业实习和邀约就业机会</div>
<div className="award-line"></div>
</div>
<div className="award-item">
<div className="award-tit">毕业证书或奖杯</div>
<div className="award-content">通过结项考核的学生获得毕业证书优秀同学还可获得单项奖奖杯</div>
<div className="award-line"></div>
</div>
<div className="award-item">
<div className="award-tit">夏令营大礼包</div>
<div className="award-content">夏令营纪念文化衫帆布包鼠标垫开源系列图书社区周边等此外还会评选出若干优秀社区明星导师最佳课题开源之星等单项奖</div>
<div className="award-line"></div>
</div>
</div>
</div>
)
}
export default Award;

View File

@ -0,0 +1,66 @@
.award {
background: url("../../img/award-bg.png");
background-size: 100% 100%;
width: 100%;
height: 28.98vw;
min-height: 557px;
display: flex;
flex-flow: column nowrap;
justify-content: center;
.glcc-tit{
color: #fff;
margin-top:-1.5vw;
}
.glcc-content{
display: flex;
justify-content: space-between;
padding-top: 1vw;
}
.award-item {
position: relative;
width: 270px;
max-width: 24%;
height: 300px;
background-color: #ecf3ff;
border: 2px solid;
border-color: #ffffff;
border-radius: 4px;
}
.award-tit {
background: url("../../img/award-tit.png");
background-size: 100% 100%;
width: 226px;
height: 61.41px;
margin: 17px 0 0 -9px;
padding-left: 19px;
font-family: PingFang SC;
font-weight: 700;
color: #0e55bd;
font-size: 18px;
line-height: 56px;
}
.award-content {
width: 236px;
max-width: 96%;
height: 89px;
font-family: PingFang SC;
color: #6c7283;
font-size: 15px;
line-height: 30px;
margin: 20.5px auto;
}
.award-line {
position: absolute;
bottom: 28px;
left: 6.4%;
width: 88.88%;
height: 3px;
background-image: linear-gradient(90deg, #2135b9 0%, #e3a600 100%);
}
.number{
color: rgba(14, 85, 189, 1);
}
}

View File

@ -0,0 +1,70 @@
import React , { useEffect , useState } from 'react';
import Slider from 'react-slick';
import axios from 'axios';
import { getImageUrl } from 'educoder';
import './index.scss';
// import Left from './Img/left.png';
// import Right from './Img/right.png';
let setting={
dots:true,
infinite: true,
speed: 2000,
slidesToShow: 1,
slidesToScroll: 1,
pauseOnDotsHover:true,
autoplaySpeed:5000,
pauseOnFocus:true,
autoplay:true,
arrows:true,
className:'glcc-banner'
// 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 Banner({register,current_user}) {
const [ bannerList , setBannerList ] = useState(undefined);
useEffect(()=>{
getBanner();
},[])
function getBanner() {
const url = `/topics.json?topic_type=banner`;
axios.get(url,{
params:{
limit:4
}
}).then(result=>{
if(result){
setBannerList(result.data.topics);
}
}).catch(error=>{})
}
return(
<Slider {...setting}>
{
bannerList && bannerList.length > 0 ?
bannerList.map((i,k)=>{
return(
<div className={`regform`} key={k}>
{/* style={{backgroundImage:`url(${getImageUrl(i.image)})`}} */}
<div>
<img src={getImageUrl(i.image)} alt="" height="100%"/>
{
k +1 === bannerList.length && (!(current_user && current_user.login)) ?
<p className="regPrg"><a href={register}>立即注册</a></p>
:""
}
</div>
</div>
)
})
:
""
}
</Slider>
)
}
export default Banner;

View File

@ -0,0 +1,174 @@
.glcc {
.glcc-banner {
position: relative;
background-image: linear-gradient(to right, #081843, #000a1d);
margin-bottom: 159px;
}
.slick-track {
height: 679px;
display: flex;
.slick-slide {
position: relative;
height: 100%;
div {
height: 100%;
.regform {
& > div {
overflow: hidden;
img {
height: 100%;
width: 1920px;
position: relative;
left: 50%;
margin-left: -960px;
}
}
}
.regPrg {
position: absolute;
z-index: 2;
width: 1200px;
left: 50%;
margin-left: -600px;
top: 54%;
margin-top: -23px;
a {
color: #fff !important;
display: inline-block;
background-color: #466aff;
border-radius: 5px;
height: 46px;
line-height: 46px;
width: 98px;
text-align: center;
font-size: 18px;
letter-spacing: 2px;
&:hover {
color: #ffffff !important;
background-color: #355cff;
}
}
}
}
// img{
// position: absolute;
// width: 100%;
// height: 100%;
// top:0px;
// left: 0px;
// z-index: 1;
// }
}
}
.slick-slider {
min-width: 1200px;
position: relative;
&:hover {
.slick-arrow {
display: block !important;
cursor: pointer;
z-index: 2;
}
}
.slick-arrow {
position: absolute;
top: 50%;
z-index: 1000;
background: transparent;
border: none;
margin-top: -50px;
display: none !important;
&:hover {
i {
color: rgba(225, 225, 225, 0.8);
}
}
i {
font-size: 50px !important;
color: rgba(225, 225, 225, 0.3);
transition: 0.3s;
}
&.slick-prev {
left: 50px;
}
&.slick-next {
right: 50px;
}
}
.slick-dots {
width: 1200px;
text-align: left;
left: 50%;
margin-left: -600px;
bottom: 25%;
position: absolute;
display: flex !important;
z-index: 2;
li {
background-color: rgba(225, 225, 225, 0.5);
position: relative;
height: 3px;
width: 46px;
margin-right: 15px;
&::after {
position: absolute;
left: 0px;
width: 0px;
top: 0px;
height: 100%;
content: "";
transition: 5.2s;
transition-property: width;
}
&.slick-active::after {
background-color: #fff;
width: 100%;
}
button {
position: absolute;
width: 100%;
height: 10px;
left: 0px;
background-color: transparent !important;
border: none;
cursor: pointer;
color: transparent;
}
}
}
}
.topEditionUl {
position: absolute;
width: 1244px;
// background-image: url('./Img/top-bg.png');
height: 244px;
bottom: -139px;
left: 50%;
margin-left: -622px;
display: flex;
align-items: center;
justify-content: center;
z-index: 3;
a {
// background-image: url('./Img/top-2.png');
height: 139px;
width: 353px;
padding: 15px 24px;
color: #fff;
margin: 0px 17px;
border-radius: 11px;
background-size: 100% 100%;
color: #fff !important;
&:hover {
box-shadow: 0px 2px 7px rgba(225, 225, 225, 0.85);
}
// &:first-child{
// background-image: url('./Img/top-1.png');
// }
// &:last-child{
// background-image: url('./Img/top-3.png');
// }
}
}
}

View File

@ -0,0 +1,46 @@
import React from 'react';
import { Button } from 'antd';
import gitlink1 from '../../img/gitlink1.png';
import gitlink2 from '../../img/gitlink2.png';
import help from '../../img/help.png';
import './index.scss';
function Contact() {
return (
<div className="contact">
<div className="glcc-content">
<h3 className="glcc-tit">联系我们</h3>
<div className="contact-content">
<div className="contact-info">
<h4 className="contact-invite">期待你的加入和我们一起推动开源繁荣发展</h4>
<div className="contact-way">
<p>问题资讯: 243275429@qq.com</p>
<p>合作推广: gitlink@ccf.org.cn</p>
</div>
</div>
<div className='attention'>
<div className='one'>
<div className='attentionDiv'><img src={gitlink1} alt="gitlink1"/></div>
<p>加入GitLink</p>
<p>社区QQ群</p>
</div>
<div>
<div className='attentionDiv'><img src={gitlink2} alt="gitlink2"/></div>
<p>关注GitLink</p>
<p>微信公众号</p>
</div>
</div>
</div>
{/* 帮助中心 */}
<div className='glcc_help'>
<img src={help} alt='help'/>
<span className='font-32 title_32'>帮助中心&nbsp;&nbsp;&nbsp;&nbsp;</span>
<span className='font-18 small_32'>查看GitLink编程夏令营活动信息及热点问题</span>
<Button type="danger" className='joinHelp font-16 mr40' onClick={()=>{window.open("/glcc/help")}}>进入帮助中心</Button>
</div>
</div>
</div>
)
}
export default Contact;

View File

@ -0,0 +1,69 @@
.contact {
width: 100%;
background-image: url('../../img/contact_bg.png');
background-size: 100% 100%;
.glcc-content {
padding-bottom: 6vw;
}
.contact-invite {
font-size: 20px;
line-height: 28px;
margin-bottom: 42px !important;
}
.contact-way {
color: #6c7283;
font-size: 15px;
line-height: 28px;
}
}
.contact-content{
display: flex;
align-items: baseline;
justify-content: space-between;
padding-bottom: 55px;
border-bottom: 1px solid rgba(55, 142, 255, 0.2);
.attention{
display: flex;
.attentionDiv{
width: 140px;
height: 140px;
line-height: 140px;
background-color: #ffffff;
img{width: 90%;}
}
div{
text-align: center;
&.one{
margin-right: 80px;
}
}
}
}
.glcc_help{
height: 100px;
margin-top: 50px;
display: flex;
justify-content: space-between;
align-items: center;
background-image:linear-gradient(131.4deg,#c7d9ff 0%,#d2e0ff 14.22%,#dbe6ff 25.11%,#f9fbff 47.69%,#ecf3ff 71.96%,#f2f7ff 100%);
border: 2px solid #ffffff;
.title_32{
margin-left: -115px;
color:#0e439a;
font-weight: 700;}
.small_32{
margin-left: -100px;
color:#0e439a;
}
img{
width: 200px;
margin-top: 5px;
margin-left: -10px;}
.joinHelp{
width: 196px;
height:48px;
}
}

38
src/glcc/home/index.jsx Normal file
View File

@ -0,0 +1,38 @@
import React from "react";
import { Link } from "react-router-dom";
// import Banner from "./banner";
import Lightspot from './lightspot';
import TimerShaft from './timerShaft';
import Award from "./award";
import News from './news';
import Partner from "./partner";
import Contact from "./contact";
import banner from "../img/banner.png";
import './index.scss';
export default (props) => {
const {current_user, isGlccApplyDate, showNotification} = props;
return (
<div className="glcc">
{/* <Banner /> */}
<img className="glcc-banner" src={banner}></img>
{/* <div > */}
<Link className="apply-btn" to={isGlccApplyDate ? current_user && current_user.login ? '/glcc/apply' : '/login?go_page=/glcc/apply' : '/glcc'} onClick={()=>{!isGlccApplyDate && showNotification("不在报名时间报名时间为4月15日~5月8日")}}>
<div className="apply-text">立即报名</div>
<div className="apply-icon"><i className="font-14 iconfont icon-xiangyoujiantou "></i></div>
</Link>
{/* </div> */}
<div className="introduce glcc-content">
<div className="glcc-tit">活动简介</div>
<div className="introduce-content">GitLink编程夏令营GLCC是在CCF中国计算机学会指导下由CCF开源发展委员会CCF ODC举办的面向全国高校学生的暑期编程活动活动将覆盖近千所高校并联合各大开源基金会开源企业开源社区开源专家旨在鼓励青年学生通过参加真实的开源软件开发提升自身技术能力为开源社区输送优秀人才为青年学生提供开放友好的交流平台希望进一步推动国内开源社区的繁荣发展</div>
</div>
<Lightspot isGlccApplyDate={isGlccApplyDate} current_user={current_user} showNotification={showNotification}/>
<TimerShaft />
<Award />
<News />
<Partner />
<Contact />
</div>
)
}

132
src/glcc/home/index.scss Normal file
View File

@ -0,0 +1,132 @@
.glcc {
position: relative;
font-family: PingFang SC;
background-image: linear-gradient(
163.51deg,
#eff3fe 0%,
#ebeffb 9.63%,
#f0f4ff 16.73%,
#e8edfc 33.05%,
#e5ecff 43.93%,
#e3eaf6 72.41%,
#cfe0ff 89.21%,
#ffffff 94.79%,
#ecf4ff 100%
);
.ant-btn-primary{
background-color: #466aff;
border-color: #466aff;
&:hover{
opacity: .8;
}
}
.apply-btn {
position: absolute;
top: 15vw;
left: 18.8vw;
width: 152px;
height: 40px;
background-color: #2e5bfe;
border: 1px solid #466aff;
color: #fff;
padding-left: 18px;
}
.apply-text {
font-family: Alibaba PuHuiTi;
color: #ffffff;
font-size: 18px;
}
.apply-icon {
position: absolute;
right: 0;
top: 0;
width: 47px;
height: 38px;
background-color: #fff;
display: inline-flex;
justify-content: center;
align-items: center;
&::before {
content: "";
position: absolute;
left: 0;
width: 0;
height: 0;
border-color: transparent #2e5bfe;
border-width: 0 0 40px 10px;
border-style: solid;
}
.iconfont {
color: #466aff;
font-weight: 700;
}
}
}
.glcc-tit {
text-align: center;
font-family: PingFang SC;
font-weight: 500;
color: #1e1e1e;
font-size: 38px;
line-height: 1.4;
margin-bottom: 50px !important;
}
.glcc-content {
width: 1200px;
min-width: 62.5vw;
max-width: 98vw;
margin: 0 auto;
padding-top: 45px;
}
// 1行省略号
.ellipsis-1 {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
// 2行省略号
.ellipsis-2 {
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
.glcc-banner {
width: 100%;
}
.introduce {
z-index: 1;
position: relative;
top: -45px;
background-image: linear-gradient(
163.51deg,
#e5ecff 0%,
#e0e9ff 32.91%,
#fbfcff 100%
);
background: url("../img/introduce-bg.png");
box-shadow: 0 0 12px rgba(161, 186, 255, 0.6);
background-size: 100% 100%;
padding: 48px;
.glcc-tit {
margin-bottom: 30px !important;
}
.introduce-content {
color: #202d40;
font-size: 15px;
line-height: 30px;
}
}

View File

@ -0,0 +1,65 @@
import { Button } from 'antd';
import React from 'react';
import teacherImg from '../../img/teacher-img.png';
import lightspot1 from '../../img/lightspot1.png';
import lightspot2 from '../../img/lightspot2.png';
import lightspot3 from '../../img/lightspot3.png';
import lightspot4 from '../../img/lightspot4.png';
import './index.scss';
import { Link } from 'react-router-dom';
function Lightspot(props) {
const {current_user, isGlccApplyDate, showNotification} = props;
return (
<div className="lightspot">
<div className="glcc-content">
<h3 className="glcc-tit">活动亮点</h3>
<div className="lightspot-content">
<div className="info-teacher">
<div className="teacher-text">
<h3 className="teacher-invite">有兴趣成为GLCC的导师吗</h3>
<div className="teacher-content">想要扩大项目知名度和影响力为开源项目吸引新鲜血液培养长期开发者通过GitLink平台与高校建立连接指导开源新人传授他们的开源文化享受开源的乐趣</div>
<Link className='applyBut' to={isGlccApplyDate ? current_user && current_user.login ? '/glcc/apply' : '/login?go_page=/glcc/apply' : '/glcc'} onClick={()=>{!isGlccApplyDate && showNotification("不在报名时间报名时间为4月15日~5月8日")}}>立即报名</Link>
</div>
<img className="teacher-img" src={teacherImg}></img>
</div>
<div className="info-student">
<div className="info-item">
<img className="info-item-img" src={lightspot1}></img>
<h3 className="info-item-tit">汇聚行业顶尖开源项目</h3>
<div className="info-item-content">平台汇聚华为xiuos鲲鹏开源基金会飞腾浪潮等行业尖端开源项目把握开源生态发展脉搏</div>
</div>
<div className="info-item">
<img className="info-item-img" src={lightspot2}></img>
<h3 className="info-item-tit">覆盖全国千所高校万名会员</h3>
<div className="info-item-content">活动邀请10+全球顶尖开源基金会100+顶级开源项目社区致力营造专业开放的开源社区</div>
</div>
<div className="info-item">
<img className="info-item-img" src={lightspot3}></img>
<h3 className="info-item-tit">结识开源伙伴和技术大咖</h3>
<div className="info-item-content">每个项目配备一名导师参与开源项目开发可接受一线资深开源项目专家专业指导结识志同道合的开发伙伴</div>
</div>
<div className="info-item">
<img className="info-item-img" src={lightspot4}></img>
<h3 className="info-item-tit">丰厚奖励&实习绿色通道</h3>
<div className="info-item-content">入选同学可获得丰厚奖金并有机会进入优秀开源项目企业实习或工作受邀参与开源大会等机会</div>
</div>
</div>
</div>
</div>
</div>
)
}
export default Lightspot;

View File

@ -0,0 +1,76 @@
.lightspot {
background: url("../../img/lightspot-bg.png");
background-size: 100% 100%;
height: 44.6875vw;
min-height: 858px;
.glcc-content{
padding-top:55px;
}
.info-teacher {
display: flex;
justify-content: space-between;
}
.teacher-text {
margin-right: 2.84%;
.applyBut{
width: 120px;
height: 36px;
background-color: #466aff;
border-radius: 2px;
color: white;
display: block;
line-height: 36px;
text-align: center;
&:hover{
opacity: .8;
color: white !important;
}
}
}
.teacher-invite {
color: #202d40;
font-size: 24px;
line-height: 26px;
margin: 35px auto 25px !important;
}
.teacher-content {
color: #6c7283;
font-size: 14px;
line-height: 26px;
margin-bottom: 30px;
}
.teacher-img {
width: 52%;
}
.info-student {
display: flex;
justify-content: space-between;
}
.info-item {
width: 22%;
min-width: 240px;
text-align: center;
.info-item-img {
width: 83.33%;
min-width: 200px;
margin-bottom: 12px;
}
.info-item-tit {
color: #202d40;
font-size: 20px;
line-height: 26px;
margin-bottom: 18px !important;
}
.info-item-content {
color: #8794bb;
font-size: 15px;
line-height: 30px;
}
}
}

View File

@ -0,0 +1,51 @@
import React, { useEffect, useState } from 'react';
import { Button, Col, Row } from 'antd';
import axios from 'axios';
import './index.scss';
function News() {
const [list, setList] = useState([]);
useEffect(() => {
const url = `/topics.json?topic_type=glcc_news&limit=5`;
axios.get(url).then(result => {
if (result && result.data) {
setList(result.data.topics);
}
}).catch(error => { })
},[])
return (
<div className="news">
<div className="glcc-content">
<h3 className="glcc-tit">新闻中心</h3>
<div className="news-content">
{list.length && <div className="main-news">
<h3 className="news-tit ellipsis-2">{list[0].title}</h3>
<div className="news-date">{list[0].created_time && list[0].created_time.split(' ')[0]}</div>
<Button type="link" ><a target="_black" href={list[0].url}>查看详情</a></Button>
</div>}
<div className="news-box">
{
list.map((item, i) => {
return i ? <div className="news-item" key={item.id}>
<h3 className="news-tit ellipsis-2">{item.title}</h3>
<div className="news-content">
<div className="news-date">{item.created_time && item.created_time.split(' ')[0]}</div>
<Button type="link"><a target="_black" href={item.url}>查看详情</a></Button>
</div>
</div> : ''
})
}
</div>
</div>
</div>
</div>
)
}
export default News;

View File

@ -0,0 +1,84 @@
.news {
min-height: 529px;
background-image: linear-gradient(180deg, #d6e6ff 0%, #f9fbff 100%);
.ant-btn-link {
background: #fff;
}
.news-content {
display: flex;
justify-content: space-between;
}
.main-news {
background: url("../../img/news-main.png");
background-size: 100% 100%;
width: 17.66%;
min-width: 339px;
height: 276px;
color: #fff;
line-height: 30px;
padding: 40px 20px;
&:hover{
background: url("../../img/news-main1.png");
background-size: 100% 100%;
}
.news-tit {
font-weight: 500;
font-size: 18px;
color: #fff;
margin-bottom: 13px !important;
min-height: 56px;
}
.news-date {
opacity: .85;
font-size: 14px;
margin:15px 0 44px;
}
.main-news-content {
opacity: .85;
font-size: 14px;
}
}
.news-box {
display: flex;
flex-flow: row wrap;
justify-content: space-between;
align-items: center;
}
.news-item {
width: 48%;
margin-left: 2%;
// min-width: 410px;
height: 128px;
padding: 20px 26px 13px 20px;
background-color: #f6f9fe;
border: 1px solid #fff;
border-radius: 4px;
&:first-child,
&:nth-child(2) {
margin-bottom: 20px;
}
.news-tit {
color: #1e1e1e;
font-size: 16px;
line-height: 30px;
min-height: 56px;
}
.news-date {
color: #6c7283;
font-size: 15px;
}
&:hover {
background: url("../../img/news-item.png");
background-size: 100% 100%;
.news-tit,
.news-date {
color: #fff;
}
}
}
}

View File

@ -0,0 +1,158 @@
import React from 'react';
import './index.scss';
import ccf from '../../img/ccf_logo.png';
import gitlink from '../../img/gitlink.png';
import xjy from '../../img/xjy.png';
import log34 from '../../img/34@2x.png';
import log35 from '../../img/35@2x.png';
import log36 from '../../img/36@2x.png';
import log37 from '../../img/37@2x.png';
import log38 from '../../img/38@2x.png';
import log39 from '../../img/39@2x.png';
import log40 from '../../img/40@2x.png';
import log42 from '../../img/42@2x.png';
import log44 from '../../img/44@2x.png';
import log46 from '../../img/46@2x.png';
import log48 from '../../img/48@2x.png';
import log50 from '../../img/50@2x.png';
import log52 from '../../img/52@2x.png';
import log55 from '../../img/55@2x.png';
import log57 from '../../img/57@2x.png';
import log59 from '../../img/59@2x.png';
import log61 from '../../img/61@2x.png';
import log63 from '../../img/63@2x.png';
import log65 from '../../img/65@2x.png';
import log67 from '../../img/67@2x.png';
import log69 from '../../img/69@2x.png';
import log70 from '../../img/浙江大学.png';
function Partner() {
return (
<div className="partner">
<div className="glcc-content">
<h3 className="glcc-tit">组织方及合作伙伴</h3>
<div className='cont1 cont mb10'>
<div>
主办方
<div onClick={()=>{window.open("https://www.ccf.org.cn/")}} className='div8b9'><img src={ccf}/></div>
</div>
<div>
承办方
<div onClick={()=>{window.open("https://www.ccf.org.cn/kyfzwyh/")}} className='div8b9'><img src={ccf}/></div>
</div>
<div>
协办方
<div className='flex_div'>
<div onClick={()=>{window.open("https://www.gitlink.org.cn/")}} className='div8b9 mr35'><img src={gitlink} className='gitlink'/></div>
<div onClick={()=>{window.open("http://111.8.36.180:81/#/about")}} className='div8b9'><img src={xjy} className='xjy'/></div>
</div>
</div>
</div>
{false && <div className='cont cont2'>
赞助商
{/* 一级赞助商 */}
<div className='one_sponsor mt10'>
<div>
<img src={gitlink} className='gitlink'/>
<p className='bor'></p>
<p>钻石赞助商</p>
</div>
<div>
<img src={gitlink} className='gitlink'/>
<p className='bor'></p>
<p>钻石赞助商</p>
</div>
<div>
<img src={gitlink} className='gitlink'/>
<p className='bor'></p>
<p>钻石赞助商</p>
</div>
</div>
{/* 二级赞助商 */}
<div className='two_sponsor'>
<div>
<img src={gitlink} className='gitlink'/>
<p className='bor'></p>
<p className='op83'>铂金赞助商</p>
</div>
<div>
<img src={gitlink} className='gitlink'/>
<p className='bor'></p>
<p className='op83'>铂金赞助商</p>
</div>
<div>
<img src={gitlink} className='gitlink'/>
<p className='bor'></p>
<p className='op83'>铂金赞助商</p>
</div>
</div>
{/* 三级赞助商 */}
<div className='three_sponsor'>
<div>
<img src={gitlink} className='gitlink'/>
<p className='bor'></p>
<p>黄金赞助商</p>
</div>
<div>
<img src={gitlink} className='gitlink'/>
<p className='bor'></p>
<p>黄金赞助商</p>
</div>
<div>
<img src={gitlink} className='gitlink'/>
<p className='bor'></p>
<p>黄金赞助商</p>
</div>
</div>
{/* 四级赞助商 */}
<div className='four_sponsor'>
<div>
<img src={gitlink} className='gitlink'/>
<p className='bor'></p>
<p>白银赞助商</p>
</div>
<div>
<img src={gitlink} className='gitlink'/>
<p className='bor'></p>
<p>白银赞助商</p>
</div>
<div>
<img src={gitlink} className='gitlink'/>
<p className='bor'></p>
<p>白银赞助商</p>
</div>
</div>
</div>}
<div className='cont cont3 mt15'>
参与高校
<div className='pt10'>
<div onClick={()=>{window.open("https://www.nudt.edu.cn/")}}><img src={log34} className='gitlink' alt='国防科技大学'/></div>
<div onClick={()=>{window.open("https://www.tsinghua.edu.cn/")}}><img src={log35} className='gitlink' alt='清华大学'/></div>
<div onClick={()=>{window.open("https://www.pku.edu.cn/")}}><img src={log36} className='gitlink' alt='北京大学'/></div>
<div onClick={()=>{window.open("https://www.buaa.edu.cn/")}}><img src={log37} className='gitlink' alt='北京航空航天大学'/></div>
<div onClick={()=>{window.open("https://www.cas.cn/")}}><img src={log38} className='gitlink' alt='中科院'/></div>
<div onClick={()=>{window.open("https://www.bupt.edu.cn/")}}><img src={log39} className='gitlink' alt='北京邮电大学'/></div>
<div onClick={()=>{window.open("https://www.sjtu.edu.cn/")}}><img src={log40} className='gitlink' alt='上海交通大学'/></div>
<div onClick={()=>{window.open("https://www.whu.edu.cn/")}}><img src={log42} className='gitlink' alt='武汉大学'/></div>
<div onClick={()=>{window.open("https://www.dlut.edu.cn/")}}><img src={log44} className='gitlink' alt='大连理工大学'/></div>
<div onClick={()=>{window.open("https://www.nju.edu.cn/main.htm")}}><img src={log46} className='gitlink' alt='南京大学'/></div>
<div onClick={()=>{window.open("https://www.tjut.edu.cn/")}}><img src={log48} className='gitlink' alt='天津理工大学'/></div>
<div onClick={()=>{window.open("https://www.fudan.edu.cn/")}}><img src={log63} className='gitlink' alt='复旦大学'/></div>
<div onClick={()=>{window.open("https://www.nwpu.edu.cn/")}}><img src={log52} className='gitlink' alt='西北工业大学'/></div>
<div onClick={()=>{window.open("https://www.sustech.edu.cn/")}}><img src={log69} className='gitlink' alt='南方科技大学'/></div>
{/* <div onClick={()=>{window.open("http://wuxi054727.11467.com/")}}><img src={log57} className='gitlink' alt='无锡江南计算技术研究所'/></div> */}
<div onClick={()=>{window.open("https://www.zju.edu.cn/")}}><img src={log70} className='gitlink' alt='浙江大学'/></div>
<div onClick={()=>{window.open("https://www.cufe.edu.cn/")}}><img src={log55} className='gitlink' alt='中央财经大学'/></div>
<div onClick={()=>{window.open("https://www.xidian.edu.cn/")}}><img src={log57} className='gitlink' alt='西安电子科技大学'/></div>
<div onClick={()=>{window.open("http://www.ccnu.edu.cn/")}}><img src={log59} className='gitlink' alt='华中师范大学'/></div>
<div onClick={()=>{window.open("https://www.scu.edu.cn/")}}><img src={log61} className='gitlink' alt='四川大学'/></div>
<div onClick={()=>{window.open("https://www.ecnu.edu.cn/")}}><img src={log65} className='gitlink' alt='华东师范大学'/></div>
<div onClick={()=>{window.open("http://www.csust.edu.cn/")}}><img src={log67} className='gitlink' alt='长沙理工大学'/></div>
<div onClick={()=>{window.open("https://www.jnu.edu.cn/")}}><img src={log50} className='gitlink' alt='暨南大学'/></div>
</div>
</div>
</div>
</div>
)
}
export default Partner;

View File

@ -0,0 +1,111 @@
.partner{
min-height: 369px;
padding-bottom: 100px;
background-image: url('../../img/partner_bg.png');
background-size: 100% 100%;
.glcc-tit{
color: #fff;
}
.cont1>div, .cont2, .cont3{
color:#ffffff;
font-size: 20px;
}
.cont1{
display: flex;
>div{
display: flex;
flex-direction: column;
margin-right: 35px;
}
.div8b9{
background-image:linear-gradient(135deg,#e5e5f8 0%,#dee3ff 19.24%,#eff1ff 47.28%,#e6e6ff 71.19%,#ececff 100%);
border:2px solid #8b96ce;
border-radius:2px;
box-shadow:0px 1px 6px rgba(89, 150, 203, 0.16);
text-align: center;
width: 220px;
height: 85px;
line-height: 85px;
margin-top: 7px;
&:hover{
box-shadow:0px 0px 10px rgba(255, 255, 255, 0.76);
cursor: pointer;
}
}
.flex_div{display: flex;}
>div>div>img{width: 80px;}
.div8b9 .gitlink{width: 180px;}
.div8b9 .xjy{width: 200px;}
}
.cont2>div>div{
width:156px;
height:87px;
padding: 12px 20px;
margin-right: 50px;
>img{width: 110px;
margin: 0 auto;}
>.bor{
width: 100px;
height: 2px;
margin: 0 auto;
}
>p{
width: auto;
font-size: 12px;
margin: 2px auto;
text-align: center;}
}
.cont2>div{
display: flex;
margin-top: 30px;
>div{border-radius:4px;
&:hover{
box-shadow:0px 0px 10px rgba(255, 255, 255, 0.76);
}}
&.one_sponsor>div{
background-image:linear-gradient(135.33deg,#333333 0%,#474747 21.34%,#929292 44.35%,#575757 61.08%,#444444 75.73%,#212121 100%);
border:1px solid #c4bfba;
>.bor{background-image:linear-gradient(242.92deg,#f9e9b1 0%,#fff2d2 52.29%,#ebcc90 100%);}
}
&.two_sponsor>div{
background-image:linear-gradient(135.33deg,#ffffff 0%,#d8d8d8 21.34%,#aeaeae 34.31%,#fcfcfc 47.69%,#bbbbbb 64.44%,#f2f2f2 81.59%,#828282 100%);
border:1px solid #dbdbdd;
>.bor{background-color:#ffffff;}
>.op83{
color:#000000;
opacity: .83;
}
}
&.three_sponsor>div{
background-image:linear-gradient(135.33deg,#ba973a 0%,#c7a948 21.34%,#d1ae33 47.69%,#ffdb72 72.15%,#b37907 100%);
border:1px solid #efe3ca;
>.bor{background-image:linear-gradient(242.92deg,#f9e9b1 0%,#fff2d2 52.29%,#ebcc90 100%);}
}
&.four_sponsor>div{
background-image:linear-gradient(135.33deg,#636363 0%,#bebebe 21.34%,#979797 43.51%,#9c9c9c 61.08%,#8d8d8d 75.73%,#727272 100%);
border:1px solid #dbdbdd;
>.bor{background-color:#ffffff;}
// >p{color: #000000;}
}
}
.cont3>div{
display: flex;
flex-wrap: wrap;
div{
width:150px;
height:67px;
background-image:linear-gradient(135deg,#e6e6ff 0%,#dee3ff 19.24%,#eff1ff 47.28%,#e6e6ff 71.19%,#ececff 100%);
border:2px solid #8b96ce;
border-radius:2px;
display: flex;
align-items: center;
justify-content: center;
margin: 0 20px 20px 0;
&:hover{
cursor: pointer;
box-shadow:0px 0px 10px rgba(255, 255, 255, 0.76);
}
>img{width: 95%;}
}
}
}

View File

@ -0,0 +1,71 @@
import React from 'react';
import Step from './step';
import './index.scss';
const stepArr = [{
title: "Step1",
date: "4.15",
content: "GLCC发布"
},
{
title: "Step2",
date: "4.15-5.8",
content: "社区启动报名"
},
{
title: "Step2",
date: "5.20",
content: "公示社区名单"
},
{
title: "Step2",
date: "5.21-6.19",
content: "学生提交proposal"
},
{
title: "Step2",
date: "7.1",
content: "公示项目申请审核结果",
noArrow: true,
},
{
title: "Step2",
date: "7.4-8.12",
content: "项目开发第一阶段",
},
{
title: "Step2",
date: "8.12-9.30",
content: "项目开发第二阶段",
},
{
title: "Step2",
date: "10.1-10.14",
content: "结项审核",
},
{
title: "Step2",
date: "11.11",
content: "公布优秀项目&学员",
noArrow: true,
}
]
function TimerShaft() {
return (
<div className="timerShaft">
<div className="glcc-content">
<h3 className="glcc-tit">时间规划</h3>
<div className="time-content">
{
stepArr.map((item, i) => {
return <Step {...item} title={`Step${i + 1}`} key={i}/>
})
}
</div>
</div>
</div>
)
}
export default TimerShaft;

View File

@ -0,0 +1,60 @@
.timerShaft {
background: url("../../img/time-bg.png");
background-size: 100% 100%;
width: 100%;
height: 32.34375vw;
min-height: 621px;
display: flex;
flex-flow: column nowrap;
justify-content: center;
.time-content {
display: flex;
flex-flow: row wrap;
justify-content: center;
}
.step-item {
display: flex;
align-items: center;
margin-bottom: 68px;
max-width: 20%;
.sexange {
background: url("../../img/sexange.png");
background-size: 100% 100%;
width: 201.69px;
height: 178.93px;
text-align: center;
padding: 34px 0 10px;
line-height: 26px;
font-weight: 700;
}
.sexange-tit {
font-weight: 700;
color: #202d40;
font-size: 18px;
line-height: 26px;
margin-bottom: 11px !important;
}
.sexange-date {
margin-bottom: 8px;
font-weight: 700;
color: #124599;
font-size: 22px;
line-height: 26px;
}
.sexange-content {
font-weight: 500;
color: #6c7283;
font-size: 15px;
width: 55%;
margin: 0 auto;
}
.time-arrow {
width: 49.5px;
height: 13px;
}
}
}

View File

@ -0,0 +1,18 @@
import React from 'react';
import './index.scss';
import TimeArrow from '../../img/time-arrow.png';
function Step({ title, date, content, noArrow }) {
return (
<div className="step-item">
<div className="sexange">
<h4 className="sexange-tit">{title}</h4>
<div className="sexange-date">{date}</div>
<div className="sexange-content">{content}</div>
</div>
{!noArrow && <img className="time-arrow" src={TimeArrow}></img>}
</div>
)
}
export default Step;

BIN
src/glcc/img/34@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
src/glcc/img/35@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
src/glcc/img/36@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
src/glcc/img/37@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
src/glcc/img/38@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
src/glcc/img/39@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
src/glcc/img/40@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
src/glcc/img/42@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
src/glcc/img/44@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
src/glcc/img/46@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
src/glcc/img/48@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
src/glcc/img/50@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
src/glcc/img/52@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
src/glcc/img/55@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
src/glcc/img/57@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
src/glcc/img/59@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

BIN
src/glcc/img/61@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

BIN
src/glcc/img/63@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
src/glcc/img/65@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

BIN
src/glcc/img/67@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

BIN
src/glcc/img/69@2x.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
src/glcc/img/award-bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

BIN
src/glcc/img/award-tit.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
src/glcc/img/banner.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

BIN
src/glcc/img/ccf_logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
src/glcc/img/contact_bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 819 KiB

BIN
src/glcc/img/gitlink.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

BIN
src/glcc/img/gitlink1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
src/glcc/img/gitlink2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
src/glcc/img/help.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

BIN
src/glcc/img/help_bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 KiB

BIN
src/glcc/img/lightspot1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 85 KiB

BIN
src/glcc/img/lightspot2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

BIN
src/glcc/img/lightspot3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

BIN
src/glcc/img/lightspot4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
src/glcc/img/news-item.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
src/glcc/img/news-main.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

BIN
src/glcc/img/news-main1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

BIN
src/glcc/img/partner_bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 KiB

BIN
src/glcc/img/sexange.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 KiB

BIN
src/glcc/img/time-arrow.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

BIN
src/glcc/img/time-bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 KiB

BIN
src/glcc/img/xjy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

72
src/glcc/index.jsx Normal file
View File

@ -0,0 +1,72 @@
import React from "react";
import { Route, Switch } from "react-router-dom";
import { withRouter } from "react-router";
import { SnackbarHOC } from "educoder";
import { CNotificationHOC } from "../modules/courses/common/CNotificationHOC";
import { TPMIndexHOC } from "../modules/tpm/TPMIndexHOC";
import "./index.scss";
import Loadable from "react-loadable";
import Loading from "../Loading";
import { ImageLayerOfCommentHOC } from "../modules/page/layers/ImageLayerOfCommentHOC";
//
const Home = Loadable({
loader: () => import("./home"),
loading: Loading,
});
//
const Apply = Loadable({
loader: () => import("./apply"),
loading: Loading,
});
//
const Help = Loadable({
loader: () => import("./help"),
loading: Loading,
});
const Glcc = (propsF) => {
// 415~58
const isGlccApplyDate = Date.parse(new Date()) < 1652025600000;
return (
<div className="newMain clearfix">
<Switch {...propsF}>
{/* 开源夏令营报名页面 */}
<Route
path="/glcc/apply"
render={(props) => (
<Apply {...propsF} {...props} isGlccApplyDate={isGlccApplyDate}/>
)}
></Route>
{/* 帮助中心 */}
<Route
path="/glcc/help"
render={(props) => (
<Help {...propsF} {...props} />
)}
></Route>
{/* 首页 */}
<Route
path="/glcc"
render={(props) => (
<Home {...propsF} {...props} isGlccApplyDate={isGlccApplyDate}/>
)}
></Route>
</Switch>
</div>
);
}
export default withRouter(
ImageLayerOfCommentHOC({
imgSelector: ".imageLayerParent img, .imageLayerParent .imageTarget",
parentSelector: ".newMain",
})(CNotificationHOC()(SnackbarHOC()(TPMIndexHOC(Glcc))))
);

19
src/glcc/index.scss Normal file
View File

@ -0,0 +1,19 @@
.glccHelp{
width: 48px;
padding: 6px 16px;
text-align: center;
background-color:#f6f9fe;
border:1px solid #ffffff;
border-radius:2px;
box-shadow:0px 0px 8px rgba(55, 148, 255, 0.16);
color:#1e1e1e;
cursor: pointer;
.icon-bangzhuzhongxinicon{
color: #0654D6;
margin-left: -3px;}
&:hover{
color:#ffffff;
background-color:#466aff;
.icon-bangzhuzhongxinicon{color:#ffffff}
}
}

14
src/glcc/siderBarHelp.js Normal file
View File

@ -0,0 +1,14 @@
import React from 'react';
import './index.scss';
function SiderBar() {
return (
// 开源夏令营定制帮助中心调整按钮
<div className={"glccHelp -task-sidebar"} onClick={()=>window.open("/glcc/help")}>
<i className='iconfont icon-bangzhuzhongxinicon font-20'></i>
帮助中心
</div>
)
}
export default SiderBar;

6
src/glcc/static.js Normal file
View File

@ -0,0 +1,6 @@
export const classify = [
{ value: '0', title: "程序开发"},
{ value: '1', title: "Web应用开发"},
{ value: '2', title: "数据库"},
{ value: '3', title: "操作系统"},
];