[Home][m] Add portaljs home page with links to subpages
This commit is contained in:
parent
1e2a76571e
commit
c4375a6d70
0
docs/components/Footer/index.jsx
Normal file
0
docs/components/Footer/index.jsx
Normal file
112
docs/components/Nav/index.jsx
Normal file
112
docs/components/Nav/index.jsx
Normal file
@ -0,0 +1,112 @@
|
||||
import { useState } from 'react'
|
||||
import Head from 'next/head'
|
||||
import Link from 'next/link'
|
||||
import styles from '../styles/Home.module.css'
|
||||
|
||||
export default function Home() {
|
||||
const [open, setOpen] = useState(false);
|
||||
const handleClick = (event) => {
|
||||
event.preventDefault();
|
||||
setOpen(!open);
|
||||
};
|
||||
|
||||
const navMenu = [{ title: 'Home', path: '/' },
|
||||
{ title: 'Gallery', path: '/gallery' },
|
||||
{ title: 'Docs', path: '/docs' },
|
||||
{ title: 'Learn', path: '/learn' },
|
||||
{ title: 'Github', path: 'https://github.com/datopian/portal.js' }]
|
||||
|
||||
return (
|
||||
<>
|
||||
<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">
|
||||
<img src="/logo.svg" alt="portal logo" width="110" />
|
||||
</div>
|
||||
<div className="block lg:hidden mx-4">
|
||||
<button
|
||||
onClick={handleClick}
|
||||
className="flex items-center px-3 py-2 border rounded text-gray-700 border-orange-400 hover:text-black hover:border-black"
|
||||
>
|
||||
<svg
|
||||
className="fill-current h-3 w-3"
|
||||
viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<title>Menu</title>
|
||||
<path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<div className={`${open ? `block` : `hidden`} lg:block`}>
|
||||
{navMenu.map((menu, 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">
|
||||
{menu.title}
|
||||
</a>
|
||||
</Link>)
|
||||
})}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div className={styles.container}>
|
||||
<Head>
|
||||
<title>Create Portal App</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
|
||||
|
||||
<main className={styles.main}>
|
||||
|
||||
<h1 className={styles.title}>
|
||||
Welcome to <a href="https://github.com/datopian/portal.js">Portal.js!</a>
|
||||
</h1>
|
||||
|
||||
<p className={styles.description}>
|
||||
Rapidly build rich data portals using a modern frontend framework!
|
||||
</p>
|
||||
|
||||
<div className={styles.grid}>
|
||||
<a href="/docs" className={styles.card}>
|
||||
<h3>Documentation →</h3>
|
||||
<p>Find in-depth information about Portal.js features and API.</p>
|
||||
</a>
|
||||
|
||||
<a href="/learn" className={styles.card}>
|
||||
<h3>Learn →</h3>
|
||||
<p>Learn about Portal.js with examples!</p>
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="/gallery"
|
||||
className={styles.card}
|
||||
>
|
||||
<h3>Gallery →</h3>
|
||||
<p>Discover examples of Portal.js projects.</p>
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="https://github.com/datopian/portal.js"
|
||||
className={styles.card}
|
||||
>
|
||||
<h3>Contribute →</h3>
|
||||
<p>
|
||||
Checkout the Portal.js repository on github
|
||||
</p>
|
||||
</a>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer className={styles.footer}>
|
||||
<a
|
||||
href="https://www.datopian.com/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Built by{' '}
|
||||
<img src="/datopian-logo.png" alt="Datopian Logo" className={styles.logo} />
|
||||
</a>
|
||||
</footer>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
@ -8,16 +8,15 @@
|
||||
"start": "next start"
|
||||
},
|
||||
"dependencies": {
|
||||
"next": "10.2.0",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2",
|
||||
"frictionless.js": "^0.13.4",
|
||||
"remark": "^13.0.0",
|
||||
"remark-html": "^13.0.1",
|
||||
"tailwindcss": "^2.0.2",
|
||||
"@tailwindcss/typography": "^0.4.0",
|
||||
"autoprefixer": "^10.0.4",
|
||||
"postcss": "^8.2.10"
|
||||
|
||||
"frictionless.js": "^0.13.4",
|
||||
"next": "10.2.0",
|
||||
"postcss": "^8.2.10",
|
||||
"react": "17.0.2",
|
||||
"react-dom": "17.0.2",
|
||||
"remark": "^13.0.0",
|
||||
"remark-html": "^13.0.1",
|
||||
"tailwindcss": "^2.0.2"
|
||||
}
|
||||
}
|
||||
|
||||
0
docs/pages/docs.js
Normal file
0
docs/pages/docs.js
Normal file
0
docs/pages/gallery.js
Normal file
0
docs/pages/gallery.js
Normal file
@ -1,65 +1,112 @@
|
||||
import { useState } from 'react'
|
||||
import Head from 'next/head'
|
||||
import Link from 'next/link'
|
||||
import styles from '../styles/Home.module.css'
|
||||
|
||||
export default function Home() {
|
||||
const [open, setOpen] = useState(false);
|
||||
const handleClick = (event) => {
|
||||
event.preventDefault();
|
||||
setOpen(!open);
|
||||
};
|
||||
|
||||
const navMenu = [{ title: 'Home', path: '/' },
|
||||
{ title: 'Gallery', path: '/gallery' },
|
||||
{ title: 'Docs', path: '/docs' },
|
||||
{ title: 'Learn', path: '/learn' },
|
||||
{ title: 'Github', path: 'https://github.com/datopian/portal.js' }]
|
||||
|
||||
return (
|
||||
<div className={styles.container}>
|
||||
<Head>
|
||||
<title>Create Next App</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
|
||||
<main className={styles.main}>
|
||||
<h1 className={styles.title}>
|
||||
Welcome to <a href="https://nextjs.org">Next.js!</a>
|
||||
</h1>
|
||||
|
||||
<p className={styles.description}>
|
||||
Get started by editing{' '}
|
||||
<code className={styles.code}>pages/index.js</code>
|
||||
</p>
|
||||
|
||||
<div className={styles.grid}>
|
||||
<a href="https://nextjs.org/docs" className={styles.card}>
|
||||
<h3>Documentation →</h3>
|
||||
<p>Find in-depth information about Next.js features and API.</p>
|
||||
</a>
|
||||
|
||||
<a href="https://nextjs.org/learn" className={styles.card}>
|
||||
<h3>Learn →</h3>
|
||||
<p>Learn about Next.js in an interactive course with quizzes!</p>
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="https://github.com/vercel/next.js/tree/master/examples"
|
||||
className={styles.card}
|
||||
>
|
||||
<h3>Examples →</h3>
|
||||
<p>Discover and deploy boilerplate example Next.js projects.</p>
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
|
||||
className={styles.card}
|
||||
>
|
||||
<h3>Deploy →</h3>
|
||||
<p>
|
||||
Instantly deploy your Next.js site to a public URL with Vercel.
|
||||
</p>
|
||||
</a>
|
||||
<>
|
||||
<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">
|
||||
<img src="/logo.svg" alt="portal logo" width="110" />
|
||||
</div>
|
||||
</main>
|
||||
<div className="block lg:hidden mx-4">
|
||||
<button
|
||||
onClick={handleClick}
|
||||
className="flex items-center px-3 py-2 border rounded text-gray-700 border-orange-400 hover:text-black hover:border-black"
|
||||
>
|
||||
<svg
|
||||
className="fill-current h-3 w-3"
|
||||
viewBox="0 0 20 20"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
>
|
||||
<title>Menu</title>
|
||||
<path d="M0 3h20v2H0V3zm0 6h20v2H0V9zm0 6h20v2H0v-2z" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
<div className={`${open ? `block` : `hidden`} lg:block`}>
|
||||
{navMenu.map((menu, 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">
|
||||
{menu.title}
|
||||
</a>
|
||||
</Link>)
|
||||
})}
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<footer className={styles.footer}>
|
||||
<a
|
||||
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Powered by{' '}
|
||||
<img src="/vercel.svg" alt="Vercel Logo" className={styles.logo} />
|
||||
</a>
|
||||
</footer>
|
||||
</div>
|
||||
<div className={styles.container}>
|
||||
<Head>
|
||||
<title>Create Portal App</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
|
||||
|
||||
<main className={styles.main}>
|
||||
|
||||
<h1 className={styles.title}>
|
||||
Welcome to <a href="https://github.com/datopian/portal.js">Portal.js!</a>
|
||||
</h1>
|
||||
|
||||
<p className={styles.description}>
|
||||
Rapidly build rich data portals using a modern frontend framework!
|
||||
</p>
|
||||
|
||||
<div className={styles.grid}>
|
||||
<a href="/docs" className={styles.card}>
|
||||
<h3>Documentation →</h3>
|
||||
<p>Find in-depth information about Portal.js features and API.</p>
|
||||
</a>
|
||||
|
||||
<a href="/learn" className={styles.card}>
|
||||
<h3>Learn →</h3>
|
||||
<p>Learn about Portal.js with examples!</p>
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="/gallery"
|
||||
className={styles.card}
|
||||
>
|
||||
<h3>Gallery →</h3>
|
||||
<p>Discover examples of Portal.js projects.</p>
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="https://github.com/datopian/portal.js"
|
||||
className={styles.card}
|
||||
>
|
||||
<h3>Contribute →</h3>
|
||||
<p>
|
||||
Checkout the Portal.js repository on github
|
||||
</p>
|
||||
</a>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer className={styles.footer}>
|
||||
<a
|
||||
href="https://www.datopian.com/"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
Built by{' '}
|
||||
<img src="/datopian-logo.png" alt="Datopian Logo" className={styles.logo} />
|
||||
</a>
|
||||
</footer>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
0
docs/pages/learn.js
Normal file
0
docs/pages/learn.js
Normal file
BIN
docs/public/datopian-logo.png
Normal file
BIN
docs/public/datopian-logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
BIN
docs/public/home-banner.jpg
Normal file
BIN
docs/public/home-banner.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 156 KiB |
11
docs/public/logo.svg
Normal file
11
docs/public/logo.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 137 KiB |
@ -111,7 +111,7 @@
|
||||
}
|
||||
|
||||
.logo {
|
||||
height: 1em;
|
||||
height: 1.5em;
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
|
||||
9838
docs/yarn.lock
9838
docs/yarn.lock
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user