@@ -28,50 +28,52 @@ export default function Header() {
2828 }
2929
3030 return (
31- < header className = "flex h-16 w-full items-center bg-tBlue" >
32- < Link href = { me ? "/community" : "/" } passHref className = "px-4" >
33- < AppIcon width = { 36 } height = { 36 } />
34- </ Link >
35- < Link href = { me ? "/community" : "/" } className = "hidden cursor-pointer px-4 text-2xl text-white sm:block" >
36- UT-Bridge
37- </ Link >
38- { pathname === "/login" || pathname === "/registration" || pathname === "" ? (
39- < >
40- < p className = "absolute right-1/2 translate-x-1/2 font-bold text-white text-xl sm:hidden" > { title } </ p >
41- </ >
42- ) : (
43- < >
44- < Link
45- className = { `hidden h-full cursor-pointer content-center px-4 text-white text-xl transition-colors duration-200 sm:block ${
46- pathname === "/community" ? "bg-focus" : "hover:bg-focus"
47- } `}
48- href = "/community"
49- >
50- { t ( "community.title" ) }
51- </ Link >
52- < Link
53- className = { `hidden h-full cursor-pointer content-center px-4 text-white text-xl transition-colors duration-200 sm:block ${
54- pathname === "/chat" ? "bg-focus" : "hover:bg-focus"
55- } `}
56- href = "/chat"
57- >
58- { t ( "chat.title" ) }
59- </ Link >
60- < Link
61- className = { `hidden h-full cursor-pointer content-center px-4 text-white text-xl transition-colors duration-200 sm:block ${
62- pathname . startsWith ( "/settings" ) ? "bg-focus" : "hover:bg-focus"
63- } `}
64- href = "/settings"
65- >
66- { t ( "settings.title" ) }
67- </ Link >
68- < p className = "absolute right-1/2 translate-x-1/2 font-bold text-white text-xl sm:hidden" > { title } </ p >
69- < Link href = "/settings/basic" className = "absolute right-4 flex cursor-pointer items-center gap-4" >
70- < Avatar size = { 40 } src = { me ?. imageUrl } />
71- { me ?. name && < p className = "hidden text-white text-xl sm:block" > { me . name } </ p > }
72- </ Link >
73- </ >
74- ) }
31+ < header className = "sticky top-0 z-10 h-16 w-full bg-tBlue" >
32+ < div className = "flex h-16 items-center" >
33+ < Link href = { me ? "/community" : "/" } passHref className = "px-4" >
34+ < AppIcon width = { 36 } height = { 36 } />
35+ </ Link >
36+ < Link href = { me ? "/community" : "/" } className = "hidden cursor-pointer px-4 text-2xl text-white sm:block" >
37+ UT-Bridge
38+ </ Link >
39+ { pathname === "/login" || pathname === "/registration" || pathname === "" ? (
40+ < >
41+ < p className = "absolute right-1/2 translate-x-1/2 font-bold text-white text-xl sm:hidden" > { title } </ p >
42+ </ >
43+ ) : (
44+ < >
45+ < Link
46+ className = { `hidden h-full cursor-pointer content-center px-4 text-white text-xl transition-colors duration-200 sm:block ${
47+ pathname === "/community" ? "bg-focus" : "hover:bg-focus"
48+ } `}
49+ href = "/community"
50+ >
51+ { t ( "community.title" ) }
52+ </ Link >
53+ < Link
54+ className = { `hidden h-full cursor-pointer content-center px-4 text-white text-xl transition-colors duration-200 sm:block ${
55+ pathname === "/chat" ? "bg-focus" : "hover:bg-focus"
56+ } `}
57+ href = "/chat"
58+ >
59+ { t ( "chat.title" ) }
60+ </ Link >
61+ < Link
62+ className = { `hidden h-full cursor-pointer content-center px-4 text-white text-xl transition-colors duration-200 sm:block ${
63+ pathname . startsWith ( "/settings" ) ? "bg-focus" : "hover:bg-focus"
64+ } `}
65+ href = "/settings"
66+ >
67+ { t ( "settings.title" ) }
68+ </ Link >
69+ < p className = "absolute right-1/2 translate-x-1/2 font-bold text-white text-xl sm:hidden" > { title } </ p >
70+ < Link href = "/settings/basic" className = "absolute right-4 flex cursor-pointer items-center gap-4" >
71+ < Avatar size = { 40 } src = { me ?. imageUrl } />
72+ { me ?. name && < p className = "hidden text-white text-xl sm:block" > { me . name } </ p > }
73+ </ Link >
74+ </ >
75+ ) }
76+ </ div >
7577 </ header >
7678 ) ;
7779}
0 commit comments