1
1
import Link from 'next/link' ;
2
2
import React from 'react' ;
3
3
4
+ import ExternalLink from './external-link' ;
4
5
const links = [
5
6
< Link href = "/#usage" > Usage</ Link > ,
6
7
< Link href = "/news" > News</ Link > ,
7
- < Link href = "https://highlightjs.readthedocs.io/" > Docs</ Link > ,
8
8
< Link href = "/demo/" > Demo</ Link > ,
9
9
< Link href = "/download/" > Download</ Link > ,
10
- < Link href = "https://github.com/highlightjs/highlight.js" > GitHub</ Link > ,
10
+ < ExternalLink href = "https://highlightjs.readthedocs.io/" > Docs</ ExternalLink > ,
11
+ < ExternalLink href = "https://github.com/highlightjs/highlight.js" >
12
+ GitHub
13
+ </ ExternalLink > ,
11
14
] ;
12
15
13
16
export const Navigation = ( ) => (
14
- < header className = "container py-12" >
15
- < nav className = "md:grid grid-cols-3 " >
16
- < div className = "col-span-1 text-center sm:text-left mb-4 md:mb-0" >
17
+ < header className = "container py-8 md:py- 12" >
18
+ < nav className = "md:flex items-center " >
19
+ < div className = "text-center sm:text-left mb-4 md:mb-0" >
17
20
< span className = "text-4xl font-bold" >
18
21
< Link
19
22
className = "no-underline hover:text-cyan-300 focus:text-cyan-300"
@@ -23,12 +26,12 @@ export const Navigation = () => (
23
26
</ Link >
24
27
</ span >
25
28
</ div >
26
- < div className = "col-span-2 flex " >
27
- < ul className = "m-auto pl-0 text-center sm:mr-0 sm:text-right " >
29
+ < div className = "ml-auto " >
30
+ < ul className = "flex flex-wrap gap-x-3 gap-y-1 justify-center pl-0 " >
28
31
{ links . map ( ( link , i ) => (
29
32
< li
30
33
key = { i }
31
- className = "inline-block text-xl font-bold ml-4 first:ml-0 "
34
+ className = "text-xl font-bold"
32
35
>
33
36
{ link }
34
37
</ li >
0 commit comments