diff --git a/Routes.js b/Routes.js index c8bfa2783..51d390c1a 100644 --- a/Routes.js +++ b/Routes.js @@ -56,4 +56,4 @@ export const deepRoutes = [ ] // 不进行组织或个人判断 -export const specialRoute = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder", "glcc","bindlogin", "softbot","zone", "undefined", "admins", "oauth", "competitions", "hiagent","softwareFactory"] \ No newline at end of file +export const specialRoute = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder", "glcc","bindlogin", "softbot","zone", "undefined", "admins", "oauth", "competitions", "hiagent","softwareFactory","forums"] \ No newline at end of file diff --git a/public/css/gitlink.min.css b/public/css/gitlink.min.css index d4d16b2a3..655c21cf0 100644 --- a/public/css/gitlink.min.css +++ b/public/css/gitlink.min.css @@ -1798,6 +1798,10 @@ a.decoration { margin-left: 180px } +.mrat{ + margin-right: auto; +} + .mr3 { margin-right: 3px } diff --git a/src/App.js b/src/App.js index d27e9fefd..999da7318 100644 --- a/src/App.js +++ b/src/App.js @@ -168,8 +168,13 @@ const Iframe = Loadable({ loading: Loading, }); +const Incentiveprogram = Loadable({ + loader: () => import('./activity/incentiveprogram'), + loading: Loading, +}); + // 此处仅维护前端可能的一级路由,不用进行项目或者组织判断的字段。 -const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder", "glcc","bindlogin", "softbot","zone", "hiagent","softwareFactory"]; +const keyWord = ["explore", "settings", "setting", "mulan", "wiki", "issues", "setting", "trending", "code", "projects", "pulls", "mine", "login", "register", "email", "export", "nopage", "404", "403", "500", "501", "search", "organize", "login", "register", "resetPassword", "aboutus","educoder", "glcc","bindlogin", "softbot","zone", "hiagent","softwareFactory", "incentiveprogram"]; class App extends Component { constructor(props) { @@ -359,6 +364,15 @@ class App extends Component { { pathType ? + {/* 活动 */} + { + return () + } + }> + {/* iframe页面 */} { + document.title = "开源激励计划"; + }, []); + + + const applyList = [ + { + title: "开源项目报名", + desc: "原创开源项目,初始版本已经发布半年以上", + img: require("../image/item2.png"), + link: "https://v.wjx.cn/vm/wJn3xMO.aspx" + }, + { + title: "开源课程报名", + desc: "开源相关课程,且己建立一年以上", + img: require("../image/item3.png"), + link: "https://v.wjx.cn/vm/YDgW8US.aspx" + }, + { + title: "开源贡献者报名", + desc: "在开源项目中做过出色贡献", + img: require("../image/item4.png"), + link: "https://v.wjx.cn/vm/PpwVfuw.aspx" + } + ] + + return
+
+
+ + + 汇聚优质成果 + +
开源激励计划·赋能优质开源成果
+
CCF开源发展技术委员会 天工开物开源基金会 联合发起
+
+
+ {applyList.map((item, index) =>{ + return +
+ +
{ + window.open(item.link) + }}>{item.title}
+
{item.desc}
+
+ {index !== applyList.length - 1 && } +
+ })} +
+
+ +
+ +
+
; +} + +export default TPMIndexHOC(Incentiveprogram); \ No newline at end of file diff --git a/src/activity/incentiveprogram/index.scss b/src/activity/incentiveprogram/index.scss new file mode 100644 index 000000000..e66cacd07 --- /dev/null +++ b/src/activity/incentiveprogram/index.scss @@ -0,0 +1,195 @@ +.opacity7 { + opacity: 0.7; +} + +.opacity8 { + opacity: 0.8; +} + +.color-091 { + color: #091221; +} + +.main_Incentiveprogram { + width: 1600px; + margin: 0 auto; +} + +.gap10 { + gap: 10px +} + +.gap20 { + gap: 20px +} + +.jsb { + justify-content: space-between; +} + +.banner_Incentiveprogram { + background-image: url('../image/banner.png'); + background-size: 100% 100%; + padding: 100px 0 50px; + + .banner_item_box { + width: 600px; + margin: 0 auto; + } + + .banner_item_1 { + padding: 10px 20px; + background-image: linear-gradient(132.09deg, #4689ff 0%, #5182ff 28.18%, #b546ff 100%); + border-radius: 0px 20px 0px 20px; + } + + .banner_item_2 { + // 字体颜色渐变 + background-image: linear-gradient(132.09deg, #4689ff 0%, #5182ff 28.18%, #b546ff 100%); + background-clip: text; + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + } + + .apply_item_box_list { + background-image: url('../image/item5.png'); + background-size: 100% 100%; + justify-content: space-around; + padding: 50px 0 32px; + margin-top: 70px; + } + + .apply_item_box { + &:hover .apply_item_title { + color: #466aff; + position: relative; + + &::after { + content: '\e9a5'; + font-family: 'iconfont'; + position: absolute; + margin-left: 8px; + font-weight: normal; + } + } + } +} + +.light_Incentiveprogram { + background-image: url('../image/banner2.png'); + background-size: 100% 100%; + padding-bottom: 110px; + + .light_box { + gap: 20px; + } + + .light_item { + background-color: #ffffff; + border-radius: 10px; + padding: 45px 40px; + transition: all 0.5s ease-in-out; + + &.active { + background-image: url('../image/item6.png'); + background-size: 100% 100%; + color: white; + + .tag_light { + color: #091221; + background-color: #f6f7fa; + transition: all 0.5s ease-in-out; + } + } + } + + .tag_light { + background-color: #f6f7fa; + border-radius: 4px; + padding: 2px 10px; + } +} + +.project_bk_color { + background: linear-gradient(to bottom, #EFF5FF 0%, #E8F9FF 50%, #ffffff 50%, #ffffff 100%); +} + +.project_Incentiveprogram { + background-image: url('../image/banner3.png'); + background-size: 100% 100%; + padding-top: 40px; + padding-bottom: 80px; + + .white_bk { + background-color: #ffffff; + border-radius: 30px; + padding: 30px; + } + + .blue_item { + background-image: linear-gradient(180deg, rgba(70, 106, 255, 0.2) 0%, #ffffff 100%); + border-radius: 12px; + } + + .project_item_inc { + width: 230px; + + &+.ant-divider.ant-divider-vertical { + top: 1.94em; + height: 100px; + background: none; + background-image: linear-gradient(180deg, rgba(9, 18, 33, 0) 0%, rgba(9, 18, 33, 0.1) 52.72%, rgba(90, 96, 106, 0) 100%); + } + } + + .project_tag { + color: white; + background-image: linear-gradient(116.57deg, #466aff 0%, #a052ff 100%); + border-radius: 8px; + padding: 10px; + margin-top: 35px; + } + + .project_item_right { + height: 47.8%; + gap: 15px; + + .blue_item_2 { + line-height: 38px; + padding: 17px; + } + } + + .project_item_right_1 .blue_item { + width: 110px; + text-align: center; + } +} + +.time_Incentiveprogram { + background-image: url('../image/banner4.png'); + background-size: 100% 100%; + padding-bottom: 80px; + + .time_2_inc { + border-radius: 10px; + background: rgba(255, 255, 255, 0.45); + backdrop-filter: blur(0px); + } + + .time_item_Inc { + flex: 0 0 calc(21.5%); + } +} + +@media (max-width: 1400px) { + .main_Incentiveprogram { + width: 1200px; + } +} + +@media (max-width: 1200px) { + .main_Incentiveprogram { + width: 100%; + } +} \ No newline at end of file diff --git a/src/activity/incentiveprogram/light.jsx b/src/activity/incentiveprogram/light.jsx new file mode 100644 index 000000000..765567ab3 --- /dev/null +++ b/src/activity/incentiveprogram/light.jsx @@ -0,0 +1,68 @@ +import React, { useState, useEffect } from "react"; + +// 活动亮点 +function Light() { + const [active, setActive] = useState(0); + // 三秒切换list的高亮显示元素 + + + const list = [ + { + img: require("../image/item7.png"), + title: "三大激励类别", + desc: "年度评选涵盖优秀开源项目、优秀开源课程及优秀开源贡献者,全面激励开源生态的创新与协作", + tags: ["开源项目", "开源课程", "开源贡献者"] + }, { + img: require("../image/item8.png"), + title: "激励金额与资源扩展", + desc: "激励金总额达20万以上,并持续引入更多企业资源,设立多样化赛道,推动开源事业蓬勃发展", + tags: ["现有激励金:20万", " 更多合作资源"] + }, { + img: require("../image/item7.png"), + title: "开源生态共建", + desc: "通过评选挖掘优质开源成果,汇聚行业力量,为技术社区注入新活力与可持续发展动力", + tags: ["挖掘优质成果", "汇聚行业资源"] + }, { + img: require("../image/item8.png"), + title: "未来展望", + desc: "不断丰富激励形式与资源支持,打造更具影响力的开源激励平台,助力全球技术创新", + tags: ["持续丰富激励", "打造标杆平台"] + } + ]; + + useEffect(() => { + const interval = setInterval(() => { + setActive(prevActive => (prevActive + 1) % list.length); + }, 4000); + + return () => clearInterval(interval); + }, [list.length]); + + return ( +
+
+
活动亮点
+
+ {list.map((item, index) => { + return
setActive(index)} + > + +
{item.title}
+
{item.desc}
+
+ {item.tags.map((tag, i) => { + return {tag} + })} +
+
+ })} +
+
+
+ ) +} + +export default Light; \ No newline at end of file diff --git a/src/activity/incentiveprogram/project.jsx b/src/activity/incentiveprogram/project.jsx new file mode 100644 index 000000000..0d8ec46ad --- /dev/null +++ b/src/activity/incentiveprogram/project.jsx @@ -0,0 +1,83 @@ +import { Divider } from "antd"; +import React, { useState, useEffect, Fragment } from "react"; + +// 征集开源项目 +function Project() { + + const list = [ + { + img: require("../image/item9.png"), + title: "面向对象", + desc: "面向社会征集\n开源创新成果和开源贡献", + tags: "提升优质开源成果价值" + }, { + img: require("../image/item9.png"), + title: "成果类型", + desc: "开源原创项目.开源\n课程/数字教材、开源贡献", + tags: "多样化方式参与开源" + }, { + img: require("../image/item9.png"), + title: "依托平台", + desc: "所有项目要求在GitLink\n平台以开源开放的形式发布", + tags: "GitLink平台持续公益开源支持" + } + ]; + + return ( +
+
+
征集开源项目
+
+
+
征集开源项目
+
+ {list.map((item, index) => { + return +
+ +
{item.title}
+
{item.desc}
+
{item.tags}
+
+ {index !== list.length - 1 && } +
+ })} +
+
+
+
+
+ 激励金
+ 创新开源项目/开源课程/开源贡献 +
+
+ A等
+ 1名
激励金2万
+
+
+ B等
+ 3名
激励金0.5万
+
+
+ ...... +
+
+
+
+ 年度评审与激励
+ 创新开源项目/开源课程/开源贡献 +
+
+ 申请渠道GitLink
+ 评选方式成果开源、持续贡献、年度申报、专家评审
+ 激励形式荣誉证书 + 现金激励
+
+
+
+
+
+
+ ) +} + +export default Project; \ No newline at end of file diff --git a/src/activity/incentiveprogram/time.jsx b/src/activity/incentiveprogram/time.jsx new file mode 100644 index 000000000..7a8381538 --- /dev/null +++ b/src/activity/incentiveprogram/time.jsx @@ -0,0 +1,71 @@ +import { Divider } from "antd"; +import React, { useState, useEffect, Fragment } from "react"; + +// 时间规划 +function Time() { + + const list = [ + { + title: "计划正式启动", + desc: "LAUNCHED", + }, { + title: "开源贡献实践", + desc: "ENGAGEMENT", + }, { + title: "报名截止", + desc: "DEADLINE", + }, { + title: "激励评审", + desc: "EVALUATION", + }, { + title: "激励发放", + desc: "AWARD", + } + ]; + + const list1 = [ + { + title: "2025年11月28日", + desc: "报名通道将于近日开放,\n最新动态请持续关注官网通知", + }, { + title: "2025年11月起", + desc: "鼓励长期持续参与开源贡献,\n开源贡献时长为核心评选标准之一", + }, { + title: "2026年5月30日", + desc: "需在截止前在GitLink平台开源,\n平台活跃度将作为评选加分项", + }, { + title: "2026年6-7月", + desc: "由CCF开源发展技术委员会激励\n计划评审委员会专业审议,确保公平公正", + }, { + title: "2026年8月", + desc: "激励(荣誉部分)预计在2026\nCCF中国开源大会现场统一颁发", + } + ]; + + return ( +
+
+
时间规划
+
+ {list.map((item, index) => ( +
+
{item.title}
+
{item.desc}
+ +
+ ))} +
+
+ {list1.map((item, index) => ( +
+ {item.title} +
{item.desc}
+
+ ))} +
+
+
+ ) +} + +export default Time; \ No newline at end of file diff --git a/src/forge/Head/Header.js b/src/forge/Head/Header.js index f36eebae9..fee0c67d1 100644 --- a/src/forge/Head/Header.js +++ b/src/forge/Head/Header.js @@ -203,7 +203,7 @@ class NewHeader extends Component { response.data.data.forEach((e, i) => { newArray[i] = { name: e.name, - link: `/zone/${e.key}` + link: e.key.toLocaleLowerCase() === "incentiveprogram" ? `/incentiveprogram` : `/zone/${e.key}` } }); this.setState({ zoneList: newArray }) diff --git a/src/forge/Information/Component/publicBanner.jsx b/src/forge/Information/Component/publicBanner.jsx index 3d5484395..2b02fc3e8 100644 --- a/src/forge/Information/Component/publicBanner.jsx +++ b/src/forge/Information/Component/publicBanner.jsx @@ -33,6 +33,7 @@ function PublicBanner(props) { const vip = /[A-Za-z0-9]{0,}\/VIP/g; const help = /[A-Za-z0-9]{0,}\/help/g; const dataset = /[A-Za-z0-9]{0,}\/dataset/g; + const lesson = /[A-Za-z0-9]{0,}\/lessons/g; if (pathname === `/zone/${deptId}`) { setKey("1"); } @@ -53,6 +54,8 @@ function PublicBanner(props) { } else if (dataset.test(pathname)) { setKey("9"); + }else if(lesson.test(pathname)) { + setKey("10"); } } }, [pathname]) @@ -154,6 +157,7 @@ function PublicBanner(props) { {sectionResourceShow && {sectionResourceTitle}} {sectionCmsShow && {sectionCmsTitle}} {/* Sig小组 */} + {isNSCC && 课程实训} {sectionMemberShow && {sectionMemberTitle}} {sectionHelperShow && {data.sectionHelperTitle}} {adminUrl && { window.location.href = adminUrl }}>后台管理} diff --git a/src/forge/Information/Pages/homepage/component/news.jsx b/src/forge/Information/Pages/homepage/component/news.jsx index e4843b258..96cc4afdf 100644 --- a/src/forge/Information/Pages/homepage/component/news.jsx +++ b/src/forge/Information/Pages/homepage/component/news.jsx @@ -1,67 +1,38 @@ import React , { useEffect, useState } from 'react'; import { Link } from 'react-router-dom'; -import { getDirListById, getSubDocList, gethomePageDocList } from '../../../api'; -import { Badge, Col, Icon, Row } from 'antd'; -import dirpng from '../image/new3.png' -import new4 from '../image/new4.png'; -import new5 from '../image/new5.png'; -import new6 from '../image/new6.png'; -import new7 from '../image/new7.png'; -import new8 from '../image/new8.png'; -import new9 from '../image/new9.png'; -import new10 from '../image/new10.png'; -import new11 from '../image/new11.png'; -import new12 from '../image/new12.png'; -import new13 from '../image/new13.png'; +import { getSubDocList, gethomePageDocList } from '../../../api'; +import img1 from '../../../img/img1.png'; import '../index.scss'; -import Nodata from '../../../../Nodata'; -import uosIcon from '../image/uosIcon.png' +import "slick-carousel/slick/slick.css"; +import "slick-carousel/slick/slick-theme.css"; +import Slider from 'react-slick'; +import Left from '../../../../../home/Img/left.png'; +import Right from '../../../../../home/Img/right.png'; import guideArrow from '../../../img/guideArrow.png'; +import "../../../indexZonebyCCF.scss"; -function News({data, subTitle, firstDirIntro, secondDirIntro}) { - const {firstTitle, key, homepageCmsTitle, id} = data || {}; - const logoByName = { - "智慧城市OS": new4, - "智慧交通OS": new5, - "智慧建设OS": new6, - "机器人OS": new7, - "智能家居OS": new8, - "桌面OS": new9, - "服务器OS": new10, - "移动智能终端OS": new11, - "嵌入式及物联网OS": new12, - "云OS": new13 +function News({data, subTitle , match }) { + const { key, homepageCmsTitle, id} = data || {}; + const { deptId } = match.params; + const [ newsList, setNewsList ] = useState({}); + const [tag,setTag] = useState(0); + const setting = { + dots: true, + infinite: true, + speed: 2000, + slidesToShow: 1, + slidesToScroll: 1, + pauseOnDotsHover: true, + autoplaySpeed: 5000, + pauseOnFocus: true, + autoplay: true, + arrows: true, + prevArrow: , + nextArrow: , + afterChange: (index)=> setTag(index) } - const [dirList, setDirList] = useState([]); - const firstDir = dirList[0]; - const secondDir = dirList[1]; - const dirs = dirList.slice(2) - - // const rows = Math.ceil(dirs.length / 6); - const [docListByFirstDir, setDocListByFirstDir] = useState([]); - const [docListBySecondDir, setDocListBySecondDir] = useState([]); - const [docListByDir, setDocListByDir] = useState([]); - const [activeDirId, setActiveDirId] = useState(undefined); - const [total, setTotal] = useState(0); - const [showNew, setShowNew] = useState({}); - // useEffect(()=>{ - // id && getDirListById(id).then(res=>{ - // if(res){ - // const rows = res.data.rows - // setDirList(rows); - // // 获取第一个栏目的第一条文章 - // rows[0] && getDocById(rows[0].id, 1, (data)=>{ - // setDocListByFirstDir(data) - // }) - // // 获取第2个栏目的第一条文章 - // rows[1] && getDocById(rows[1].id, 8, (data)=>{ - // setDocListBySecondDir(data) - // }) - // rows[2] && setActiveDirId(rows[2].id) - // } - // }) - // }, [id]) + useEffect(() => { if(id){ @@ -69,135 +40,67 @@ function News({data, subTitle, firstDirIntro, secondDirIntro}) { } },[ id ]) - useEffect(()=>{ - activeDirId && getDocById(activeDirId, 4, (data)=>{ - setDocListByDir(data) - }, (data)=>{setTotal(data)}) - }, [activeDirId]) - - // 根据招聘专栏的id获取其栏目下的招聘文章 - function getDocById(dirId, pageSize=10, setData, setTotal1){ - getSubDocList(dirId,{pageSize:pageSize,pageNum:1,auditStatus:1}).then(result=>{ - if(result && result.data.rows){ - let rows = result.data.rows; - setData(rows); - setTotal1 && setTotal1(result.data.total) - } - }) - } - const getNewsList = () => { - gethomePageDocList(id).then(result=>{ - if(result && result.data.rows && result.data.rows[0]){ - setShowNew(result.data.rows[0]); + gethomePageDocList(id).then(result => { + if (result) { + setNewsList(result.data.rows); } - }).catch(error=>{}) + }).catch(error => { }) } - const renderItems = () => { - const itemsPerRow = 6; - let rendered = []; - let currentRow = []; - - dirs.forEach((item, index) => { - - // 添加项目到当前行 - currentRow.push( -
{setActiveDirId(item.id)}}> - -

{item.name}

-
- ); - - // 如果达到每行项目数或是最后一个项目 - if ((index + 1) % itemsPerRow === 0 || index === dirs.length - 1) { - // 将当前行添加到渲染列表 - rendered = rendered.concat(currentRow); - - if (currentRow.some(item => item.key === activeDirId?.toString())) { - rendered.push( -
-
- {docListByDir.map(item=>{ - return
- - - {item.name} - -

{item.summary}

-
- })} - {!docListByDir.length &&
暂无数据~
} -
- {total > 4 &&
{window.scrollTo(0,450)}} className="color-blue font-15">查看更多
} -
- ); - } - // 重置当前行 - currentRow = []; - } - }); - return rendered; - }; - return

{homepageCmsTitle}

{subTitle}

- { - showNew.id &&
-
-

{ showNew.name }

-

{ showNew.summary }

-
- -
- } -
- {/* 第一个顺序栏目 */} - {firstDir &&
-

- {window.scrollTo(0,450)}}>{firstDir.name} - {window.scrollTo(0,450)}}>更多 -

-
{firstDirIntro}
- {docListByFirstDir[0] &&
- - {docListByFirstDir[0].name} -
} -
} - {/* 第二个顺序栏目 */} - {secondDir &&
-
-
- -
-
-

- {window.scrollTo(0,450)}}>{secondDir.name} -

-

{secondDirIntro}

-
-
- - {docListBySecondDir.map(item=>{ - return - - - {item.name} - - - })} - {docListBySecondDir && !docListBySecondDir.length &&
} -
-
} -
+ { + // 新闻动态 + newsList && newsList.length >= 0 && +
+
+
+ + { + newsList && newsList.length > 0 ? + newsList.map((i, k) => { + return ( +
+
+ {window.location.href=`/zone/${deptId}/newdetail/${i.id}`}} /> +
+
+ ) + }) + : + "" + } +
+
+
    + { + newsList.map((i, k) => { + return ( +
  • + {i.name} +

    + + + {i.publishTime} + +

    + {i.visits} +

    +

    +
  • + ) + }) + } +
+
+
+ }
- 查看更多 + 查看更多
- {dirs && !!dirs.length &&
- {renderItems()} -
}
} diff --git a/src/forge/Information/Pages/homepage/component/projectByNSCC.jsx b/src/forge/Information/Pages/homepage/component/projectByNSCC.jsx index 5c777748c..9cab646f2 100644 --- a/src/forge/Information/Pages/homepage/component/projectByNSCC.jsx +++ b/src/forge/Information/Pages/homepage/component/projectByNSCC.jsx @@ -33,13 +33,17 @@ function TypeCarousel({pageSize=4, list=[], typeId, onClick}) { 3: "icon-xingnengjizhunyupingce", 4: "icon-renwutiaoduguanli" } - return
{ onClick(item.id) }}> + return
{ onClick(item.id) }}> {/* 项目 */} {/* */} - + {item.name}
})} + + + 更多 +
})} @@ -129,30 +133,30 @@ function Project({ data }) { return
window.open(i.projectURL)}>
{i.projectProperties && i.projectProperties.name} - {className === "online_detail" && } + {className === "online_detail" && }
{i.projectProperties.description || "暂无描述"}
    - {i.projectProperties.language &&
  • {i.projectProperties.language}
  • } + {i.projectProperties.language &&
  • {i.projectProperties.language}
  • } { i.projectProperties && i.projectProperties.topics && i.projectProperties.topics.split(",").map(t => { return ( -
  • {t}
  • +
  • {t}
  • ) }) }
-

+

开发者{contributorsCount || 0} 历史提交总量{commitCount || 0} - + {!!scoreChange ?
: } 活跃度{lastWeekScore || 0}
{!!scoreChange && @@ -167,7 +171,7 @@ function Project({ data }) {

{homepageProjectTitle}

- {setTypeId(id); setPage(1)}}/> + {setTypeId(id); setPage(1)}}/>
{lists.slice(0, 3).map((i, index)=>{ diff --git a/src/forge/Information/Pages/homepage/index.scss b/src/forge/Information/Pages/homepage/index.scss index 583090db8..7d5fe36f0 100644 --- a/src/forge/Information/Pages/homepage/index.scss +++ b/src/forge/Information/Pages/homepage/index.scss @@ -983,6 +983,8 @@ border-radius:4px; color:#466aff; background-color:#E5EAFF; + border: 1px solid rgba(255, 255, 255, 0); + margin-right: 8px; &:nth-of-type(3n+2){ color:#1c9907; background-color:#EBF5ED; diff --git a/src/forge/Information/Pages/homepage/uos.jsx b/src/forge/Information/Pages/homepage/uos.jsx index 1ec8d2746..dbf95de6e 100644 --- a/src/forge/Information/Pages/homepage/uos.jsx +++ b/src/forge/Information/Pages/homepage/uos.jsx @@ -29,7 +29,7 @@ function HeaderPageUos(props){
- + diff --git a/src/forge/Information/Pages/lessons.jsx b/src/forge/Information/Pages/lessons.jsx new file mode 100644 index 000000000..16bc9e30b --- /dev/null +++ b/src/forge/Information/Pages/lessons.jsx @@ -0,0 +1,18 @@ +import React from 'react'; + +function Lessons({src="https://gitlink.educoder.net/"}){ + + return( +
+ +
+ ) +} +export default Lessons; \ No newline at end of file diff --git a/src/forge/Information/img/zoneMenu10.png b/src/forge/Information/img/zoneMenu10.png new file mode 100644 index 000000000..5ec0088f1 Binary files /dev/null and b/src/forge/Information/img/zoneMenu10.png differ diff --git a/src/forge/Information/index.jsx b/src/forge/Information/index.jsx index 8e1a30594..4f4ebc167 100644 --- a/src/forge/Information/index.jsx +++ b/src/forge/Information/index.jsx @@ -36,6 +36,10 @@ const Apply = Loadable({ loader: () => import("./Pages/apply"), loading: Loading, }); +const Lessons = Loadable({ + loader: () => import("./Pages/lessons"), + loading: Loading, +}); const Source = Loadable({ loader: () => import("./Pages/source"), loading: Loading, @@ -254,6 +258,12 @@ function Index(props){ )} > + ( + + )} + > ( @@ -303,7 +313,7 @@ function Index(props){ deptId === "JCC" ? : deptId === "uos" ? : deptId==="xjykyzx" ? : - deptId==="NSCC" ? : + deptId.toLocaleUpperCase()==="NSCC" ? : temp === tempEnum.zone ? : )} diff --git a/src/forge/Main/CoderDepot.jsx b/src/forge/Main/CoderDepot.jsx index 98a8c250e..8aa84638e 100644 --- a/src/forge/Main/CoderDepot.jsx +++ b/src/forge/Main/CoderDepot.jsx @@ -723,7 +723,7 @@ function CoderDepot(props){ /> } - {__CLIENT__ && projectDetail && projectDetail.project_id && !projectDetail.private && } + {/* {__CLIENT__ && projectDetail && projectDetail.project_id && !projectDetail.private && } */} {/* 贡献者 */} {mirror_status ===0 && } {/* 项目画像: 导入/fork项目不展示, open_portrait后台配置是否开启仓库 */} diff --git a/src/forge/Server/Index.jsx b/src/forge/Server/Index.jsx index 63c7ae1da..e3e5167ce 100644 --- a/src/forge/Server/Index.jsx +++ b/src/forge/Server/Index.jsx @@ -46,20 +46,20 @@ function ServerIndex(props){ return(
- () } > - () - } - > () } + > */} + () + } > 查看详情 } - { + {/* { !privateStatus &&
  • @@ -92,7 +92,7 @@ function Main(props){ 查看详情
  • - } + } */}
    ) diff --git a/src/modules/login/CCF.png b/src/modules/login/CCF.png new file mode 100644 index 000000000..4d5df8ee4 Binary files /dev/null and b/src/modules/login/CCF.png differ diff --git a/src/modules/login/LoginDialog.css b/src/modules/login/LoginDialog.css index f5226c667..bc55f3dd6 100644 --- a/src/modules/login/LoginDialog.css +++ b/src/modules/login/LoginDialog.css @@ -8,9 +8,6 @@ /* 影响notification */ /* z-index: 20000; */ } - #DialogID .dialogBox { - width: 400px; - } .MuiPaper-elevation24-45{ box-shadow:none !important; } @@ -24,7 +21,7 @@ top: -64px !important; } #log_reg_content{ - width:405px !important; + width:445px !important; border-radius:6px; box-shadow:4px 8px 12px rgba(76,76,76,0.3); } @@ -39,7 +36,7 @@ margin-left:10px; margin-right:10px; } -#DialogID div { +#DialogID>div { overflow-y:visible !important; box-shadow:none !important; } @@ -158,4 +155,4 @@ .MuiModal-root-15 { z-index: 10001 !important; -} +} \ No newline at end of file diff --git a/src/modules/login/LoginDialog.js b/src/modules/login/LoginDialog.js index f927ca488..7315fc0a6 100644 --- a/src/modules/login/LoginDialog.js +++ b/src/modules/login/LoginDialog.js @@ -1,19 +1,13 @@ import React, { Component } from 'react'; - import Dialog from 'material-ui/Dialog'; -import { notification , Tooltip } from 'antd'; - +import { notification } from 'antd'; import axios from 'axios'; -import educoderLogo from './educoder.png'; -import qqlogo from './qq@2x.png'; -import WeChatlogo from './WeChat@2x.png'; -import giteelogo from './gitee.png'; -import githublogo from './github.png'; import cookie from 'react-cookies'; import './LoginDialog.css'; import { broadcastChannelPostMessage } from 'educoder' import Notcompletedysl from "../user/Notcompletedysl"; import { Encrypt } from '../../common/Env'; +import OtherLogin from '../loginRegister/component/otherLogin'; const $ = window.$; var wait = 60; @@ -416,20 +410,12 @@ class LoginDialog extends Component { MyEduCoderModals: false }) }; - setMyEduCoderModals = () => { - this.setState({ - MyEduCoderModals: true - }) - }; onKeydowns = (e) => { let { disabled } = this.state; if (disabled === false && e.keyCode === 13) { this.loginEDU() } }; - getloginurl = (url) => { - window.location.href = url; - }; openNotifications = (btn) => { // type 1 成功提示绿色 2提醒颜色黄色 3错误提示红色 notification.open({ @@ -441,28 +427,6 @@ class LoginDialog extends Component { }, }); } - openqqlogin = () => { - this.setState({ - qqlogin: true - }) - window.location.href = `https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginqq&state=null,${window.location.host}&response_type=code` - } - - openphoneqqlogin = () => { - window.open( - `https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=https%3a%2f%2fwww.educoder.net%2fotherloginqq&state=null,${window.location.host}&response_type=code` - ) - } - - getTContainer = () => { - return document.body; - } - hideweixinlogin = () => { - this.setState({ - weixinlogin: false, - qqlogin: false - }) - } render() { @@ -487,7 +451,7 @@ class LoginDialog extends Component { { ` #DialogID .dialogBox { - width: 405px !important; + width: 445px !important; } .dialogBox { height: 290px !important; @@ -575,25 +539,7 @@ class LoginDialog extends Component { 注册

    - { - settings && settings.third_party_new && settings.third_party_new.length > 0 ? -

    - ———————— 快速登录 ———————— -

    - {settings.third_party_new.map((item,key)=>{ - return( - - - {`${item.name}登录`} - - - ) - }) - } -
    -

    - :"" - } +
    diff --git a/src/modules/login/OpenI.svg b/src/modules/login/OpenI.svg new file mode 100644 index 000000000..3648efb6e --- /dev/null +++ b/src/modules/login/OpenI.svg @@ -0,0 +1,34 @@ + + + + + + Created with Pixso. + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/login/default.png b/src/modules/login/default.png new file mode 100644 index 000000000..8b8d940ed Binary files /dev/null and b/src/modules/login/default.png differ diff --git a/src/modules/loginRegister/LoginRegisterPage.scss b/src/modules/loginRegister/LoginRegisterPage.scss index 7f7720807..7a1c788f1 100644 --- a/src/modules/loginRegister/LoginRegisterPage.scss +++ b/src/modules/loginRegister/LoginRegisterPage.scss @@ -226,7 +226,32 @@ border-bottom: 2px solid; } } - +.dfpanel{ + height: 50px; + display: flex; + align-items: center; + justify-content: center; + img{ + border-radius: 50%; + } +} +.thirdPanel{ + display: flex; + align-items: center; + justify-content: center; + flex-wrap: wrap; + min-width: 160px; + max-width:230px; + a{ + margin:5px 12px; + img{ + border-radius: 50%; + } + } +} +.moreIcon,.theTop{ + z-index: 11111!important; +} /*当页面宽度大于1000px*/ @media screen and (min-width:1000px) { .right_cont{width: 540px; } diff --git a/src/modules/loginRegister/component/otherLogin.jsx b/src/modules/loginRegister/component/otherLogin.jsx index 04ebf32e6..bd5f80817 100644 --- a/src/modules/loginRegister/component/otherLogin.jsx +++ b/src/modules/loginRegister/component/otherLogin.jsx @@ -1,10 +1,14 @@ import React,{useState ,useEffect} from 'react'; -import { Divider, Tooltip } from 'antd'; +import { Divider, Tooltip , Popover } from 'antd'; import educoderLogo from '../../login/educoder.png'; import qqlogo from '../../login/qq@2x.png'; import WeChatlogo from '../../login/WeChat@2x.png'; import giteelogo from '../../login/gitee.png'; import githublogo from '../../login/github.png'; +import CCFlogo from '../../login/CCF.png'; +import OpenI from '../../login/OpenI.svg'; +import defaultlog from '../../login/default.png'; +import "../LoginRegisterPage.scss" function OtherLogin(){ const [setting, setSetting] = useState(undefined); @@ -14,22 +18,61 @@ function OtherLogin(){ setSetting(JSON.parse(localStorage.getItem("chromesetting"))); },[]) + function renderLogo(name){ + if(!name) return; + switch(name.toLowerCase()){ + case 'educoder': + return educoderLogo; + case 'qq': + return qqlogo; + case 'wechat': + return WeChatlogo; + case 'gitee': + return giteelogo; + case 'github': + return githublogo; + case 'ccf': + return CCFlogo; + case 'openi': + return OpenI; + default: + return defaultlog; + } + } return( setting && setting.third_party_new && setting.third_party_new.length > 0 ?
    快速登录 - {setting.third_party_new.map((item,key)=>{ - return( - - - {`${item.name}登录`}/ - - - ) - }) - } +
    + {setting.third_party_new.map((item,key)=>{ + return( + key < 4 && + + {`${item.name}登录`}/ + + + ) + }) + } + { + setting.third_party_new.length > 4 && + + { + setting.third_party_new.map((i,k)=>{ + return k>=4 && + + + + + }) + } +
    } trigger="hover" overlayClassName='theTop' getPopupContainer={trigger=>trigger.parentNode}> + + + } +
    :"" )