@@ -8,6 +8,7 @@ import { RiLineChartLine, RiBarChartLine } from 'react-icons/ri';
88import { AiOutlineSelect } from 'react-icons/ai' ;
99import { GoMirror } from 'react-icons/go' ;
1010import { useUserInfo } from '@modules/auth' ;
11+ import LinkX from '../LinkX' ;
1112
1213const MoreDropdown = ( ) => {
1314 const { t } = useTranslation ( ) ;
@@ -24,6 +25,10 @@ const MoreDropdown = () => {
2425 link : '/os-situation' ,
2526 linkText : t ( 'common:header.product_home' ) ,
2627 } ,
28+ {
29+ link : '/docs/docs/service-guide/open-source-insights/' ,
30+ linkText : t ( 'common:header.service_guide' ) ,
31+ } ,
2732 ] ,
2833 } ,
2934 {
@@ -35,6 +40,10 @@ const MoreDropdown = () => {
3540 link : '/os-selection' ,
3641 linkText : t ( 'common:header.product_home' ) ,
3742 } ,
43+ {
44+ link : '/docs/docs/service-guide/software-selection' ,
45+ linkText : t ( 'common:header.service_guide' ) ,
46+ } ,
3847 ] ,
3948 } ,
4049 {
@@ -43,6 +52,10 @@ const MoreDropdown = () => {
4352 description : t ( 'common:header.developer_influence_description' ) ,
4453 linkItems : [
4554 { link : '/' , linkText : t ( 'common:header.home_input_experience' ) } ,
55+ {
56+ link : '/docs/docs/service-guide/developer-persona' ,
57+ linkText : t ( 'common:header.service_guide' ) ,
58+ } ,
4659 ] ,
4760 } ,
4861 {
@@ -56,6 +69,10 @@ const MoreDropdown = () => {
5669 link : '/' ,
5770 linkText : t ( 'common:header.home_input_experience' ) ,
5871 } ,
72+ {
73+ link : '/docs/quick-start' ,
74+ linkText : t ( 'common:header.service_guide' ) ,
75+ } ,
5976 ] ,
6077 } ,
6178
@@ -78,6 +95,10 @@ const MoreDropdown = () => {
7895 linkText : t ( 'common:header.mirror_site_of_pku' ) ,
7996 target : '_blank' ,
8097 } ,
98+ {
99+ link : '/docs/docs/service-guide/research-data-hub' ,
100+ linkText : t ( 'common:header.service_guide' ) ,
101+ } ,
81102 ] ,
82103 } ,
83104 {
@@ -89,6 +110,10 @@ const MoreDropdown = () => {
89110 link : '/intelligent-analysis' ,
90111 linkText : t ( 'common:header.product_home' ) ,
91112 } ,
113+ {
114+ link : '/docs/docs/service-guide/open-source-ecology' ,
115+ linkText : t ( 'common:header.service_guide' ) ,
116+ } ,
92117 ] ,
93118 } ,
94119 // 只有 roleLevel >= 2 时才显示智能分析服务
@@ -111,13 +136,13 @@ const MoreDropdown = () => {
111136
112137 return (
113138 < div className = "group relative flex h-full items-center transition" >
114- < div className = "flex cursor-pointer items-center justify-center py-3 px-7 group-hover:bg-[#333333] xl:mx-1 2xl:px-4" >
139+ < div className = "flex cursor-pointer items-center justify-center px-7 py-3 group-hover:bg-[#333333] xl:mx-1 2xl:px-4" >
115140 < a className = { 'font-medium text-white' } >
116141 { t ( 'common:header.all_services' ) }
117142 </ a >
118143 < AiFillCaretDown color = "#fff" className = "ml-2" />
119144 </ div >
120- < div className = "z-dropdown invisible fixed top-[82px] left-0 max-h-[calc(100%-80px)] w-[100vw] bg-black/95 opacity-0 transition-all duration-300 ease-in-out group-hover:visible group-hover:opacity-100" >
145+ < div className = "z-dropdown invisible fixed left-0 top-[82px] max-h-[calc(100%-80px)] w-[100vw] bg-black/95 opacity-0 transition-all duration-300 ease-in-out group-hover:visible group-hover:opacity-100" >
121146 < div className = "mx-auto w-[1200px] pb-16 text-white md:w-full md:px-4 lg:w-full lg:px-10" >
122147 < div className = "mt-12 grid grid-cols-4 gap-8 md:grid-cols-1 md:gap-y-6 lg:grid-cols-3" >
123148 { services . map ( ( service , index ) => (
@@ -129,19 +154,23 @@ const MoreDropdown = () => {
129154 { service . title }
130155 </ Link >
131156 </ div >
132- < div className = "line-clamp-3 mb -3 text-xs text-[#c1c1c1]" >
157+ < div className = "mb-3 line-clamp -3 text-xs text-[#c1c1c1]" >
133158 { service . description }
134159 </ div >
135160 < div className = "flex flex-col gap-1 text-sm text-[#8ba5f9]" >
136- { service . linkItems . map ( ( linkItem ) => (
137- < Link
138- key = { linkItem . link }
139- href = { linkItem . link }
140- target = { linkItem . target }
141- >
142- < div > { linkItem . linkText } </ div >
143- </ Link >
144- ) ) }
161+ { service . linkItems . map ( ( linkItem ) => {
162+ const isDocLink = linkItem . link ?. includes ( '/docs/' ) ;
163+ const LinkComponent = isDocLink ? LinkX : Link ;
164+ return (
165+ < LinkComponent
166+ key = { linkItem . link }
167+ href = { linkItem . link }
168+ target = { linkItem . target }
169+ >
170+ < div > { linkItem . linkText } </ div >
171+ </ LinkComponent >
172+ ) ;
173+ } ) }
145174 </ div >
146175 </ div >
147176 </ div >
0 commit comments