Compare commits

...

6 Commits

Author SHA1 Message Date
Luccas Mateus de Medeiros Gomes
8784621e43 [site][xs] - fix accessbiility 2023-07-20 11:11:35 -03:00
Luccas Mateus de Medeiros Gomes
6a3b01fd91 [site][lighthouse] - increate accessibility 2023-07-20 10:18:49 -03:00
Luccas Mateus de Medeiros Gomes
e908cb9344 [site][m] - improvements to lighthouse score 2023-07-17 14:44:29 -03:00
João Demenech
172b4b71d4 Merge pull request #980 from datopian/bugfix/pdf-styles
Bugfix/pdf styles
2023-07-17 14:38:34 -03:00
João Demenech
3873852567 Bump version 2023-07-17 14:32:35 -03:00
João Demenech
5e349855a2 [components,pdf][xs]: add CSS styles for PDF 2023-07-17 14:29:57 -03:00
21 changed files with 3230 additions and 96 deletions

View File

@@ -0,0 +1,5 @@
---
'@portaljs/components': patch
---
Fix missing CSS styles for PDF component

View File

@@ -3,6 +3,8 @@
@import "tailwindcss/components";
@import "include";
@import "leaflet";
@import '@react-pdf-viewer/core/lib/styles/index.css';
@import '@react-pdf-viewer/default-layout/lib/styles/index.css';
@import 'ag-grid-community/styles/ag-grid.css';
@import 'ag-grid-community/styles/ag-theme-alpine.css';
@import "tailwindcss/utilities";

View File

@@ -2,7 +2,7 @@ import { useRef } from 'react';
import ButtonLink from './ButtonLink';
import NewsletterForm from './NewsletterForm';
import Image from 'next/image';
import DatahubExampleImg from "@/public/images/showcases/datahub.png"
import DatahubExampleImg from '@/public/images/showcases/datahub.webp';
const codeLanguage = 'javascript';
const code = `export default {
@@ -41,7 +41,7 @@ export function Hero() {
{/* Commented code on line 37, 39 and 113 will reenable the two columns hero */}
<div className="mx-auto grid max-w-2xl grid-cols-1 gap-y-16 gap-x-8 px-4 lg:max-w-8xl lg:grid-cols-2 lg:px-8 xl:gap-x-16 xl:px-12">
<div className="relative mb-10 lg:mb-0 md:text-center lg:text-left">
<div role="heading">
<div>
<h1 className="inline bg-gradient-to-r from-blue-500 via-blue-300 to-blue-500 bg-clip-text text-5xl tracking-tight text-transparent">
The JavaScript framework for data portals
</h1>
@@ -72,9 +72,11 @@ export function Hero() {
target="_blank"
rel="noopener noreferrer"
>
<img
<Image
src="/images/datopian_logo.png"
alt="Datopian"
width={24}
height={20}
className="mx-2 mb-1 h-6 inline bg-black rounded-full"
/>
<span>Datopian</span>
@@ -85,7 +87,12 @@ export function Hero() {
<div className="relative rounded-2xl bg-[#0A101F]/80 ring-1 ring-white/10 backdrop-blur">
<div className="absolute -top-px left-20 right-11 h-px bg-gradient-to-r from-sky-300/0 via-sky-300/70 to-sky-300/0" />
<div className="absolute -bottom-px left-11 right-20 h-px bg-gradient-to-r from-blue-400/0 via-blue-400 to-blue-400/0" />
<Image src={DatahubExampleImg} alt="opendata.datahub.io" />
<Image
height={400}
width={600}
src={DatahubExampleImg}
alt="opendata.datahub.io"
/>
</div>
</div>
</div>

View File

@@ -20,7 +20,7 @@ export default function NavItem({ item }) {
};
return (
<Menu as="div" className="relative">
<Menu as="div" role="menu" className="relative">
<Menu.Item>
{Object.prototype.hasOwnProperty.call(item, 'href') ? (
<Link

View File

@@ -3,10 +3,6 @@ import Script from 'next/script';
export default function NewsletterForm() {
return (
<div>
<link
rel="stylesheet"
href="https://sibforms.com/forms/end-form/build/sib-styles.css"
/>
<div
id="sib-form-container"
className="mt-8 sm:mx-auto sm:text-center lg:text-left lg:mx-0"
@@ -119,6 +115,7 @@ export default function NewsletterForm() {
}}
/>
<Script
strategy="worker"
id="newsletter-submit-form"
src="https://sibforms.com/forms/end-form/build/main.js"
/>

View File

@@ -5,26 +5,26 @@ const items = [
{
title: 'Open Data Northern Ireland',
href: 'https://www.opendatani.gov.uk/',
image: '/images/showcases/odni.png',
image: '/images/showcases/odni.webp',
description: 'Government Open Data Portal',
},
{
title: 'Birmingham City Observatory',
href: 'https://www.cityobservatory.birmingham.gov.uk/',
image: '/images/showcases/birmingham.png',
image: '/images/showcases/birmingham.webp',
description: 'Government Open Data Portal',
},
{
title: 'UAE Open Data',
href: 'https://opendata.fcsc.gov.ae/',
image: '/images/showcases/uae.png',
image: '/images/showcases/uae.webp',
description: 'Government Open Data Portal',
sourceUrl: 'https://github.com/FCSCOpendata/frontend',
},
{
title: 'Datahub Open Data',
href: 'https://opendata.datahub.io/',
image: '/images/showcases/datahub.png',
image: '/images/showcases/datahub.webp',
description: 'Demo Data Portal by DataHub',
},
];

View File

@@ -1,61 +1,68 @@
const config = {
title:
"PortalJS",
title: 'PortalJS',
description:
"PortalJS is a framework for rapidly building rich data portal frontends using a modern frontend approach. PortalJS can be used to present a single dataset or build a full-scale data catalog/portal.",
'PortalJS is a framework for rapidly building rich data portal frontends using a modern frontend approach. PortalJS can be used to present a single dataset or build a full-scale data catalog/portal.',
theme: {
default: "dark",
toggleIcon: "/images/theme-button.svg",
default: 'dark',
toggleIcon: '/images/theme-button.svg',
},
author: "Datopian",
authorLogo: "/datopian-logo.png",
authorUrl: "https://datopian.com/",
author: 'Datopian',
authorLogo: '/datopian-logo.webp',
authorUrl: 'https://datopian.com/',
navbarTitle: {
// logo: "/images/logo.svg",
text: "🌀 PortalJS",
text: '🌀 PortalJS',
// version: "Alpha",
},
navLinks: [
{ name: "Docs", href: "/docs" },
{ name: 'Docs', href: '/docs' },
// { name: "Components", href: "/docs/components" },
{ name: "Blog", href: "/blog" },
{ name: "Showcases", href: "/#showcases" },
{ name: "Howtos", href: "/howtos" },
{ name: "Guide", href: "/guide" },
{ name: "Examples", href: "https://github.com/datopian/portaljs/tree/main/examples", target: "_blank" },
{ name: "Components", href: "https://storybook.portaljs.org", target: "_blank" },
{ name: 'Blog', href: '/blog' },
{ name: 'Showcases', href: '/#showcases' },
{ name: 'Howtos', href: '/howtos' },
{ name: 'Guide', href: '/guide' },
{
name: 'Examples',
href: 'https://github.com/datopian/portaljs/tree/main/examples',
target: '_blank',
},
{
name: 'Components',
href: 'https://storybook.portaljs.org',
target: '_blank',
},
// { name: "DL Demo", href: "/data-literate/demo" },
// { name: "Excel Viewer", href: "/excel-viewer" },
],
footerLinks: [],
nextSeo: {
openGraph: {
type: "website",
type: 'website',
title:
"PortalJS - rapidly build rich data portals using a modern frontend framework.",
'PortalJS - rapidly build rich data portals using a modern frontend framework.',
description:
"PortalJS is a framework for rapidly building rich data portal frontends using a modern frontend approach. PortalJS can be used to present a single dataset or build a full-scale data catalog and portal.",
locale: "en_US",
'PortalJS is a framework for rapidly building rich data portal frontends using a modern frontend approach. PortalJS can be used to present a single dataset or build a full-scale data catalog and portal.',
locale: 'en_US',
images: [
{
url: "/homepage-screenshot.png", // TODO
alt: "PortalJS - rapidly build rich data portals using a modern frontend framework.",
url: '/homepage-screenshot.png', // TODO
alt: 'PortalJS - rapidly build rich data portals using a modern frontend framework.',
width: 1280,
height: 720,
type: "image/jpg",
type: 'image/jpg',
},
],
},
twitter: {
handle: "@datopian",
site: "https://datopian.com/",
cardType: "summary_large_image",
handle: '@datopian',
site: 'https://datopian.com/',
cardType: 'summary_large_image',
},
},
github: "https://github.com/datopian/portaljs",
discord: "https://discord.gg/EeyfGrGu4U",
github: 'https://github.com/datopian/portaljs',
discord: 'https://discord.gg/EeyfGrGu4U',
tableOfContents: true,
analytics: "G-96GWZHMH57",
analytics: 'G-96GWZHMH57',
// editLinkShow: true,
};
export default config;

View File

@@ -38,7 +38,7 @@ Let's check it's working and what we have! Open http://localhost:3000 from your
You should see a page like this when you access http://localhost:3000. This is the starter template page which shows the most simple data portal you could have: a simple README plus csv file.
<img src="/assets/examples/basic-example.png" />
<img src="/assets/examples/basic-example.png" alt="Basic example" />
### Editing the Page
@@ -51,8 +51,8 @@ Lets try editing the starter page.
After refreshing the page, you should see the new text:
<img src="/assets/docs/editing-the-page-1.png" />
<img src="/assets/docs/editing-the-page-1.png" alt="Editing base example" />
Congratulations! The app is up and running and you learned how to edit a page. In the next lesson, you are going to learn how to create new datasets.
Congratulations! The app is up and running and you learned how to edit a page. In the next lesson, you are going to learn how to create new datasets.
<DocsPagination next="/docs/creating-new-datasets" />

View File

@@ -1,21 +1,21 @@
import { h } from "hastscript";
import matter from "gray-matter";
import mdxmermaid from "mdx-mermaid";
import remarkCallouts from "@portaljs/remark-callouts";
import remarkEmbed from "@portaljs/remark-embed";
import remarkGfm from "remark-gfm";
import remarkMath from "remark-math";
import remarkSmartypants from "remark-smartypants";
import remarkToc from "remark-toc";
import remarkWikiLink, { getPermalinks } from "@portaljs/remark-wiki-link";
import rehypeAutolinkHeadings from "rehype-autolink-headings";
import rehypeKatex from "rehype-katex";
import rehypeSlug from "rehype-slug";
import rehypePrismPlus from "rehype-prism-plus";
import { serialize } from "next-mdx-remote/serialize";
import { h } from 'hastscript';
import matter from 'gray-matter';
import mdxmermaid from 'mdx-mermaid';
import remarkCallouts from '@portaljs/remark-callouts';
import remarkEmbed from '@portaljs/remark-embed';
import remarkGfm from 'remark-gfm';
import remarkMath from 'remark-math';
import remarkSmartypants from 'remark-smartypants';
import remarkToc from 'remark-toc';
import remarkWikiLink, { getPermalinks } from '@portaljs/remark-wiki-link';
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
import rehypeKatex from 'rehype-katex';
import rehypeSlug from 'rehype-slug';
import rehypePrismPlus from 'rehype-prism-plus';
import { serialize } from 'next-mdx-remote/serialize';
import * as tw from "../tailwind.config";
import { siteConfig } from "../config/siteConfig";
import * as tw from '../tailwind.config';
import { siteConfig } from '../config/siteConfig';
/**
* Parse a markdown or MDX file to an MDX source form + front matter data
@@ -36,14 +36,14 @@ const parse = async function (source, format, scope) {
remarkPlugins: [
remarkEmbed,
remarkGfm,
[remarkSmartypants, { quotes: false, dashes: "oldschool" }],
[remarkSmartypants, { quotes: false, dashes: 'oldschool' }],
remarkMath,
remarkCallouts,
[remarkWikiLink, { permalinks, pathFormat: "obsidian-short" }],
[remarkWikiLink, { permalinks, pathFormat: 'obsidian-short' }],
[
remarkToc,
{
heading: "Table of contents",
heading: 'Table of contents',
tight: true,
},
],
@@ -54,29 +54,36 @@ const parse = async function (source, format, scope) {
[
rehypeAutolinkHeadings,
{
properties: { className: "heading-link" },
properties: { className: 'heading-link' },
test(element) {
return (
["h2", "h3", "h4", "h5", "h6"].includes(element.tagName) &&
element.properties?.id !== "table-of-contents" &&
element.properties?.className !== "blockquote-heading"
['h2', 'h3', 'h4', 'h5', 'h6'].includes(element.tagName) &&
element.properties?.id !== 'table-of-contents' &&
element.properties?.className !== 'blockquote-heading'
);
},
content() {
content(node) {
return [
h(
"svg",
'span.invisible.block.h-0.w-0',
{ ariaLabel: node.properties.id },
'Read the “',
node.properties.id,
'” section'
),
h(
'svg',
{
xmlns: "http:www.w3.org/2000/svg",
xmlns: 'http:www.w3.org/2000/svg',
fill: tw.theme.extend.colors.secondary.DEFAULT,
viewBox: "0 0 20 20",
className: "w-5 h-5",
viewBox: '0 0 20 20',
className: 'w-5 h-5',
},
[
h("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M9.493 2.853a.75.75 0 00-1.486-.205L7.545 6H4.198a.75.75 0 000 1.5h3.14l-.69 5H3.302a.75.75 0 000 1.5h3.14l-.435 3.148a.75.75 0 001.486.205L7.955 14h2.986l-.434 3.148a.75.75 0 001.486.205L12.456 14h3.346a.75.75 0 000-1.5h-3.14l.69-5h3.346a.75.75 0 000-1.5h-3.14l.435-3.147a.75.75 0 00-1.486-.205L12.045 6H9.059l.434-3.147zM8.852 7.5l-.69 5h2.986l.69-5H8.852z",
h('path', {
fillRule: 'evenodd',
clipRule: 'evenodd',
d: 'M9.493 2.853a.75.75 0 00-1.486-.205L7.545 6H4.198a.75.75 0 000 1.5h3.14l-.69 5H3.302a.75.75 0 000 1.5h3.14l-.435 3.148a.75.75 0 001.486.205L7.955 14h2.986l-.434 3.148a.75.75 0 001.486.205L12.456 14h3.346a.75.75 0 000-1.5h-3.14l.69-5h3.346a.75.75 0 000-1.5h-3.14l.435-3.147a.75.75 0 00-1.486-.205L12.045 6H9.059l.434-3.147zM8.852 7.5l-.69 5h2.986l.69-5H8.852z',
}),
]
),
@@ -84,7 +91,7 @@ const parse = async function (source, format, scope) {
},
},
],
[rehypeKatex, { output: "mathml" }],
[rehypeKatex, { output: 'mathml' }],
[rehypePrismPlus, { ignoreMissing: true }],
],
format,

View File

@@ -1,14 +1,15 @@
import "../styles/globals.css";
import "../styles/tailwind.css";
import '../styles/globals.css';
import '../styles/tailwind.css';
import '../styles/sib-form.css';
import Script from "next/script";
import Script from 'next/script';
import { DefaultSeo } from "next-seo";
import { DefaultSeo } from 'next-seo';
import { NavGroup, NavItem, pageview, ThemeProvider } from "@portaljs/core";
import { siteConfig } from "../config/siteConfig";
import { useEffect } from "react";
import { useRouter } from "next/dist/client/router";
import { NavGroup, NavItem, pageview, ThemeProvider } from '@portaljs/core';
import { siteConfig } from '../config/siteConfig';
import { useEffect } from 'react';
import { useRouter } from 'next/dist/client/router';
export interface CustomAppProps {
meta: {
@@ -32,9 +33,9 @@ function MyApp({ Component, pageProps }) {
const handleRouteChange = (url) => {
pageview(url);
};
router.events.on("routeChangeComplete", handleRouteChange);
router.events.on('routeChangeComplete', handleRouteChange);
return () => {
router.events.off("routeChangeComplete", handleRouteChange);
router.events.off('routeChangeComplete', handleRouteChange);
};
}
}, [router.events]);
@@ -44,7 +45,7 @@ function MyApp({ Component, pageProps }) {
disableTransitionOnChange
attribute="class"
defaultTheme={siteConfig.theme.default}
forcedTheme={siteConfig.theme.default ? null : "light"}
forcedTheme={siteConfig.theme.default ? null : 'light'}
>
<DefaultSeo defaultTitle={siteConfig.title} {...siteConfig.nextSeo} />
@@ -71,10 +72,15 @@ function MyApp({ Component, pageProps }) {
/>
</>
)}
{/* Umami Analytics */}
<Script async defer data-website-id="061e14c1-6157-4a93-820c-777c7a937c12" src="https://analytics.datopian.com/umami.js" />
<Script
async
defer
data-website-id="061e14c1-6157-4a93-820c-777c7a937c12"
src="https://analytics.datopian.com/umami.js"
/>
<Component {...pageProps} />
</ThemeProvider>
);

View File

@@ -7,6 +7,7 @@ import Layout from '../components/Layout';
import { useRouter } from 'next/router';
import { useEffect, useState } from 'react';
import { collectHeadings } from '@portaljs/core';
import Head from 'next/head';
export default function Home({ sidebarTree }) {
const router = useRouter();
@@ -23,7 +24,11 @@ export default function Home({ sidebarTree }) {
return (
<>
<Layout isHomePage={true} tableOfContents={tableOfContents} sidebarTree={sidebarTree} >
<Layout
isHomePage={true}
tableOfContents={tableOfContents}
sidebarTree={sidebarTree}
>
<Features />
<Showcases />
<Community />

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

View File

@@ -1,4 +1,4 @@
@import "@portaljs/remark-callouts/styles.css";
@import '@portaljs/remark-callouts/styles.css';
@import './prism.css';
html,
@@ -31,7 +31,7 @@ html {
/* tooltip fade-out clip */
.tooltip-body::after {
content: "";
content: '';
position: absolute;
right: 0;
top: 3.6rem; /* multiple of $line-height used on the tooltip body (defined in tooltipBodyStyle) */

3098
site/styles/sib-form.css Normal file

File diff suppressed because it is too large Load Diff