@@ -2,6 +2,8 @@ import LangSwitch from '../components/LangSwitch';
2
2
import SideToc from '../components/SideToc' ;
3
3
import Link from 'next/link' ;
4
4
import { getDict } from '../lib/i18n' ;
5
+ import { withBase } from '../lib/paths' ;
6
+ import Image from 'next/image' ;
5
7
6
8
export default function HomePageEN ( ) {
7
9
const t = getDict ( 'en' ) ;
@@ -13,9 +15,10 @@ export default function HomePageEN() {
13
15
< div style = { { display : 'flex' , gap : '16px' , alignItems : 'center' } } >
14
16
< nav className = "nav" >
15
17
< a href = "#home" > { t . nav . home } </ a >
16
- < Link href = "/en/publication" > { t . nav . publications } </ Link >
17
18
< a href = "#research" > { t . nav . research } </ a >
18
- < a href = "#courses" > { t . nav . courses } </ a >
19
+ < Link href = "/en/publication" > { t . nav . publications } </ Link >
20
+ < a href = "#students" > { t . nav . students } </ a >
21
+ < a href = "#contact" > { t . nav . contact } </ a >
19
22
</ nav >
20
23
< LangSwitch />
21
24
</ div >
@@ -41,7 +44,7 @@ export default function HomePageEN() {
41
44
< h2 className = "section-title" > { t . about . title } </ h2 >
42
45
< div className = "about-grid" >
43
46
< div className = "about-photo" >
44
- < img src = "/wang_hao.jpeg" alt = "Hao WANG" />
47
+ < Image src = "/wang_hao.jpeg" alt = "Hao WANG" width = { 300 } height = { 300 } style = { { width : '100%' , height : 'auto' } } />
45
48
</ div >
46
49
< div >
47
50
{ t . profile && t . profile . name && Array . isArray ( t . profile . lines ) && (
@@ -150,7 +153,7 @@ export default function HomePageEN() {
150
153
{ r . map ( ( cell : any , cidx : number ) => (
151
154
< td key = { cidx } >
152
155
{ cell && typeof cell === 'object' && 'href' in cell ? (
153
- < a href = { cell . href } target = "_blank" rel = "noopener noreferrer" > { cell . text } </ a >
156
+ < a href = { withBase ( cell . href ) } target = "_blank" rel = "noopener noreferrer" > { cell . text } </ a >
154
157
) : (
155
158
cell
156
159
) }
@@ -181,8 +184,8 @@ export default function HomePageEN() {
181
184
182
185
< SideToc items = { [
183
186
{ id : 'home' , label : t . nav . home } ,
184
- { id : 'courses' , label : t . nav . courses } ,
185
187
{ id : 'research' , label : t . nav . research } ,
188
+ { id : 'courses' , label : t . nav . courses } ,
186
189
{ id : 'expectations' , label : t . nav . expectations } ,
187
190
{ id : 'insights' , label : t . nav . insights } ,
188
191
{ id : 'students' , label : t . nav . students } ,
0 commit comments