File tree 12 files changed +43
-25
lines changed
12 files changed +43
-25
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ const ChanTitle: React.FC = () => {
17
17
18
18
const handleMouseEnter = useDebounce ( ( ) => {
19
19
setHoverState ( true ) ;
20
+ console . log ( 'ni' )
20
21
} , 200 ) ;
21
22
const handleMouseLeave = useDebounce ( ( ) => {
22
23
setHoverState ( false ) ;
@@ -44,13 +45,13 @@ const ChanTitle: React.FC = () => {
44
45
}
45
46
const timerId = setTimeout ( ( ) => {
46
47
setAniState ( true ) ;
47
- } , 300 ) ;
48
+ } , 500 ) ;
48
49
return ( ) => clearTimeout ( timerId ) ;
49
50
} , [ pathName ] ) ;
50
51
51
52
if ( ! isShow ) return null ;
52
53
return (
53
- < div id = "chan-title" className = "relative w-full h-28 border-solid border-2 " >
54
+ < div id = "chan-title" className = "relative w-full h-28 " >
54
55
< div className = "absolute flex top-8 left-1/2 text-4xl font-extrabold transform -translate-x-1/2" >
55
56
< span className = "relative bottom-4 hidden xs:block" >
56
57
{ aniState && (
@@ -64,6 +65,7 @@ const ChanTitle: React.FC = () => {
64
65
alt = ""
65
66
width = { 80 }
66
67
height = { 80 }
68
+ layout = "intrinsic"
67
69
> </ Image >
68
70
</ animated . div >
69
71
) }
Original file line number Diff line number Diff line change
1
+ import React from 'react' ;
2
+
3
+ const Search : React . FC = ( ) => {
4
+ return < input type = "search" className = "absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2" placeholder = "Search..." > </ input > ;
5
+ } ;
6
+
7
+ export default Search ;
Original file line number Diff line number Diff line change 1
1
.nav-bar {
2
- display : flex ;
3
- border : 1px solid red ;
2
+ display : flex ;
3
+ position : relative ;
4
+ border : 1px solid red ;
4
5
5
- & a {
6
- padding : 1rem ;
7
- }
8
- }
6
+ & a {
7
+ padding : 1rem ;
8
+ }
9
+ }
10
+
11
+ .chan-header {
12
+ margin-left : 0.5% ;
13
+ margin-right : 0.5% ;
14
+ border-radius : 12px ;
15
+ }
Original file line number Diff line number Diff line change 1
- 'use client'
1
+ 'use client' ;
2
2
3
3
import ChanLink from '@/components/Partial/ChanLink' ;
4
4
import styles from './headerBar.module.scss' ;
5
- import Info from './info' ;
5
+ import Info from './Info' ;
6
+ import Search from './Search' ;
6
7
7
8
const links = [
8
9
{ name : '主页' , href : '/' } ,
@@ -15,15 +16,8 @@ const HeaderBar: React.FC = () => {
15
16
return (
16
17
< header
17
18
id = "chan-header"
18
- className = "flex justify-center items-center sticky top-0 border-2 border-balck border-solid"
19
+ className = { ` ${ styles [ 'chan-header' ] } flex items-center sticky top-0 border-2 border-balck border-solid` }
19
20
>
20
- { /* <Image
21
- className="absolute -z-10 -left-4"
22
- src={'/title-png/site-logo.webp'}
23
- alt="SteinsGate"
24
- width={250}
25
- height={65}
26
- ></Image> */ }
27
21
< nav className = { styles [ 'nav-bar' ] } >
28
22
{ links . map ( ( link ) => {
29
23
return (
@@ -33,6 +27,7 @@ const HeaderBar: React.FC = () => {
33
27
) ;
34
28
} ) }
35
29
</ nav >
30
+ < Search > </ Search >
36
31
< Info > </ Info >
37
32
</ header >
38
33
) ;
Original file line number Diff line number Diff line change
1
+ import { Icon } from '@iconify/react/dist/iconify.js' ;
1
2
import React from 'react' ;
2
3
3
4
const Info : React . FC = ( ) => {
4
5
return (
5
6
< div
6
7
id = "header-info"
7
- className = "absolute right-0 flex justify-center border-2 gap-4 border-solid border-green "
8
+ className = "absolute right-4 flex justify-center items-center "
8
9
>
9
- < div className = "avator" > avator</ div >
10
- < div className = "config" > config</ div >
11
- < input type = "search" placeholder = "Search..." > </ input >
10
+ < div className = "avator w-10 h-10 m-4 flex justify-center items-center border-solid border-2 border-yellow-300 rounded-full" >
11
+ < button > 登录</ button >
12
+ </ div >
13
+ < div className = "config" >
14
+ < Icon icon = 'eos-icons:rotating-gear' width = { 30 } height = { 30 } > </ Icon >
15
+ </ div >
12
16
</ div >
13
17
) ;
14
18
} ;
Original file line number Diff line number Diff line change 26
26
text-size-adjust : 100% ; /* 禁止 iOS 上文本大小自动调整 */
27
27
text-size-adjust : 100% ; /* 禁止 IE 和 Edge 自动调整文本大小 */
28
28
-webkit-tap-highlight-color : rgb (0 0 0 / 0% ); /* 移除ios设备上的点击高亮效果 */
29
+
30
+ font-synthesis : style;
31
+ font-size : 16px ;
32
+ word-wrap : break-word;
29
33
}
30
34
31
35
Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ export default function RootLayout({
16
16
< meta name = "viewport" content = "width=device-width, initial-scale=1" />
17
17
</ head >
18
18
< body >
19
-
20
19
< div id = "chan-root" >
21
20
< ThemeProvider attribute = "class" defaultTheme = "system" >
22
21
< ChanTitle > </ ChanTitle >
Original file line number Diff line number Diff line change 1
- import { mongoDB } from '../../../ lib/mongoose' ;
2
- import redis from '../../../ lib/redis' ;
1
+ import { mongoDB } from '../../lib/mongoose' ;
2
+ import redis from '../../lib/redis' ;
3
3
export async function GET ( ) {
4
4
const key = 'my_key' ;
5
5
try {
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments