Merge branch 'main' of https://github.com/datopian/portal.js into add/doc-website
This commit is contained in:
commit
9808bfb938
16
README.md
16
README.md
@ -796,10 +796,22 @@ TODO
|
||||
|
||||
### view spec
|
||||
|
||||
___
|
||||
---
|
||||
|
||||
## Deploying portal build to github pages
|
||||
|
||||
* [Deploying single frictionless dataset to Github](./scripts/README.md)
|
||||
|
||||
## Showcases
|
||||
|
||||
### Single Dataset with Default Theme
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
# Appendix
|
||||
|
||||
## What happened to Recline?
|
||||
|
||||
Portal.JS used to be Recline(JS). If you are looking for the old Recline codebase it still exists: see the [`recline` branch](https://github.com/datopian/portal.js/tree/recline). If you want context for the rename see [this issue](https://github.com/datopian/portal.js/issues/520).
|
||||
Portal.JS used to be Recline(JS). If you are looking for the old Recline codebase it still exists: see the [`recline` branch](https://github.com/datopian/portal.js/tree/recline). If you want context for the rename see [this issue](https://github.com/datopian/portal.js/issues/520).
|
||||
|
||||
34
examples/default/.gitignore
vendored
Normal file
34
examples/default/.gitignore
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# next.js
|
||||
/.next/
|
||||
/out/
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
*.pem
|
||||
|
||||
# debug
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# local env files
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
23
examples/default/README.md
Normal file
23
examples/default/README.md
Normal file
@ -0,0 +1,23 @@
|
||||
# Next.js + Tailwind CSS Example
|
||||
|
||||
This example shows how to use [Tailwind CSS](https://tailwindcss.com/) (v2.1) with Next.js. It follows the steps outlined in the official [Tailwind docs](https://tailwindcss.com/docs/guides/nextjs).
|
||||
|
||||
It uses the new [`Just-in-Time Mode`](https://tailwindcss.com/docs/just-in-time-mode) for Tailwind CSS.
|
||||
|
||||
## Deploy your own
|
||||
|
||||
Deploy the example using [Vercel](https://vercel.com?utm_source=github&utm_medium=readme&utm_campaign=next-example):
|
||||
|
||||
[](https://vercel.com/new/git/external?repository-url=https://github.com/vercel/next.js/tree/canary/examples/with-tailwindcss&project-name=with-tailwindcss&repository-name=with-tailwindcss)
|
||||
|
||||
## How to use
|
||||
|
||||
Execute [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app) with [npm](https://docs.npmjs.com/cli/init) or [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) to bootstrap the example:
|
||||
|
||||
```bash
|
||||
npx create-next-app --example with-tailwindcss with-tailwindcss-app
|
||||
# or
|
||||
yarn create next-app --example with-tailwindcss with-tailwindcss-app
|
||||
```
|
||||
|
||||
Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&utm_medium=readme&utm_campaign=next-example) ([Documentation](https://nextjs.org/docs/deployment)).
|
||||
20
examples/default/package.json
Normal file
20
examples/default/package.json
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "with-tailwindcss",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start"
|
||||
},
|
||||
"dependencies": {
|
||||
"next": "latest",
|
||||
"react": "^17.0.1",
|
||||
"react-dom": "^17.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^10.0.4",
|
||||
"postcss": "^8.1.10",
|
||||
"tailwindcss": "^2.1.1"
|
||||
}
|
||||
}
|
||||
7
examples/default/pages/_app.js
Normal file
7
examples/default/pages/_app.js
Normal file
@ -0,0 +1,7 @@
|
||||
import 'tailwindcss/tailwind.css'
|
||||
|
||||
function MyApp({ Component, pageProps }) {
|
||||
return <Component {...pageProps} />
|
||||
}
|
||||
|
||||
export default MyApp
|
||||
5
examples/default/pages/api/hello.js
Normal file
5
examples/default/pages/api/hello.js
Normal file
@ -0,0 +1,5 @@
|
||||
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
|
||||
|
||||
export default function helloAPI(req, res) {
|
||||
res.status(200).json({ name: 'John Doe' })
|
||||
}
|
||||
78
examples/default/pages/index.js
Normal file
78
examples/default/pages/index.js
Normal file
@ -0,0 +1,78 @@
|
||||
import Head from 'next/head'
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<div className="flex flex-col items-center justify-center min-h-screen py-2">
|
||||
<Head>
|
||||
<title>Create a Portal App</title>
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</Head>
|
||||
|
||||
<main className="flex flex-col items-center justify-center w-full flex-1 px-20 text-center">
|
||||
<h1 className="text-6xl font-bold">
|
||||
<a href="https://portaljs.com/">
|
||||
<img src="/portaljs-logo.svg" alt="PortalJS Logo" className="h-28" />
|
||||
</a>
|
||||
</h1>
|
||||
|
||||
<h2 className="mt-6 text-4xl font-normal leading-snug">
|
||||
Yay, the portal is open 🌀<br />Let's go explore some data ...
|
||||
</h2>
|
||||
|
||||
<div className="flex flex-wrap items-center justify-around max-w-4xl mt-6 sm:w-full">
|
||||
<a
|
||||
href="https://portaljs.org/docs"
|
||||
className="p-6 mt-6 text-left border w-96 rounded-xl hover:text-blue-600 focus:text-blue-600"
|
||||
>
|
||||
<h3 className="text-2xl font-semibold">▸ Documentation</h3>
|
||||
<p className="mt-4 text-xl">
|
||||
Find in-depth information about Portal.js features and API.
|
||||
</p>
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="https://portaljs.com/learn/"
|
||||
className="p-6 mt-6 text-left border w-96 rounded-xl hover:text-blue-600 focus:text-blue-600"
|
||||
>
|
||||
<h3 className="text-2xl font-semibold">▸ Learn</h3>
|
||||
<p className="mt-4 text-xl">
|
||||
Learn about Portal.js in an interactive course.
|
||||
</p>
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="https://github.com/datopian/portal.js/tree/main/examples"
|
||||
className="p-6 mt-6 text-left border w-96 rounded-xl hover:text-blue-600 focus:text-blue-600"
|
||||
>
|
||||
<h3 className="text-2xl font-semibold">▸ Examples</h3>
|
||||
<p className="mt-4 text-xl">
|
||||
Discover and deploy boilerplate example Portal.js projects.
|
||||
</p>
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="https://portaljs.com/deploy/"
|
||||
className="p-6 mt-6 text-left border w-96 rounded-xl hover:text-blue-600 focus:text-blue-600"
|
||||
>
|
||||
<h3 className="text-2xl font-semibold">▸ Deploy</h3>
|
||||
<p className="mt-4 text-xl">
|
||||
Learn how to deploy your Portal.js site with DataHub or Github pages.
|
||||
</p>
|
||||
</a>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer className="flex items-center justify-center w-full h-24 border-t">
|
||||
<a
|
||||
className="flex items-center justify-center"
|
||||
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="https://www.datopian.com/wp-content/uploads/2020/09/datopian-bash-png.png" alt="Datopian Logo" className="h-6 ml-2" />
|
||||
</a>
|
||||
</footer>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
8
examples/default/postcss.config.js
Normal file
8
examples/default/postcss.config.js
Normal file
@ -0,0 +1,8 @@
|
||||
// If you want to use other PostCSS plugins, see the following:
|
||||
// https://tailwindcss.com/docs/using-with-preprocessors
|
||||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
}
|
||||
BIN
examples/default/public/favicon.ico
Normal file
BIN
examples/default/public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
25
examples/default/public/portaljs-logo.svg
Normal file
25
examples/default/public/portaljs-logo.svg
Normal file
@ -0,0 +1,25 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="571" height="146" viewBox="0 0 571 146">
|
||||
<g id="Group_45" data-name="Group 45" transform="translate(-1091 -562)">
|
||||
<text id="P_RTAL.JS" data-name="P RTAL.JS" transform="translate(1091 678)" font-size="120" font-family="Montserrat-Regular, Montserrat"><tspan x="0" y="0" xml:space="preserve">P RTAL</tspan><tspan y="0" font-size="60">.JS</tspan></text>
|
||||
<g id="portaljs-balloon" transform="translate(1167.42 575.265)">
|
||||
<g id="Group_38" data-name="Group 38" transform="translate(13.425 12.18)">
|
||||
<g id="Group_34" data-name="Group 34" transform="translate(47.305)">
|
||||
<path id="Path_833" data-name="Path 833" d="M70.658,58.514V14.931c0-.749-.5-1.747.333-2.163,1-.5,1.913.333,2.745.749,16.3,8.234,22.706,20.627,21.292,36.181-1.248,13.89-7.236,26.7-13.557,39.341-2.246,4.575-4.658,8.983-6.987,13.557-.582,1.164-1.164,2.329-2.994,1.913-1.663-.416-.832-1.58-.832-2.412C70.575,87.625,70.658,73.07,70.658,58.514Z" transform="translate(-70.325 -12.253)" fill="#fdd036"/>
|
||||
<path id="Path_834" data-name="Path 834" d="M70.633,58.441l-.083-25.2L70.466,20.6V15.856a8.553,8.553,0,0,0-.083-1.5c0-.25-.083-.5-.083-.832a1.386,1.386,0,0,1,.333-.915,1.847,1.847,0,0,1,1.83-.333,5.652,5.652,0,0,1,1.414.749l1.414.749a47.5,47.5,0,0,1,10.4,7.236,31.366,31.366,0,0,1,7.4,10.314A33.708,33.708,0,0,1,95.918,43.8a58.59,58.59,0,0,1-1.081,12.642,89.125,89.125,0,0,1-3.493,12.227,118.932,118.932,0,0,1-4.907,11.644c-3.576,7.652-7.652,14.971-11.561,22.457a5.149,5.149,0,0,1-.915,1.414,2.067,2.067,0,0,1-1.663.582,2.461,2.461,0,0,1-.832-.166,1.958,1.958,0,0,1-.832-.416,1.386,1.386,0,0,1-.333-.915,2.461,2.461,0,0,1,.166-.832,8.553,8.553,0,0,0,.083-1.5V96.2l.083-12.642Zm0,0,.083,25.2L70.882,96.2v5.489a2.829,2.829,0,0,1-.083.832c-.083.5-.25,1,.083,1.248a2.77,2.77,0,0,0,1.248.416,1.645,1.645,0,0,0,1.164-.416,3.132,3.132,0,0,0,.749-1.248C77.786,95.038,81.695,87.552,85.1,79.9a104.531,104.531,0,0,0,8.151-23.621A51.758,51.758,0,0,0,94.42,43.886a33.44,33.44,0,0,0-2.662-12.06,31.631,31.631,0,0,0-6.987-10.147,43.958,43.958,0,0,0-10.064-7.319l-1.248-.665c-.5-.25-.915-.582-1.331-.749a1.137,1.137,0,0,0-1.164.166c-.25.25-.166.749-.083,1.248a10.008,10.008,0,0,1,0,1.58V20.68L70.8,33.323Z" transform="translate(-70.3 -12.18)" fill="#fff"/>
|
||||
</g>
|
||||
<g id="Group_35" data-name="Group 35" transform="translate(20.075 0.183)">
|
||||
<path id="Path_835" data-name="Path 835" d="M62.512,58.543c0,14.389,0,28.778-.083,43.167,0,.915,1,2.412-1,2.828-1.913.333-2-1.164-2.5-2.163C52.032,89.067,44.713,75.843,40.8,61.62c-2.828-10.314-3.992-20.71.832-30.857,3.66-7.735,10.314-13.225,18.631-17.466,2.828-1.414,2.246.416,2.246,1.58Z" transform="translate(-37.694 -12.464)" fill="#fdd036"/>
|
||||
<path id="Path_836" data-name="Path 836" d="M62.379,58.478,62.463,83.6l.083,12.559v5.489c0,.25.083.5.083.749.083.25.083.5.166.832a1.287,1.287,0,0,1-.25.915,1.677,1.677,0,0,1-.749.582,2.955,2.955,0,0,1-.832.166,3.73,3.73,0,0,1-.915-.083,1.327,1.327,0,0,1-.749-.582,6.3,6.3,0,0,1-.749-1.5C54.644,95.407,50.569,88,47.075,80.436a112.936,112.936,0,0,1-8.317-23.7,53.836,53.836,0,0,1-1.164-12.642A35.407,35.407,0,0,1,40.421,31.7a31.228,31.228,0,0,1,7.236-10.4A47.342,47.342,0,0,1,57.971,13.98c.5-.25.915-.5,1.414-.749a8.167,8.167,0,0,1,1.5-.665,2.955,2.955,0,0,1,.832-.166,1.055,1.055,0,0,1,.5.083,1,1,0,0,1,.416.416,1.95,1.95,0,0,1,.166.915l-.083.749L62.629,20.8,62.546,33.36Zm0,0L62.3,33.443l-.083-12.559-.166-6.238a3.811,3.811,0,0,0-.083-1.414c-.083-.166-.166-.166-.416-.166a2.571,2.571,0,0,0-.665.166,9.929,9.929,0,0,0-1.331.665c-.5.25-.915.5-1.331.749a41.491,41.491,0,0,0-9.981,7.4A32.062,32.062,0,0,0,41.42,32.2a34.722,34.722,0,0,0-2.578,11.977,47.635,47.635,0,0,0,1.248,12.31A107.863,107.863,0,0,0,48.157,80.02c3.41,7.652,7.319,14.971,11.062,22.457a10.5,10.5,0,0,0,.582,1.331,1.083,1.083,0,0,0,1.081.416c.416-.083,1-.166,1.164-.5.25-.25.166-.832,0-1.331a2.564,2.564,0,0,1-.083-.832V96.073l.25-12.476Z" transform="translate(-37.562 -12.4)" fill="#fff"/>
|
||||
</g>
|
||||
<g id="Group_36" data-name="Group 36" transform="translate(53.011 1.326)">
|
||||
<path id="Path_837" data-name="Path 837" d="M80.822,13.8a17.422,17.422,0,0,1,5.573,1c17.383,4.491,28.695,16.053,30.358,31.107.832,7.9-1.5,15.387-6.321,22.124-8.983,12.393-19.379,23.871-29.36,35.682-.665.749-1.5,1.414-2.578.915-1.164-.582-.083-1.414.25-2,5.989-11.561,12.227-23.039,16.219-35.266,3.244-9.9,5.406-19.879,3.077-30.192-2-9.066-7.486-16.385-16.136-22.041C81.571,14.713,80.905,14.547,80.822,13.8Z" transform="translate(-77.296 -13.777)" fill="#fdd036"/>
|
||||
<path id="Path_838" data-name="Path 838" d="M80.687,13.8a10.066,10.066,0,0,1,3.493.416c1.164.25,2.329.582,3.41.915l1.747.5c.582.166,1.081.416,1.663.582s1.164.416,1.663.582l1.663.665A41.117,41.117,0,0,1,106.3,25.024a33.1,33.1,0,0,1,10.979,25.534,28.561,28.561,0,0,1-1.164,7.07,38.642,38.642,0,0,1-2.745,6.654,57.634,57.634,0,0,1-3.992,5.989c-1.414,1.913-2.828,3.826-4.325,5.656C99.234,83.412,93.08,90.565,86.925,97.718l-4.658,5.406c-.416.5-.749.832-1.164,1.331a2.882,2.882,0,0,1-2,1,1.91,1.91,0,0,1-1.164-.333,1.559,1.559,0,0,1-.582-.5,1.219,1.219,0,0,1-.166-.915,3.5,3.5,0,0,1,.582-1c.083-.083.166-.25.25-.333a.631.631,0,0,1,.166-.333c2.163-4.159,4.408-8.4,6.488-12.559a165.626,165.626,0,0,0,10.9-26.033A70.138,70.138,0,0,0,98.4,49.644,41.682,41.682,0,0,0,97.321,35.67,32.256,32.256,0,0,0,91,23.194a45.56,45.56,0,0,0-4.907-4.907c-.915-.749-1.83-1.5-2.745-2.163l-1.414-1a3.906,3.906,0,0,1-.749-.5A1.012,1.012,0,0,1,80.687,13.8Zm0,0a.873.873,0,0,0,.416.749,3.372,3.372,0,0,0,.749.416l1.5,1c1,.665,1.913,1.414,2.828,2.163a35.969,35.969,0,0,1,5.074,4.99,33.7,33.7,0,0,1,6.737,12.476,42.611,42.611,0,0,1,1.331,14.14A66.862,66.862,0,0,1,96.656,63.7c-2.578,9.149-6.571,17.8-10.729,26.283-2.079,4.242-4.325,8.4-6.488,12.642a1.108,1.108,0,0,1-.25.416,1.46,1.46,0,0,1-.333.416c-.166.25-.333.416-.333.5v-.083l.083.083a1.182,1.182,0,0,0,.5.166,1.993,1.993,0,0,0,1.081-.582c.333-.333.749-.915,1.164-1.331L85.927,96.8C92.081,89.65,98.32,82.5,104.142,75.095c1.5-1.83,2.911-3.743,4.325-5.573a44.5,44.5,0,0,0,3.909-5.822,30.876,30.876,0,0,0,3.909-13.225,32.458,32.458,0,0,0-10.4-25.035A41.048,41.048,0,0,0,94.161,17.7l-1.58-.749a13.2,13.2,0,0,0-1.663-.582c-.582-.166-1.081-.416-1.663-.582l-1.663-.5c-1.164-.333-2.246-.665-3.41-1A10.158,10.158,0,0,0,80.687,13.8Z" transform="translate(-77.161 -13.775)" fill="#fff"/>
|
||||
</g>
|
||||
<g id="Group_37" data-name="Group 37" transform="translate(0 1.43)">
|
||||
<path id="Path_839" data-name="Path 839" d="M49.913,13.9c-9.648,6.321-15.72,14.306-17.633,24.536-1.414,7.4-.5,14.639,1.248,21.875,3.66,14.472,10.9,27.863,17.8,41.337.5.915,2,2.246.749,2.911-1.663.832-2.246-1-3.077-1.913-8.983-10.23-17.8-20.627-26.117-31.273-8.4-10.729-11.811-22.291-6.321-34.767C22.3,23.715,34.11,16.645,49.913,13.9Z" transform="translate(-13.504 -13.9)" fill="#fdd036"/>
|
||||
<path id="Path_840" data-name="Path 840" d="M49.834,13.9a49.042,49.042,0,0,0-10.48,9.4,33.267,33.267,0,0,0-6.238,12.476,41.029,41.029,0,0,0-1.081,13.89A70.4,70.4,0,0,0,34.78,63.388a156.877,156.877,0,0,0,10.813,25.95l3.244,6.321,1.58,3.161.832,1.58a8.665,8.665,0,0,0,.832,1.5,6.292,6.292,0,0,1,1,1.663,1.154,1.154,0,0,1,0,.749,1.608,1.608,0,0,1-.416.749,2.09,2.09,0,0,1-1.164.5,1.639,1.639,0,0,1-1.248-.25,7.5,7.5,0,0,1-.832-.749c-.416-.5-.665-1-1-1.414l-4.658-5.323c-6.155-7.153-12.227-14.389-18.049-21.708-2.911-3.66-5.989-7.4-8.151-11.644a34.16,34.16,0,0,1-4.076-13.64,25.721,25.721,0,0,1,.5-7.153,38.284,38.284,0,0,1,2.163-6.82,35.239,35.239,0,0,1,3.493-6.238l.5-.749.582-.665c.416-.5.749-.915,1.164-1.414.832-.832,1.58-1.747,2.5-2.578A40.857,40.857,0,0,1,36.36,17.726,53.237,53.237,0,0,1,49.834,13.9Zm0,0A62.8,62.8,0,0,0,36.36,17.892a39,39,0,0,0-11.644,7.735A33.141,33.141,0,0,0,16.9,37.105a32.144,32.144,0,0,0-2,6.654,27.3,27.3,0,0,0-.333,6.9,31.921,31.921,0,0,0,1.331,6.82,36.226,36.226,0,0,0,2.745,6.4c2.163,4.159,5.157,7.735,8.151,11.395C32.7,82.6,38.772,89.754,44.927,96.907l4.658,5.323c.416.5.749,1.081,1.081,1.414a2.205,2.205,0,0,0,.5.416.75.75,0,0,0,.416.083c.166,0,.416-.166.5-.166h0v-.083a6.561,6.561,0,0,0-.832-1.331,16.493,16.493,0,0,1-.915-1.663l-.832-1.58-1.58-3.161-3.161-6.321c-4.159-8.4-8.151-17.051-10.729-26.2a72.546,72.546,0,0,1-2.578-13.973A42.569,42.569,0,0,1,32.7,35.525a34.169,34.169,0,0,1,6.654-12.476A42.57,42.57,0,0,1,49.834,13.9Z" transform="translate(-13.425 -13.9)" fill="#fff"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 8.2 KiB |
12
examples/default/tailwind.config.js
Normal file
12
examples/default/tailwind.config.js
Normal file
@ -0,0 +1,12 @@
|
||||
module.exports = {
|
||||
mode: 'jit',
|
||||
purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
|
||||
darkMode: false, // or 'media' or 'class'
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
variants: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [],
|
||||
}
|
||||
2381
examples/default/yarn.lock
Normal file
2381
examples/default/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user