[docs,refactor][xs]: move to 2 space indenting in jsx components.
This commit is contained in:
parent
fe13333e5c
commit
cbab921e87
@ -1,16 +1,16 @@
|
|||||||
import styles from '../../styles/Home.module.css'
|
import styles from '../../styles/Home.module.css'
|
||||||
|
|
||||||
export default function Footer() {
|
export default function Footer() {
|
||||||
return (
|
return (
|
||||||
<footer className={styles.footer}>
|
<footer className={styles.footer}>
|
||||||
<a
|
<a
|
||||||
href="https://www.datopian.com/"
|
href="https://www.datopian.com/"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
>
|
>
|
||||||
Built by{' '}
|
Built by{' '}
|
||||||
<img src="/datopian-logo.png" alt="Datopian Logo" className={styles.logo} />
|
<img src="/datopian-logo.png" alt="Datopian Logo" className={styles.logo} />
|
||||||
</a>
|
</a>
|
||||||
</footer>
|
</footer>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,47 +2,47 @@ import { useState } from 'react'
|
|||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
|
|
||||||
export default function Nav() {
|
export default function Nav() {
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
const handleClick = (event) => {
|
const handleClick = (event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
setOpen(!open);
|
setOpen(!open);
|
||||||
};
|
};
|
||||||
|
|
||||||
const navMenu = [{ title: 'Home', path: '/' },
|
const navMenu = [{ title: 'Home', path: '/' },
|
||||||
{ title: 'Gallery', path: '/gallery' },
|
{ title: 'Gallery', path: '/gallery' },
|
||||||
{ title: 'Docs', path: '/docs' },
|
{ title: 'Docs', path: '/docs' },
|
||||||
{ title: 'Learn', path: '/learn' },
|
{ title: 'Learn', path: '/learn' },
|
||||||
{ title: 'Github', path: 'https://github.com/datopian/portal.js' }]
|
{ title: 'Github', path: 'https://github.com/datopian/portal.js' }]
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<nav className="flex items-center justify-between flex-wrap bg-white p-4 border-b border-gray-200">
|
<nav className="flex items-center justify-between flex-wrap bg-white p-4 border-b border-gray-200">
|
||||||
<div className="flex items-center flex-shrink-0 text-gray-700 mr-6">
|
<div className="flex items-center flex-shrink-0 text-gray-700 mr-6">
|
||||||
<img src="/logo.svg" alt="portal logo" width="110" />
|
<img src="/logo.svg" alt="portal logo" width="110" />
|
||||||
</div>
|
</div>
|
||||||
<div className="block lg:hidden mx-4">
|
<div className="block lg:hidden mx-4">
|
||||||
<button
|
<button
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
className="flex items-center px-3 py-2 border rounded text-gray-700 border-orange-400 hover:text-black hover:border-black"
|
className="flex items-center px-3 py-2 border rounded text-gray-700 border-orange-400 hover:text-black hover:border-black"
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
className="fill-current h-3 w-3"
|
className="fill-current h-3 w-3"
|
||||||
viewBox="0 0 20 20"
|
viewBox="0 0 20 20"
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
>
|
>
|
||||||
<title>Menu</title>
|
<title>Menu</title>
|
||||||
<path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z" />
|
<path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z" />
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div className={`${open ? `block` : `hidden`} lg:block`}>
|
<div className={`${open ? `block` : `hidden`} lg:block`}>
|
||||||
{navMenu.map((menu, index) => {
|
{navMenu.map((menu, index) => {
|
||||||
return (<Link href={menu.path} key={index}>
|
return (<Link href={menu.path} key={index}>
|
||||||
<a className="block mt-4 lg:inline-block lg:mt-0 active:bg-primary-background text-gray-700 hover:text-black mr-6">
|
<a className="block mt-4 lg:inline-block lg:mt-0 active:bg-primary-background text-gray-700 hover:text-black mr-6">
|
||||||
{menu.title}
|
{menu.title}
|
||||||
</a>
|
</a>
|
||||||
</Link>)
|
</Link>)
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user