Compare commits

..

14 Commits

Author SHA1 Message Date
João Demenech
709b10cef3 Regenerate package-lock 2023-07-18 15:06:00 -03:00
João Demenech
ec8c5d27e8 Rebuild package-lock.json files 2023-07-18 15:04:51 -03:00
João Demenech
cf6fab2c4f [site,seo][s]: review page titles 2023-07-18 11:09:03 -03:00
João Demenech
5088afe69a [site,seo][s]: implement next-sitemap 2023-07-18 10:35:31 -03:00
João Demenech
95af903642 [site,seo][xs]: add icon to default seo 2023-07-18 10:27:27 -03:00
João Demenech
9fee284097 [site,seo][xs]: add apple touch icon, add alt props to images 2023-07-18 10:25:19 -03:00
João Demenech
11a4272f16 [site,seo][xs]: add custom _document with lang prop, add description to meta tags, make title larger 2023-07-18 09:38:30 -03:00
João Demenech
349f5bea66 Merge pull request #982 from datopian/lighthouse-improvements
[site][m] - improvements to lighthouse score
2023-07-17 15:04:25 -03:00
João Demenech
6aef860a81 Merge pull request #981 from datopian/changeset-release/main
Version Packages
2023-07-17 14:51:08 -03:00
Luccas Mateus de Medeiros Gomes
e908cb9344 [site][m] - improvements to lighthouse score 2023-07-17 14:44:29 -03:00
github-actions[bot]
1a22e54d5b Version Packages 2023-07-17 17:41:23 +00: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
33 changed files with 3283 additions and 65 deletions

2
package-lock.json generated
View File

@@ -40048,7 +40048,7 @@
},
"packages/components": {
"name": "@portaljs/components",
"version": "0.2.0",
"version": "0.3.1",
"dependencies": {
"@githubocto/flat-ui": "^0.14.1",
"@heroicons/react": "^2.0.17",

View File

@@ -1,6 +1,8 @@
{
"name": "portaljs",
"workspaces": ["./packages/*"],
"workspaces": [
"./packages/*"
],
"version": "0.0.0",
"license": "MIT",
"scripts": {

View File

@@ -1,5 +1,11 @@
# @portaljs/components
## 0.3.1
### Patch Changes
- [#980](https://github.com/datopian/portaljs/pull/980) [`38738525`](https://github.com/datopian/portaljs/commit/3873852567b1aab4827a716bd588bd5de3223e2b) Thanks [@demenech](https://github.com/demenech)! - Fix missing CSS styles for PDF component
## 0.3.0
### Minor Changes

View File

@@ -1,6 +1,6 @@
{
"name": "@portaljs/components",
"version": "0.3.0",
"version": "0.3.1",
"type": "module",
"description": "https://portaljs.org",
"keywords": [

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";

5
site/.gitignore vendored
View File

@@ -35,3 +35,8 @@ yarn-error.log*
# markdowndb
markdown.db
# seo
robots.txt
sitemap-0.xml
sitemap.xml

View File

@@ -58,7 +58,7 @@ export default function Features() {
>
<div className="absolute -inset-px rounded-xl border-2 border-transparent opacity-0 [background:linear-gradient(var(--quick-links-hover-bg,theme(colors.sky.50)),var(--quick-links-hover-bg,theme(colors.sky.50)))_padding-box,linear-gradient(to_top,theme(colors.blue.300),theme(colors.blue.400),theme(colors.blue.500))_border-box] group-hover:opacity-100 dark:[--quick-links-hover-bg:theme(colors.slate.800)]" />
<div className="relative overflow-hidden rounded-xl p-6">
<img src={feature.icon} alt="" className="h-24 w-auto" />
<img src={feature.icon} alt={feature.title} className="h-24 w-auto" />
<h2 className="mt-4 font-display text-base text-primary dark:text-primary-dark">
<span className="absolute -inset-px rounded-xl" />
{feature.title}

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 {
@@ -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

@@ -12,7 +12,6 @@ export default function MDXPage({ source, frontMatter }) {
return <LayoutComponent {...frontMatter}>{children}</LayoutComponent>;
};
return (
<Layout>
<MDXRemote {...source} components={{ DocsPagination, NextSeo, Hero }} />

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,72 @@
const config = {
title:
"PortalJS",
title: 'PortalJS - The JavaScript framework for data portals.',
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.',
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: {
additionalLinkTags: [
{ rel: 'icon', href: '/favicon.ico' },
{ rel: 'apple-touch-icon', href: '/icon.png', sizes: '120x120' },
],
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

@@ -1,6 +1,8 @@
---
showToc: false
showSidebar: false
title: "Markdown-based Websites Guide"
disableTitle: true
---
<Hero title="Markdown-based Websites" subtitle="Create markdown-based website, update it, add collaborators and discover markdown superpowers" />
@@ -79,4 +81,4 @@ Below is a screenshot of how the final website will look like:
- Visit the site! Yay! Your changes are live! 🎉
> [!tip]
> Read full tutorial [[edit-a-website-locally|here!]]
> Read full tutorial [[edit-a-website-locally|here!]]

View File

@@ -1,4 +1,6 @@
# Guides and tutorials
---
title: Guides and Tutorials
---
- [[howtos/analytics|How to add web analytics?]]
- [[howtos/seo|How to customize page metadata for SEO?]]

View File

@@ -6,7 +6,7 @@ export default function DefaultLayout({ children, ...frontMatter }) {
{/* Default layout */}
{!frontMatter.layout && (
<>
<h1>{frontMatter.title}</h1>
{!frontMatter.disableTitle && <h1>{frontMatter.title}</h1>}
{frontMatter.author && (
<div className="-mt-6">
<p className="opacity-60 pl-1">{frontMatter.author}</p>

View File

@@ -13,7 +13,7 @@ export const DocsLayout: React.FC<any> = ({ children, ...frontMatter }) => {
<time dateTime={created}>{formatDate(created)}</time>
</p>
)}
{title && <h1>{title}</h1>}
{!frontMatter.disableTitle && title && <h1>{title}</h1>}
</div>
</header>
<section>{children}</section>

View File

@@ -0,0 +1,5 @@
/** @type {import('next-sitemap').IConfig} */
module.exports = {
siteUrl: process.env.SITE_URL || 'https://portaljs.org',
generateRobotsTxt: true,
}

49
site/package-lock.json generated
View File

@@ -50,6 +50,7 @@
"devDependencies": {
"@tailwindcss/typography": "^0.5.9",
"autoprefixer": "^10.4.14",
"next-sitemap": "^4.1.8",
"postcss": "^8.4.22",
"prettier": "^2.8.7",
"remark": "^14.0.2",
@@ -229,6 +230,12 @@
"resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-6.0.2.tgz",
"integrity": "sha512-Tbsj02wXCbqGmzdnXNk0SOF19ChhRU70BsroIi4Pm6Ehp56in6vch94mfbdQ17DozxkL3BAVjbZ4Qc1a0HFRAg=="
},
"node_modules/@corex/deepmerge": {
"version": "4.0.43",
"resolved": "https://registry.npmjs.org/@corex/deepmerge/-/deepmerge-4.0.43.tgz",
"integrity": "sha512-N8uEMrMPL0cu/bdboEWpQYb/0i2K5Qn8eCsxzOmxSggJbbQte7ljMRoXm917AbntqTGOzdTu+vP3KOOzoC70HQ==",
"dev": true
},
"node_modules/@docsearch/css": {
"version": "3.5.0",
"resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.5.0.tgz",
@@ -7087,6 +7094,15 @@
"node": "*"
}
},
"node_modules/minimist": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
"integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
"dev": true,
"funding": {
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/minipass": {
"version": "3.3.6",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
@@ -7330,6 +7346,39 @@
"react-dom": ">=16.0.0"
}
},
"node_modules/next-sitemap": {
"version": "4.1.8",
"resolved": "https://registry.npmjs.org/next-sitemap/-/next-sitemap-4.1.8.tgz",
"integrity": "sha512-XAXpBHX4o89JfMgvrm0zimlZwpu2iBPXHpimJMUrqOZSc4C2oB1Lv89mxuVON9IE8HOezaM+w4GjJxcYCuGPTQ==",
"dev": true,
"funding": [
{
"url": "https://github.com/iamvishnusankar/next-sitemap.git"
}
],
"dependencies": {
"@corex/deepmerge": "^4.0.43",
"@next/env": "^13.4.3",
"fast-glob": "^3.2.12",
"minimist": "^1.2.8"
},
"bin": {
"next-sitemap": "bin/next-sitemap.mjs",
"next-sitemap-cjs": "bin/next-sitemap.cjs"
},
"engines": {
"node": ">=14.18"
},
"peerDependencies": {
"next": "*"
}
},
"node_modules/next-sitemap/node_modules/@next/env": {
"version": "13.4.10",
"resolved": "https://registry.npmjs.org/@next/env/-/env-13.4.10.tgz",
"integrity": "sha512-3G1yD/XKTSLdihyDSa8JEsaWOELY+OWe08o0LUYzfuHp1zHDA8SObQlzKt+v+wrkkPcnPweoLH1ImZeUa0A1NQ==",
"dev": true
},
"node_modules/next-themes": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/next-themes/-/next-themes-0.2.1.tgz",

View File

@@ -6,6 +6,7 @@
"dev": "npm run mddb && next dev",
"build": "next build",
"prebuild": "npm run mddb && node ./scripts/fix-symlinks.mjs",
"postbuild": "next-sitemap",
"start": "next start",
"mddb": "mddb content"
},
@@ -52,6 +53,7 @@
"devDependencies": {
"@tailwindcss/typography": "^0.5.9",
"autoprefixer": "^10.4.14",
"next-sitemap": "^4.1.8",
"postcss": "^8.4.22",
"prettier": "^2.8.7",
"remark": "^14.0.2",

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,9 +45,14 @@ 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} />
<DefaultSeo
defaultTitle={siteConfig.title}
description={siteConfig.description}
titleTemplate="PortalJS - %s"
{...siteConfig.nextSeo}
/>
{/* Global Site Tag (gtag.js) - Google Analytics */}
{siteConfig.analytics && (
@@ -71,10 +77,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>
);

13
site/pages/_document.tsx Normal file
View File

@@ -0,0 +1,13 @@
import { Html, Head, Main, NextScript } from 'next/document';
export default function Document() {
return (
<Html lang="en">
<Head />
<body>
<Main />
<NextScript />
</body>
</Html>
);
}

View File

@@ -3,10 +3,12 @@ import computeFields from '@/lib/computeFields';
import clientPromise from '@/lib/mddb';
import { BlogsList, SimpleLayout } from '@portaljs/core';
import * as fs from 'fs';
import {NextSeo} from 'next-seo';
export default function Blog({ blogs }) {
return (
<>
<NextSeo title="Blog posts" />
<Layout>
<SimpleLayout title="Blog posts">
<BlogsList blogs={blogs} />

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

BIN
site/public/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 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

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

File diff suppressed because it is too large Load Diff