@@ -15,17 +15,18 @@ const useBannerEvents = (
1515 const urlKey = prefix ? `${ prefix } .${ linkKey } ` : linkKey ;
1616 const url = t ( urlKey ) ;
1717 const textList = validTextKeys . map ( ( k ) => t ( k ) ) ;
18- const logo = (
19- < Box
20- component = "img"
21- alt = "TiDB"
22- src = { require ( "media/logo/tidb-logo.svg" ) ?. default }
23- sx = { {
24- width : "1.25rem" ,
25- height : "1.25rem" ,
26- } }
27- />
28- ) ;
18+ const logo = "🚀" ;
19+ // const logo = (
20+ // <Box
21+ // component="img"
22+ // alt="TiDB"
23+ // src={require("media/logo/tidb-logo.svg")?.default}
24+ // sx={{
25+ // width: "1.25rem",
26+ // height: "1.25rem",
27+ // }}
28+ // />
29+ // );
2930 const bgImgSrc =
3031 "https://static.pingcap.com/files/2023/11/15190759/20231116-105219.png" ;
3132
@@ -38,22 +39,25 @@ const useBannerEvents = (
3839} ;
3940
4041export function Banner ( ) {
41- const { bgImgSrc, url, logo, textList } = useBannerEvents (
42- [ "title" , "date" , "intro" ] ,
42+ const { url, logo, textList } = useBannerEvents (
43+ // ["title", "date", "intro"],
44+ [ "title" ] ,
4345 "link" ,
44- "banner.docDash2024 "
46+ "banner"
4547 ) ;
4648
4749 return (
4850 < Box
4951 sx = { {
5052 flexShrink : 0 ,
51- height : "2rem " ,
52- backgroundColor : "#15005B " ,
53- backgroundImage : `url(${ bgImgSrc } )` ,
53+ minHeight : "1.5rem " ,
54+ backgroundColor : "var(--tiui-palette-peacock-100) " ,
55+ // backgroundImage: `url(${bgImgSrc})`,
5456 backgroundPosition : "bottom left" ,
5557 backgroundSize : "400px auto" ,
5658 backgroundRepeat : "no-repeat" ,
59+ paddingTop : "0.5rem" ,
60+ paddingBottom : "0.5rem" ,
5761 } }
5862 >
5963 < Stack
@@ -84,19 +88,22 @@ export function Banner() {
8488 }
8589 sx = { ( theme ) => ( {
8690 textDecoration : "none" ,
87- color : "website.m1 " ,
91+ color : "text.primary " ,
8892 height : "100%" ,
8993 px : 2 ,
9094 [ theme . breakpoints . down ( "md" ) ] : {
9195 px : 1 ,
9296 } ,
97+ ":hover span" : {
98+ textDecoration : "underline" ,
99+ } ,
93100 } ) }
94101 >
95102 { textList . map ( ( text , index ) => (
96103 < Fragment key = { index } >
97104 { ! index ? (
98- < Stack direction = "row" alignItems = "center" spacing = { 2 } >
99- { logo }
105+ < Stack direction = "row" alignItems = "center" spacing = { 1 } >
106+ < Box > { logo } </ Box >
100107 < Typography component = "span" variant = "body2" color = "inherit" >
101108 { text }
102109 </ Typography >
0 commit comments