diff --git a/config/webpack.config.dev.js b/config/webpack.config.dev.js index 9756df5bb..7ce52ad7f 100644 --- a/config/webpack.config.dev.js +++ b/config/webpack.config.dev.js @@ -236,10 +236,10 @@ module.exports = { loader: 'less-loader', // compiles Less to CSS options: { modifyVars: { - 'primary-color': '#466aff', + 'primary-color': '#2149d4', 'primary-color-hover': '#6684FE', 'primary-color-active': '#1A47FF', - 'link-color': '#466aff', + 'link-color': '#2149d4', }, javascriptEnabled: true, }, diff --git a/config/webpack.config.prod.js b/config/webpack.config.prod.js index 180379579..c5a1f1a3b 100644 --- a/config/webpack.config.prod.js +++ b/config/webpack.config.prod.js @@ -248,8 +248,8 @@ module.exports = { loader: 'less-loader', // compiles Less to CSS options: { modifyVars: { - 'primary-color': '#466aff', - 'link-color': '#466aff', + 'primary-color': '#2149d4', + 'link-color': '#2149d4', }, javascriptEnabled: true, }, diff --git a/config/webpack.server.js b/config/webpack.server.js index 1d1b99eba..274c682f2 100644 --- a/config/webpack.server.js +++ b/config/webpack.server.js @@ -194,8 +194,8 @@ const serverConfig = { loader: 'less-loader', // compiles Less to CSS options: { modifyVars: { - 'primary-color': '#466aff', - 'link-color': '#466aff', + 'primary-color': '#2149d4', + 'link-color': '#2149d4', }, javascriptEnabled: true, }, diff --git a/public/css/gitlink.min.css b/public/css/gitlink.min.css index 2be47ef39..166380ad6 100644 --- a/public/css/gitlink.min.css +++ b/public/css/gitlink.min.css @@ -16,6 +16,10 @@ font-family: "alibabaReg"; src: url("../fonts/ALIBABA-PUHUITI-REGULAR.TTF"); } +@font-face { + font-family: "ziyouwenyihei"; + src: url("../fonts/ziyouwenyihei.ttf"); +} .header { width: 100%; height: 51px; @@ -6333,4 +6337,8 @@ p { .cursor { cursor: pointer +} + +.opacity80{ + opacity: 0.8; } \ No newline at end of file diff --git a/public/css/iconfont.css b/public/css/iconfont.css index f877beb85..35355092b 100644 --- a/public/css/iconfont.css +++ b/public/css/iconfont.css @@ -1,8 +1,8 @@ @font-face { font-family: "iconfont"; /* Project id 2340181 */ - src: url('iconfont.woff2?t=1727340588188') format('woff2'), - url('iconfont.woff?t=1727340588188') format('woff'), - url('iconfont.ttf?t=1727340588188') format('truetype'); + src: url('iconfont.woff2?t=1762825432985') format('woff2'), + url('iconfont.woff?t=1762825432985') format('woff'), + url('iconfont.ttf?t=1762825432985') format('truetype'); } .iconfont { @@ -13,6 +13,270 @@ -moz-osx-font-smoothing: grayscale; } +.icon-wendangbangong-01:before { + content: "\e9bd"; +} + +.icon-wendangsousuo:before { + content: "\e9b7"; +} + +.icon-jieyakelu:before { + content: "\e9b0"; +} + +.icon-tuxingtuxiang1:before { + content: "\e9b6"; +} + +.icon-xiazaigongju:before { + content: "\e9bc"; +} + +.icon-shipinchuli:before { + content: "\e9b2"; +} + +.icon-liulanqi:before { + content: "\e9b8"; +} + +.icon-shejiaoliaotian:before { + content: "\e9b9"; +} + +.icon-shurufa:before { + content: "\e9ba"; +} + +.icon-quanbuleibie:before { + content: "\e9bb"; +} + +.icon-tuxingtuxiang:before { + content: "\e9af"; +} + +.icon-xitonggongju:before { + content: "\e9b1"; +} + +.icon-wendangbangong:before { + content: "\e9b3"; +} + +.icon-zhuomiankongzhi:before { + content: "\e9b4"; +} + +.icon-Npm:before { + content: "\e9ad"; +} + +.icon-Maven:before { + content: "\e9ac"; +} + +.icon-Python:before { + content: "\e9ae"; +} + +.icon-a-xiazai3:before { + content: "\e9ab"; +} + +.icon-xiala4:before { + content: "\e9a9"; +} + +.icon-tufaxingzhongdasuanlixuqiuyingjixiangying:before { + content: "\e9a0"; +} + +.icon-kuazhongxinxietongkeyanjisuanrenwutiaodu:before { + content: "\e9a1"; +} + +.icon-xingnengjizhunyupingce:before { + content: "\e9a8"; +} + +.icon-jiantou3:before { + content: "\e9a5"; +} + +.icon-jiantou21:before { + content: "\e9a6"; +} + +.icon-a-xiazai1:before { + content: "\e9a7"; +} + +.icon-binghangjisuankuangjia:before { + content: "\e9aa"; +} + +.icon-shouqi:before { + content: "\e99f"; +} + +.icon-zhankai1:before { + content: "\e9a2"; +} + +.icon-renwutiaoduguanli:before { + content: "\e9a3"; +} + +.icon-yigoushujuku:before { + content: "\e9a4"; +} + +.icon-shequissue:before { + content: "\e99c"; +} + +.icon-shequ-xuanzhong:before { + content: "\e99d"; +} + +.icon-shequ1:before { + content: "\e99e"; +} + +.icon-huanjingbianliang:before { + content: "\e99b"; +} + +.icon-liuliangkongzhi:before { + content: "\e991"; +} + +.icon-tingzhi:before { + content: "\e993"; +} + +.icon-qiangzhitingzhi:before { + content: "\e995"; +} + +.icon-zanting1:before { + content: "\e99a"; +} + +.icon-qidong1:before { + content: "\e996"; +} + +.icon-guanlianpeizhi:before { + content: "\e994"; +} + +.icon-shanchu9:before { + content: "\e997"; +} + +.icon-bianjipeizhi:before { + content: "\e998"; +} + +.icon-shilizhuce:before { + content: "\e999"; +} + +.icon-wangguanguanli:before { + content: "\e98d"; +} + +.icon-xiazaiYAML:before { + content: "\e98f"; +} + +.icon-huifu2:before { + content: "\e990"; +} + +.icon-zhongqi:before { + content: "\e992"; +} + +.icon-lianluzhuizong1:before { + content: "\e98e"; +} + +.icon-yincang3:before { + content: "\e986"; +} + +.icon-shoujihao:before { + content: "\e987"; +} + +.icon-xianshi1:before { + content: "\e988"; +} + +.icon-mima:before { + content: "\e989"; +} + +.icon-paixu:before { + content: "\e98a"; +} + +.icon-jiantou_xiangyou:before { + content: "\e98b"; +} + +.icon-a-fork1:before { + content: "\e98c"; +} + +.icon-dianzan1:before { + content: "\e983"; +} + +.icon-yonghuming:before { + content: "\e984"; +} + +.icon-youxiang2:before { + content: "\e985"; +} + +.icon-tongzhi1:before { + content: "\e981"; +} + +.icon-xinzeng:before { + content: "\e982"; +} + +.icon-a-fenzhi1:before { + content: "\e980"; +} + +.icon-yunxiazai:before { + content: "\e97b"; +} + +.icon-lunwen1:before { + content: "\e97c"; +} + +.icon-zhuanli2:before { + content: "\e97d"; +} + +.icon-jiantou2:before { + content: "\e97e"; +} + +.icon-jiantou-you-cuxiantiao:before { + content: "\e97f"; +} + .icon-gongxianquequan:before { content: "\e979"; } diff --git a/public/css/iconfont.js b/public/css/iconfont.js index 433c5d5f1..fff495748 100644 --- a/public/css/iconfont.js +++ b/public/css/iconfont.js @@ -1 +1 @@ -window._iconfont_svg_string_2340181='',(c=>{var a=(l=(l=document.getElementsByTagName("script"))[l.length-1]).getAttribute("data-injectcss"),l=l.getAttribute("data-disable-injectsvg");if(!l){var h,i,o,z,t,p=function(a,l){l.parentNode.insertBefore(a,l)};if(a&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}h=function(){var a,l=document.createElement("div");l.innerHTML=c._iconfont_svg_string_2340181,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(a=document.body).firstChild?p(l,a.firstChild):a.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),h()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(o=h,z=c.document,t=!1,m(),z.onreadystatechange=function(){"complete"==z.readyState&&(z.onreadystatechange=null,v())})}function v(){t||(t=!0,o())}function m(){try{z.documentElement.doScroll("left")}catch(a){return void setTimeout(m,50)}v()}})(window); \ No newline at end of file +window._iconfont_svg_string_2340181='',(c=>{var a=(l=(l=document.getElementsByTagName("script"))[l.length-1]).getAttribute("data-injectcss"),l=l.getAttribute("data-disable-injectsvg");if(!l){var h,i,o,z,t,p=function(a,l){l.parentNode.insertBefore(a,l)};if(a&&!c.__iconfont__svg__cssinject__){c.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}h=function(){var a,l=document.createElement("div");l.innerHTML=c._iconfont_svg_string_2340181,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(a=document.body).firstChild?p(l,a.firstChild):a.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(h,0):(i=function(){document.removeEventListener("DOMContentLoaded",i,!1),h()},document.addEventListener("DOMContentLoaded",i,!1)):document.attachEvent&&(o=h,z=c.document,t=!1,m(),z.onreadystatechange=function(){"complete"==z.readyState&&(z.onreadystatechange=null,v())})}function v(){t||(t=!0,o())}function m(){try{z.documentElement.doScroll("left")}catch(a){return void setTimeout(m,50)}v()}})(window); \ No newline at end of file diff --git a/public/css/iconfont.json b/public/css/iconfont.json index 4ebfc428b..cfe1eb79b 100644 --- a/public/css/iconfont.json +++ b/public/css/iconfont.json @@ -5,6 +5,468 @@ "css_prefix_text": "icon-", "description": "", "glyphs": [ + { + "icon_id": "46034062", + "name": "文档办公-01", + "font_class": "wendangbangong-01", + "unicode": "e9bd", + "unicode_decimal": 59837 + }, + { + "icon_id": "46033728", + "name": "文档搜索", + "font_class": "wendangsousuo", + "unicode": "e9b7", + "unicode_decimal": 59831 + }, + { + "icon_id": "46033639", + "name": "解压刻录", + "font_class": "jieyakelu", + "unicode": "e9b0", + "unicode_decimal": 59824 + }, + { + "icon_id": "46033573", + "name": "图形图像", + "font_class": "tuxingtuxiang1", + "unicode": "e9b6", + "unicode_decimal": 59830 + }, + { + "icon_id": "46033572", + "name": "下载工具", + "font_class": "xiazaigongju", + "unicode": "e9bc", + "unicode_decimal": 59836 + }, + { + "icon_id": "46033597", + "name": "视频处理", + "font_class": "shipinchuli", + "unicode": "e9b2", + "unicode_decimal": 59826 + }, + { + "icon_id": "46033165", + "name": "浏览器", + "font_class": "liulanqi", + "unicode": "e9b8", + "unicode_decimal": 59832 + }, + { + "icon_id": "46033154", + "name": "社交聊天", + "font_class": "shejiaoliaotian", + "unicode": "e9b9", + "unicode_decimal": 59833 + }, + { + "icon_id": "46033153", + "name": "输入法", + "font_class": "shurufa", + "unicode": "e9ba", + "unicode_decimal": 59834 + }, + { + "icon_id": "46032783", + "name": "全部类别", + "font_class": "quanbuleibie", + "unicode": "e9bb", + "unicode_decimal": 59835 + }, + { + "icon_id": "46032622", + "name": "图形图像", + "font_class": "tuxingtuxiang", + "unicode": "e9af", + "unicode_decimal": 59823 + }, + { + "icon_id": "46032621", + "name": "系统工具", + "font_class": "xitonggongju", + "unicode": "e9b1", + "unicode_decimal": 59825 + }, + { + "icon_id": "46032619", + "name": "文档办公", + "font_class": "wendangbangong", + "unicode": "e9b3", + "unicode_decimal": 59827 + }, + { + "icon_id": "46032616", + "name": "桌面控制", + "font_class": "zhuomiankongzhi", + "unicode": "e9b4", + "unicode_decimal": 59828 + }, + { + "icon_id": "46032217", + "name": "Npm", + "font_class": "Npm", + "unicode": "e9ad", + "unicode_decimal": 59821 + }, + { + "icon_id": "46032121", + "name": "Maven", + "font_class": "Maven", + "unicode": "e9ac", + "unicode_decimal": 59820 + }, + { + "icon_id": "46032118", + "name": "Python", + "font_class": "Python", + "unicode": "e9ae", + "unicode_decimal": 59822 + }, + { + "icon_id": "46031753", + "name": "下载 (3)", + "font_class": "a-xiazai3", + "unicode": "e9ab", + "unicode_decimal": 59819 + }, + { + "icon_id": "46031290", + "name": "下拉", + "font_class": "xiala4", + "unicode": "e9a9", + "unicode_decimal": 59817 + }, + { + "icon_id": "45509718", + "name": "突发性重大算力需求应急响应", + "font_class": "tufaxingzhongdasuanlixuqiuyingjixiangying", + "unicode": "e9a0", + "unicode_decimal": 59808 + }, + { + "icon_id": "45509716", + "name": "跨中心协同科研计算任务调度", + "font_class": "kuazhongxinxietongkeyanjisuanrenwutiaodu", + "unicode": "e9a1", + "unicode_decimal": 59809 + }, + { + "icon_id": "45509717", + "name": "性能基准与评测", + "font_class": "xingnengjizhunyupingce", + "unicode": "e9a8", + "unicode_decimal": 59816 + }, + { + "icon_id": "45509657", + "name": "箭头", + "font_class": "jiantou3", + "unicode": "e9a5", + "unicode_decimal": 59813 + }, + { + "icon_id": "45509658", + "name": "箭头2", + "font_class": "jiantou21", + "unicode": "e9a6", + "unicode_decimal": 59814 + }, + { + "icon_id": "45509659", + "name": "下载 (1)", + "font_class": "a-xiazai1", + "unicode": "e9a7", + "unicode_decimal": 59815 + }, + { + "icon_id": "45509654", + "name": "并行计算框架", + "font_class": "binghangjisuankuangjia", + "unicode": "e9aa", + "unicode_decimal": 59818 + }, + { + "icon_id": "45509663", + "name": "收起", + "font_class": "shouqi", + "unicode": "e99f", + "unicode_decimal": 59807 + }, + { + "icon_id": "45509660", + "name": "展开", + "font_class": "zhankai1", + "unicode": "e9a2", + "unicode_decimal": 59810 + }, + { + "icon_id": "45509661", + "name": "任务调度管理", + "font_class": "renwutiaoduguanli", + "unicode": "e9a3", + "unicode_decimal": 59811 + }, + { + "icon_id": "45509664", + "name": "异构数据库", + "font_class": "yigoushujuku", + "unicode": "e9a4", + "unicode_decimal": 59812 + }, + { + "icon_id": "45229517", + "name": "社区issue", + "font_class": "shequissue", + "unicode": "e99c", + "unicode_decimal": 59804 + }, + { + "icon_id": "45229516", + "name": "社区-选中", + "font_class": "shequ-xuanzhong", + "unicode": "e99d", + "unicode_decimal": 59805 + }, + { + "icon_id": "45229515", + "name": "社区", + "font_class": "shequ1", + "unicode": "e99e", + "unicode_decimal": 59806 + }, + { + "icon_id": "44951992", + "name": "环境变量", + "font_class": "huanjingbianliang", + "unicode": "e99b", + "unicode_decimal": 59803 + }, + { + "icon_id": "44779010", + "name": "流量控制", + "font_class": "liuliangkongzhi", + "unicode": "e991", + "unicode_decimal": 59793 + }, + { + "icon_id": "44779009", + "name": "停止", + "font_class": "tingzhi", + "unicode": "e993", + "unicode_decimal": 59795 + }, + { + "icon_id": "44779008", + "name": "强制停止", + "font_class": "qiangzhitingzhi", + "unicode": "e995", + "unicode_decimal": 59797 + }, + { + "icon_id": "44779007", + "name": "暂停", + "font_class": "zanting1", + "unicode": "e99a", + "unicode_decimal": 59802 + }, + { + "icon_id": "44778800", + "name": "启动", + "font_class": "qidong1", + "unicode": "e996", + "unicode_decimal": 59798 + }, + { + "icon_id": "44778675", + "name": "关联配置", + "font_class": "guanlianpeizhi", + "unicode": "e994", + "unicode_decimal": 59796 + }, + { + "icon_id": "44778677", + "name": "删除", + "font_class": "shanchu9", + "unicode": "e997", + "unicode_decimal": 59799 + }, + { + "icon_id": "44778671", + "name": "编辑配置", + "font_class": "bianjipeizhi", + "unicode": "e998", + "unicode_decimal": 59800 + }, + { + "icon_id": "44778674", + "name": "实例注册", + "font_class": "shilizhuce", + "unicode": "e999", + "unicode_decimal": 59801 + }, + { + "icon_id": "44778684", + "name": "网关管理", + "font_class": "wangguanguanli", + "unicode": "e98d", + "unicode_decimal": 59789 + }, + { + "icon_id": "44778683", + "name": "下载YAML", + "font_class": "xiazaiYAML", + "unicode": "e98f", + "unicode_decimal": 59791 + }, + { + "icon_id": "44778682", + "name": "恢复", + "font_class": "huifu2", + "unicode": "e990", + "unicode_decimal": 59792 + }, + { + "icon_id": "44778681", + "name": "重启", + "font_class": "zhongqi", + "unicode": "e992", + "unicode_decimal": 59794 + }, + { + "icon_id": "44778292", + "name": "链路追踪", + "font_class": "lianluzhuizong1", + "unicode": "e98e", + "unicode_decimal": 59790 + }, + { + "icon_id": "43884585", + "name": "隐藏", + "font_class": "yincang3", + "unicode": "e986", + "unicode_decimal": 59782 + }, + { + "icon_id": "43884586", + "name": "手机号", + "font_class": "shoujihao", + "unicode": "e987", + "unicode_decimal": 59783 + }, + { + "icon_id": "43884583", + "name": "显示", + "font_class": "xianshi1", + "unicode": "e988", + "unicode_decimal": 59784 + }, + { + "icon_id": "43884584", + "name": "密码", + "font_class": "mima", + "unicode": "e989", + "unicode_decimal": 59785 + }, + { + "icon_id": "43884582", + "name": "排序", + "font_class": "paixu", + "unicode": "e98a", + "unicode_decimal": 59786 + }, + { + "icon_id": "43884581", + "name": "箭头_向右", + "font_class": "jiantou_xiangyou", + "unicode": "e98b", + "unicode_decimal": 59787 + }, + { + "icon_id": "43884580", + "name": "fork (1)", + "font_class": "a-fork1", + "unicode": "e98c", + "unicode_decimal": 59788 + }, + { + "icon_id": "43884589", + "name": "点赞", + "font_class": "dianzan1", + "unicode": "e983", + "unicode_decimal": 59779 + }, + { + "icon_id": "43884587", + "name": "用户名", + "font_class": "yonghuming", + "unicode": "e984", + "unicode_decimal": 59780 + }, + { + "icon_id": "43884588", + "name": "邮箱", + "font_class": "youxiang2", + "unicode": "e985", + "unicode_decimal": 59781 + }, + { + "icon_id": "43788877", + "name": "通知", + "font_class": "tongzhi1", + "unicode": "e981", + "unicode_decimal": 59777 + }, + { + "icon_id": "43788876", + "name": "新增", + "font_class": "xinzeng", + "unicode": "e982", + "unicode_decimal": 59778 + }, + { + "icon_id": "39410543", + "name": "分支 (1)", + "font_class": "a-fenzhi1", + "unicode": "e980", + "unicode_decimal": 59776 + }, + { + "icon_id": "42234576", + "name": "云下载", + "font_class": "yunxiazai", + "unicode": "e97b", + "unicode_decimal": 59771 + }, + { + "icon_id": "42234575", + "name": "论文", + "font_class": "lunwen1", + "unicode": "e97c", + "unicode_decimal": 59772 + }, + { + "icon_id": "42234574", + "name": "专利", + "font_class": "zhuanli2", + "unicode": "e97d", + "unicode_decimal": 59773 + }, + { + "icon_id": "42234573", + "name": "箭头", + "font_class": "jiantou2", + "unicode": "e97e", + "unicode_decimal": 59774 + }, + { + "icon_id": "42234572", + "name": "箭头-右-粗线条", + "font_class": "jiantou-you-cuxiantiao", + "unicode": "e97f", + "unicode_decimal": 59775 + }, { "icon_id": "41876673", "name": "贡献确权", diff --git a/public/css/iconfont.ttf b/public/css/iconfont.ttf index 30b005296..0437f985f 100644 Binary files a/public/css/iconfont.ttf and b/public/css/iconfont.ttf differ diff --git a/public/css/iconfont.woff b/public/css/iconfont.woff index fad2a7bab..ac3ebbe98 100644 Binary files a/public/css/iconfont.woff and b/public/css/iconfont.woff differ diff --git a/public/css/iconfont.woff2 b/public/css/iconfont.woff2 index d8eab05f1..d02145ae9 100644 Binary files a/public/css/iconfont.woff2 and b/public/css/iconfont.woff2 differ diff --git a/public/fonts/ziyouwenyihei.ttf b/public/fonts/ziyouwenyihei.ttf new file mode 100644 index 000000000..5e392798f Binary files /dev/null and b/public/fonts/ziyouwenyihei.ttf differ diff --git a/src/App.js b/src/App.js index d8420072c..70f2bc561 100644 --- a/src/App.js +++ b/src/App.js @@ -109,7 +109,7 @@ const ProjectIndex = Loadable({ }); const Home = Loadable({ - loader: () => import('./forge/Main/projectHomeNew'), + loader: () => import('./forge/Main/projectHomeNew/v2'), loading: Loading, }) diff --git a/src/forge/Component/feedBack.jsx b/src/forge/Component/feedBack.jsx new file mode 100644 index 000000000..16f1f80c3 --- /dev/null +++ b/src/forge/Component/feedBack.jsx @@ -0,0 +1,129 @@ +import React, { useEffect, useState } from 'react'; +import { Button, Input, message, Modal, Popover , Tooltip } from 'antd'; +import './Component.scss'; +import axios from 'axios'; +import ShareModal from './SiderBarShareModal'; +import Handbook1 from '../Images/handbook1.png'; + +const $ = window.$; + +$(window).scroll(function () { + if ($(".gotop").length > 0) { + if ($(document).scrollTop() > 0) { + $(".-task-sidebar .gotop").show(); + $(".gotop").click(function () { + $("html,body").scrollTop(0); + }); + } + if ($(document).scrollTop() === 0) { + $(".-task-sidebar .gotop").hide(); + } + } +}); + +function SiderBar(props) { + const {location, history,user} = props; + const {search, pathname} = location; + const [ data , setData ] = useState([]); + const [ visible , setVisible ] = useState(false); + const [ login , setLogin ]= useState(false); + const [ feedBackModal, setFeedBackModal] = useState(false); + const [ feedBackValue, setFeedBackValue] = useState(undefined); + const [ failApply, setFailApply] = useState(undefined); + + useEffect(()=>{ + user && setLogin(user.login); + },[user]) + + useEffect(()=>{ + getFAQ(); + // getCurrentUser(); + //页面加载完成之后隐藏回到顶点 + $(".-task-sidebar .gotop").hide(); + // 意见反馈弹窗 + if(search && search.indexOf('feedback') !== -1 && search.indexOf('type=feedback') === -1){ + // 用户已经在issue中反馈,刷新页面不弹出意见反馈 + setFeedBackModal(true) + } + },[]) + + function getFAQ(){ + const url = `/faqs.json`; + axios.get(url).then(result=>{ + if(result && result.data){ + setData(result.data); + } + }).catch(error=>{}) + } + + + function content(list){ + return
+ +
+ } + + function shareContent(){ + return
+ +
+ } + + // 意见反馈按钮点击事件 + function feedBackClick(){ + if(login){ + setFeedBackModal(true); + }else{ + history.push(`/login?go_page=${pathname}?feedback`); + } + } + + function applyFeedBack(){ + if(feedBackValue){ + setFailApply(undefined); + setFeedBackModal(false); + setFeedBackValue(undefined); + axios.post(`/v1/${login}/feedbacks`,{content: feedBackValue}).then(res=>{ + if(res && res.data && !res.data.status){ + message.success('反馈成功'); + } + }) + }else{ + setFailApply('请填写您的反馈建议'); + } + } + + return ( +
+ + 需求反馈 + + {setFeedBackModal(false); history.push(pathname)}} + title={'需求反馈'} + footer={}> +
+ {setFeedBackValue(e.target.value); e.target.value && e.target.value.length && setFailApply(undefined);}}/> + {(feedBackValue && feedBackValue.length) || 0}/500 +
+ {failApply &&
{failApply}
} +
+
+ ) +} + +export default SiderBar; diff --git a/src/forge/Main/projectHomeNew/v2/img/banner.png b/src/forge/Main/projectHomeNew/v2/img/banner.png new file mode 100644 index 000000000..4a7af4164 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/banner.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/cate_bg.png b/src/forge/Main/projectHomeNew/v2/img/cate_bg.png new file mode 100644 index 000000000..32f23be40 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/cate_bg.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/count_bg.png b/src/forge/Main/projectHomeNew/v2/img/count_bg.png new file mode 100644 index 000000000..3694b5fc1 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/count_bg.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-all-1.png b/src/forge/Main/projectHomeNew/v2/img/icon-all-1.png new file mode 100644 index 000000000..95e56c3da Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-all-1.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-all.png b/src/forge/Main/projectHomeNew/v2/img/icon-all.png new file mode 100644 index 000000000..65ba325b2 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-all.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-browser-1.png b/src/forge/Main/projectHomeNew/v2/img/icon-browser-1.png new file mode 100644 index 000000000..0863fc4c1 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-browser-1.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-browser.png b/src/forge/Main/projectHomeNew/v2/img/icon-browser.png new file mode 100644 index 000000000..3f0cdb2ae Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-browser.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-chat-1.png b/src/forge/Main/projectHomeNew/v2/img/icon-chat-1.png new file mode 100644 index 000000000..14bf452a4 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-chat-1.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-chat.png b/src/forge/Main/projectHomeNew/v2/img/icon-chat.png new file mode 100644 index 000000000..e27cf68f9 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-chat.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-desktop-1.png b/src/forge/Main/projectHomeNew/v2/img/icon-desktop-1.png new file mode 100644 index 000000000..ee4948b1e Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-desktop-1.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-desktop.png b/src/forge/Main/projectHomeNew/v2/img/icon-desktop.png new file mode 100644 index 000000000..3517dea14 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-desktop.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-develop-1.png b/src/forge/Main/projectHomeNew/v2/img/icon-develop-1.png new file mode 100644 index 000000000..a4e5b56d3 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-develop-1.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-develop.png b/src/forge/Main/projectHomeNew/v2/img/icon-develop.png new file mode 100644 index 000000000..bd0e9d45c Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-develop.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-devops-1.png b/src/forge/Main/projectHomeNew/v2/img/icon-devops-1.png new file mode 100644 index 000000000..764aa5ad3 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-devops-1.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-devops.png b/src/forge/Main/projectHomeNew/v2/img/icon-devops.png new file mode 100644 index 000000000..d766ea66d Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-devops.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-download-1.png b/src/forge/Main/projectHomeNew/v2/img/icon-download-1.png new file mode 100644 index 000000000..8a2bfecac Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-download-1.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-download.png b/src/forge/Main/projectHomeNew/v2/img/icon-download.png new file mode 100644 index 000000000..fa1ca44c9 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-download.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-image-1.png b/src/forge/Main/projectHomeNew/v2/img/icon-image-1.png new file mode 100644 index 000000000..973a1ea47 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-image-1.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-image.png b/src/forge/Main/projectHomeNew/v2/img/icon-image.png new file mode 100644 index 000000000..067aab0fb Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-image.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-input-1.png b/src/forge/Main/projectHomeNew/v2/img/icon-input-1.png new file mode 100644 index 000000000..97cc501de Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-input-1.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-input.png b/src/forge/Main/projectHomeNew/v2/img/icon-input.png new file mode 100644 index 000000000..259ac5d62 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-input.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-maven-1.png b/src/forge/Main/projectHomeNew/v2/img/icon-maven-1.png new file mode 100644 index 000000000..c15f92c0b Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-maven-1.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-maven.png b/src/forge/Main/projectHomeNew/v2/img/icon-maven.png new file mode 100644 index 000000000..06512cfa0 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-maven.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-npm-1.png b/src/forge/Main/projectHomeNew/v2/img/icon-npm-1.png new file mode 100644 index 000000000..bccb9e1a4 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-npm-1.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-npm.png b/src/forge/Main/projectHomeNew/v2/img/icon-npm.png new file mode 100644 index 000000000..dd1f11ae9 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-npm.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-python-1.png b/src/forge/Main/projectHomeNew/v2/img/icon-python-1.png new file mode 100644 index 000000000..0503185e8 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-python-1.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-python.png b/src/forge/Main/projectHomeNew/v2/img/icon-python.png new file mode 100644 index 000000000..da87bbe17 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-python.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-server-1.png b/src/forge/Main/projectHomeNew/v2/img/icon-server-1.png new file mode 100644 index 000000000..947a0d749 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-server-1.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-server.png b/src/forge/Main/projectHomeNew/v2/img/icon-server.png new file mode 100644 index 000000000..0b5d7d9ac Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-server.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-system-1.png b/src/forge/Main/projectHomeNew/v2/img/icon-system-1.png new file mode 100644 index 000000000..f22763d50 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-system-1.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-system.png b/src/forge/Main/projectHomeNew/v2/img/icon-system.png new file mode 100644 index 000000000..438218424 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-system.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-tester-1.png b/src/forge/Main/projectHomeNew/v2/img/icon-tester-1.png new file mode 100644 index 000000000..68f8dd2e5 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-tester-1.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-tester.png b/src/forge/Main/projectHomeNew/v2/img/icon-tester.png new file mode 100644 index 000000000..9f43ae05d Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-tester.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-unzip-1.png b/src/forge/Main/projectHomeNew/v2/img/icon-unzip-1.png new file mode 100644 index 000000000..cae3c0a84 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-unzip-1.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-unzip.png b/src/forge/Main/projectHomeNew/v2/img/icon-unzip.png new file mode 100644 index 000000000..64bd99716 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-unzip.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-video-1.png b/src/forge/Main/projectHomeNew/v2/img/icon-video-1.png new file mode 100644 index 000000000..073ae8b7a Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-video-1.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-video.png b/src/forge/Main/projectHomeNew/v2/img/icon-video.png new file mode 100644 index 000000000..5860e8c69 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-video.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-word-1.png b/src/forge/Main/projectHomeNew/v2/img/icon-word-1.png new file mode 100644 index 000000000..3096a4179 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-word-1.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-word-search-1.png b/src/forge/Main/projectHomeNew/v2/img/icon-word-search-1.png new file mode 100644 index 000000000..91d5b4f52 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-word-search-1.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-word-search.png b/src/forge/Main/projectHomeNew/v2/img/icon-word-search.png new file mode 100644 index 000000000..c417e3c34 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-word-search.png differ diff --git a/src/forge/Main/projectHomeNew/v2/img/icon-word.png b/src/forge/Main/projectHomeNew/v2/img/icon-word.png new file mode 100644 index 000000000..a507312f6 Binary files /dev/null and b/src/forge/Main/projectHomeNew/v2/img/icon-word.png differ diff --git a/src/forge/Main/projectHomeNew/v2/index.jsx b/src/forge/Main/projectHomeNew/v2/index.jsx new file mode 100644 index 000000000..a3ca74c83 --- /dev/null +++ b/src/forge/Main/projectHomeNew/v2/index.jsx @@ -0,0 +1,259 @@ +import React, { useEffect, useState } from "react"; +import axios from "axios"; +import { Divider, Input, Pagination, Popover, Spin } from "antd"; +import { Link } from "react-router-dom"; +import Nodata from "../../../Nodata"; +import { getImageUrl } from "../../../../common/UrlTool"; +import { TPMIndexHOC } from "../../../../modules/tpm/TPMIndexHOC"; +import RenderHtml from "../../../../components/render-html"; +import FeedBack from "../../../../forge/Component/feedBack"; +import './index.scss'; +const { Search } = Input; +function ProjectHomePage(props) { + const [cateList, setCateList] = useState(undefined); + const [projectsList, setProjectsList] = useState(undefined); + const [search, setSearch] = useState(undefined); + const [cateID, setCateID] = useState(undefined); + const [isSpin, setIsSpin] = useState(true); + const [monthList, setMonthList] = useState(undefined); + const [total, setTotal] = useState(0); + const [page, setPage] = useState(1); + const [cateTopics, setCateTopics] = useState(undefined); + const [topicId, setTopicId] = useState(undefined); + const [topicDetail, setTopicDetail] = useState(undefined); + const [count, setCount] = useState({}); + const {countByGHM, countByOther} = count; + const topicsByCateId = cateTopics && cateTopics[cateID]; + // const topicsByCateId = cateTopics && cateTopics[cateID] || [ + // { + // "id": "1,2", + // "name": "Maven", + // "icon": "icon-maven", + // "intro": "配置使用本站maven仓库,首先请定位 **settings.xml** 文件,通常位于本地 Maven 安装目录的 **conf/settings.xml** 或用户目录下的 **m2/settings.xml**。\n\n然后,在`settings.xml`​文件中` `​ 标签中添加私有仓库地址:\n\n```xml\n\n \n xzgd-repo-mirror\n *\n http://172.16.6.110:8081/repository/maven-repo/\n \n\n```\n\n\n在`settings.xml`​文件中``​标签中添加以下内容:\n\n\n```xml\n \n \n xzgd-maven-mirror-profile\n \n \n xzgd-maven-mirror\n http://172.16.6.110:8081/repository/maven-repo/\n \n \n \n \n xzgd-maven-mirror\n http://172.16.6.110:8081/repository/maven-repo/ \n \n \n \n\n```\n\n在`settings.xml`​文件中``​标签中添加以下内容:\n\n```xml\n\n xzgd-maven-mirror-profile\n\n```\n" + // }, + // { + // "id": "2,4", + // "name": "Python", + // "icon": "icon-python", + // "intro": "**方法一**:通过命令配置\n\n运行以下命令:\n```xml\npip config set global.index-url https://mirrors.aliyun.com/pypi/simple\npip config set install.trusted-host mirrors.aliyun.com\n```\n\n**方法二**:手动修改配置文件\n\n根据操作系统不同,修改 pip 配置文件:\n\n**Windows** 在用户目录下创建或编辑 pip.ini 文件(路径如:C:\\Users\\<用户名>\\pip\\pip.ini),内容如下:\n```xml\n[global]\nindex-url = https://mirrors.aliyun.com/pypi/simple/\n[install]\ntrusted-host = mirrors.aliyun.com\n```\n\n**Linux/Mac** 编辑或创建 ~/.config/pip/pip.conf 文件,内容如下:\n```xml\n[global]\nindex-url = https://mirrors.aliyun.com/pypi/simple\n[install]\ntrusted-host = mirrors.aliyun.com\n```\n\n验证配置,运行以下命令检查是否成功:\n```xml\npip config list\n```" + // }, + // { + // "id": "4,5", + // "name": "Npm", + // "icon": "icon-npm", + // "intro": "通过使用npm config set registry命令切换npm的镜像源\n\n使用示例:\n可以在命令行工具中输入以下命令:\n```xml\nnpm config set registry https://registry.npm.taobao.org\n```\n\n切换镜像源后,可以通过以下命令验证是否切换成功:\n```xml\nnpm config get registry\n```\n\n如果输出结果显示镜像源已切换到淘宝的npm镜像源,则表示切换成功。" + // } + // ]; + + const topicsLength = topicsByCateId && topicsByCateId.length + const LIMIT = !topicsLength ? 30 : 25; + + useEffect(() => { + getCate(); + // getList(); + getCateTopic(); + document.title = '军用开源软件仓库'; + // 获取总数 + getInitCount(); + }, []) + + useEffect(() => { + setIsSpin(true); + getProject(); + }, [cateID, search, page, topicId]) + + function getInitCount() { + const obj = { + countByGHM: 0, + countByOther: 0 + } + axios.get(`/organizations/gh_mirrors/projects.json?page=1&limit=15&sort_by=updated_on&sort_direction=desc`).then(result => { + if (result && result.data) { + obj.countByGHM = result.data.total_count || 0 + } + return axios.get(`/projects.json?pinned=d&limit=1`) + }).then(result => { + if (result && result.data) { + obj.countByOther = result.data.total_count - obj.countByGHM + } + setCount(obj); + }).catch(error => { }) + } + + function getCateTopic() { + fetch('/cate_topic.json').then(r => r.json()).then(res => { + setCateTopics(res); + }); + } + + function getCate() { + const url = `/project_categories/pinned_index.json`; + axios.get(url).then(result => { + if (result && result.data) { + const { project_categories=[] } = result.data; + setCateList(project_categories); + project_categories[0] && setCateID(project_categories[0].id); + } + }).catch(error => { }) + } + + function getProject() { + const url = `/projects.json`; + let params = { + pinned: "d", + category_id: cateID, + limit: LIMIT, + search: search, + page: page, + topic_id: topicId, + sort_by: cateID ? undefined : "praises_count", + language_id: undefined + }; + if (cateID === 39 && topicId) { + // 三方组件,topicId要作为language_id参数进行查询,查询maven、python、npm的语言仓库列表 + params.language_id = topicId.split(",") + params.topic_id = undefined + } + cateID && axios.get(url, { params }).then(result => { + if (result && result.data) { + setTotal(result.data.total_count); + setProjectsList(result.data.projects); + setIsSpin(false); + } + }).catch(error => { }) + } + + function getList() { + // const url = `/project_rank.json`; + const url = `/projects/banner_recommend.json` + axios.get(url, { + // params: { + // time: 30, + // page: 1, + // limit: 16 + // } + }).then(result => { + if (result && result.data) { + setMonthList(result.data.projects); + } + }).catch(error => { }) + } + + return
+ {/* banner区域内容 */} +
+
+
+
+
军用开源软件仓库
+
汇聚全球顶尖开源力量,构建安全、协同、创新的软件生态,赋能军事数字化转型与智能化升级
+ +
+
+
+

{countByOther}

+ 软件包总数 +
+ +
+

{countByGHM}

+ 可信三方组件数 +
+
+
+
+
+
+ {/* 一级分类 */} +
+ 软件分类:  + + { setPage(1); setSearch(value); }} + className="mlat" + style={{ width: "320px", marginLeft: "auto" }} + allowClear + /> +
+ {/* 二级分类以及仓库列表(左右布局) */} +
+ {/* 二级分类,即标签列表 */} + {topicsByCateId && !!topicsByCateId.length &&
+
    +
  • { setPage(1); setTopicId(undefined) }}> + + 全部类别 +
  • + {topicsByCateId.map((item, index) => { + const uniqueKey = `${cateID}-${index}`; + const isActive = item.id === topicId; + const imageName = `${item.icon}${isActive ? '-1' : ''}.png`; + + return
  • { setPage(1); setTopicId(item.id); setTopicDetail(item) }}> + + {item.name} +
  • + })} +
+
} + {/* 项目列表 */} +
+ {/* 三方组件下的提示信息
*/} + {cateID === 39 && topicId && topicDetail && trigger.parentNode} + content={ +
+ +
+ } + trigger="click" + placement="bottomLeft" + overlayClassName="tipByCate_Popover" + > +
{`设置${topicDetail.name}包管理器仓库地址,`}查看更多
+
} + + {projectsList && !!projectsList.length ?
+ {projectsList.map(i => { + const url = i.author ? `/${i.author.login}/${i.identifier}${i.author.login === "gh_mirrors" ? "/about" : "/about"}` : `` + return
+ {i.author && i.author.login !== "gh_mirrors" && 下载} +
+ {i.lesson_url && } +
+
{i.name}
+ {/* 项目标签 */} + {i.topics &&
+ {/* {i.author && i.author.login === "gh_mirrors" && i.topics && !i.topics.length && 华中科技大学} */} + {i.topics.slice(0, 2).map(item => {item.name})} +
} +
+
+ {i.description &&
+ {i.description} +
} +
+ })} +
: } +
+ {cateID && { setPage(page) }} className='center mt30' />} +
+
+
+
+} + +export default TPMIndexHOC(ProjectHomePage) \ No newline at end of file diff --git a/src/forge/Main/projectHomeNew/v2/index.scss b/src/forge/Main/projectHomeNew/v2/index.scss new file mode 100644 index 000000000..ca81f4f86 --- /dev/null +++ b/src/forge/Main/projectHomeNew/v2/index.scss @@ -0,0 +1,325 @@ +.homepageMain { + width: 1600px; + margin: 0 auto; +} + +.homepage_box { + background-color: #f7f9ff; +} + +.banner-content { + margin: 0 auto; + width: 1920px; + height: 461px; + background-image: url("./img/banner.png"); + background-size: 100% 100%; + position: relative; + z-index: 1; + + .banner_main { + justify-content: space-between; + align-items: center; + padding-top: 80px; + } + + .banner-title-1 { + font-family: 'ziyouwenyihei'; + } + + .needApplyBut { + display: inline-block; + width: 140px; + height: 44px; + background-image: linear-gradient(136.87deg, #5eb4ff 0%, #2f49c0 48.54%, #2149d4 100%); + border-radius: 22px; + border: 2px solid #437ACF; + font-size: 16px; + text-align: center; + line-height: 40px; + color: white; + transition: all 0.3s ease; + + &:hover { + background-image: linear-gradient(314.14deg, #5eb4ff 0%, #2f49c0 48.54%, #2149d4 100%); + } + + &:active, + &:focus { + background-image: linear-gradient(314.14deg, #2149d4 0%, #2149d4 48.54%, #2149d4 100%); + } + } + + .project_count { + width: 343px; + height: 103px; + // background-image: url('./img/count_bg.png'); + // background-size: 100% 100%; + justify-content: space-evenly; + align-items: center; + + .ant-divider { + height: 33px; + background: none; + background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.59) 0%, rgba(43, 255, 241, 0.07) 100%); + } + + p { + font-size: 30px; + font-family: "YouSheBiaoTiHei"; + } + .center{ + min-width: 45%; + } + } +} + +.banner-wrapper { + position: relative; + width: 100%; + height: 461px; // 添加高度以确保伪元素能正确显示 + + &::before, + &::after { + content: ''; + position: absolute; + top: 0; + height: 100%; + width: 50%; + z-index: 0; + } + + &::before { + left: 0; + background-image: linear-gradient(180deg, #030E33 0%, #030F34 60%, #041741 80%, #071e4d 100%); + } + + &::after { + right: 0; + background-image: linear-gradient(180deg, #2B3B80 0%, #263269 25%, #192751 50%, #14254A 100%); + } +} + +.homepage_content { + position: relative; + top: -140px; + z-index: 3; +} + +.cate_list { + padding: 25px 30px 50px 30px; + // background-color: #29385D; + background-image: url("./img/cate_bg.png"); + background-size: 100% 100%; + + .cate_ul a { + background-color: #f4f6fa; + border-radius: 6px; + padding: 9px 11px; + margin: 0 8px; + color: #191919; + + &:hover { + color: #2149d4; + } + + &.active { + color: white; + background-color: #2149d4; + } + } +} + +.project_list_box { + min-height: 550px; + background-color: #ffffff; + border-radius: 10px; + position: relative; + top: -25px; + + .tipByCate { + padding: 10px 30px; + margin: 25px; + background-image: linear-gradient(121.96deg, #fff6e2 0%, #fff4eb 100%); + border-radius: 8px; + color: #301403; + font-size: 16px; + } + + pre.prettyprint { + margin-bottom: 16px !important; + } +} + +.left_cate2 { + width: 200px; + border-right: 1px solid rgba(76, 88, 118, 0.1); + padding-left: 35px; + padding-bottom: 35px; + + .topic_ul { + li { + font-size: 16px; + margin-top: 20px; + color: #42464e; + cursor: pointer; + + span { + position: relative; + padding-bottom: 5px; + display: inline-block; + + &::after { + content: ''; + position: absolute; + bottom: 0; + left: 0; + width: 0; + height: 1px; + background-color: #191919; + transition: width 0.3s ease-in-out; + } + } + + &:hover { + span { + &::after { + width: 100%; + } + } + } + } + + li.active { + span { + font-weight: 500; + color: #191919; + + &::after { + width: 100%; + background-color: #191919; + } + } + } + } +} + +.project_list_box .home_project_list { + margin: 25px; + flex-wrap: wrap; + gap: 15px; + &.sixItemBox{ + .home_project{ + flex: 0 0 calc(16.6% - 13px); + } + } + + .home_project { + padding: 30px 5px 20px 18px; + flex: 0 0 calc(20% - 13px); + background-color: #f7f9fd; + border-radius: 8px; + backdrop-filter: blur(10px); + display: flex; + flex-direction: column; + justify-content: space-between; + position: relative; + width: 0; + + .task-hide-2 { + word-break: break-all; + } + + .color-424 { + color: #42464e; + } + + .a-i-center { + align-items: center; + } + + .author_img { + width: 54px; + height: 54px; + margin-right: 15px; + border-radius: 6px; + } + + .download-icon { + width: 69px; + height: 30px; + position: absolute; + top: 0; + right: 0; + background-color: #ebf0fb; + border-radius: 0px 8px 0px 6px; + text-align: center; + line-height: 30px; + color:#2149d4; + } + + .hover-light.color-grey-6, + .hover-light.color-grey-6 a { + color: #666 !important; + } + + &:hover { + // border: 2px solid rgba(22, 93, 255, 1); + + .hover-light, .hover-light a { + color: #2149d4 !important; + } + } + + .proListTopics { + display: flex; + + .proListTopic { + background-color: #ffffff; + border-radius: 4px; + max-width: 158px; + padding: 0 10px; + height: 22px; + line-height: 22px; + color: #737a87; + margin-bottom: 5px !important; + } + } + } +} + +.tipByCate_Popover.ant-popover { + width: 96.5%; + + .ant-popover-arrow { + display: none; + } + + .ant-popover-content { + margin-top: -13px; + } +} + +.glass-effect { + background: rgba(0, 0, 0, 0); + backdrop-filter: blur(10px); + -webkit-backdrop-filter: blur(10px); + border-radius: 5px; + position: relative; + + &::before { + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + border-radius: 5px; + padding: 1px; + background: linear-gradient(180deg,#5871C8 0%,#4997DC 50%,#20469142 100%);; + -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); + mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); + -webkit-mask-composite: destination-out; + mask-composite: exclude; + pointer-events: none; + } +} \ No newline at end of file diff --git a/src/global.scss b/src/global.scss index 0ee7a6274..d13deda7b 100644 --- a/src/global.scss +++ b/src/global.scss @@ -1,5 +1,5 @@ -$primary-color: #466aff; +$primary-color: #2149d4; $primary-color-hover: #6684FE; $primary-color-active: #1A47FF; -$link-color: #466aff; +$link-color: #2149d4; $link-black-color: #05101a;