diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 9ca1c349..ddf625da 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -10,4 +10,4 @@ jobs: deploy: uses: ConductionNL/.github/.github/workflows/documentation.yml@main with: - cname: procest.app + cname: procest.conduction.nl diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index 66b0d1aa..43a06cdc 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -1,112 +1,131 @@ -// @ts-check - -/** @type {import('@docusaurus/types').Config} */ -const config = { - title: 'Procest', - tagline: 'Case management for Nextcloud', - url: 'https://procest.app', - baseUrl: '/', - - // GitHub pages deployment config - organizationName: 'ConductionNL', - projectName: 'procest', - trailingSlash: false, - - onBrokenLinks: 'warn', - onBrokenMarkdownLinks: 'warn', - - i18n: { - defaultLocale: 'en', - locales: ['en', 'nl'], - localeConfigs: { - en: { label: 'English' }, - nl: { label: 'Nederlands' }, - }, - }, - - presets: [ - [ - 'classic', - /** @type {import('@docusaurus/preset-classic').Options} */ - ({ - docs: { - path: './', - exclude: ['**/node_modules/**'], - sidebarPath: require.resolve('./sidebars.js'), - editUrl: - 'https://github.com/ConductionNL/procest/tree/main/docs/', - }, - blog: false, - theme: { - customCss: require.resolve('./src/css/custom.css'), - }, - }), - ], - ], - - themeConfig: - /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ - ({ - navbar: { - title: 'Procest', - logo: { - alt: 'Procest Logo', - src: 'img/logo.svg', - }, - items: [ - { - type: 'docSidebar', - sidebarId: 'tutorialSidebar', - position: 'left', - label: 'Documentation', - }, - { - href: 'https://github.com/ConductionNL/procest', - label: 'GitHub', - position: 'right', - }, - { - type: 'localeDropdown', - position: 'right', - }, - ], - }, - footer: { - style: 'dark', - links: [ - { - title: 'Docs', - items: [ - { - label: 'Documentation', - to: '/docs/FEATURES', - }, - ], - }, - { - title: 'Community', - items: [ - { - label: 'GitHub', - href: 'https://github.com/ConductionNL/procest', - }, - ], - }, - ], - copyright: `Copyright © ${new Date().getFullYear()} for Open Webconcept by Conduction B.V.`, - }, - prism: { - theme: require('prism-react-renderer/themes/github'), - darkTheme: require('prism-react-renderer/themes/dracula'), - }, - mermaid: { - theme: { light: 'default', dark: 'dark' }, - }, - }), - markdown: { - mermaid: true, - }, - themes: ['@docusaurus/theme-mermaid'], -}; - -module.exports = config; +// @ts-check + +/** + * Procest documentation site. + * + * Built on @conduction/docusaurus-preset for brand defaults (tokens, + * theme swizzles for Navbar / Footer, four-locale i18n scaffolding, + * KvK / BTW copyright). Site-specific overrides — locales, sidebar + * path, mermaid theme, custom prism themes, procest-only navbar items — + * are passed through createConfig() opts. + */ + +const { createConfig, baseFooterLinks } = require('@conduction/docusaurus-preset'); + +/* createConfig replaces themes wholesale when `themes:` is passed, so + we re-include the brand theme plugin alongside @docusaurus/theme-mermaid. + Without the brand theme entry the Navbar/Footer swizzles and + brand.css auto-load would silently drop. */ +const BRAND_THEME = require.resolve('@conduction/docusaurus-preset/theme'); + +const config = createConfig({ + title: 'Procest', + tagline: 'Case management for Nextcloud', + url: 'https://procest.conduction.nl', + baseUrl: '/', + + organizationName: 'ConductionNL', + projectName: 'procest', + + /* Procest ships en + nl markdown; the brand preset's default i18n + block (nl/en/de/fr) is replaced wholesale here so we don't pull + in stub locales the docs don't translate yet. */ + i18n: { + defaultLocale: 'en', + locales: ['en', 'nl'], + localeConfigs: { + en: { label: 'English' }, + nl: { label: 'Nederlands' }, + }, + }, + + /* The procest docs source lives at the repo root of `docs/` rather + than under a `docs/` subfolder, so we override the preset's default + `presets:` block to point `docs.path` at './' and disable the blog + plugin. customCss carries procest-specific CSS only — brand tokens + and the theme swizzles are auto-loaded by the brand theme entry in + `themes:` below. */ + presets: [ + [ + 'classic', + { + docs: { + path: './', + /* docs.path: './' makes plugin-content-docs scan every file + in docs/, which collides with plugin-content-pages's own + scan of docs/src/pages/. The same index would then get + processed by both plugins; the docs side runs MDX-ESM + over the JSX expression body and trips on it. Exclude + src/ (pages live there) plus the standard node_modules + bucket. */ + exclude: ['**/node_modules/**', 'src/**'], + sidebarPath: require.resolve('./sidebars.js'), + editUrl: 'https://github.com/ConductionNL/procest/tree/main/docs/', + }, + blog: false, + theme: { + customCss: require.resolve('./src/css/custom.css'), + }, + }, + ], + ], + + themes: [BRAND_THEME, '@docusaurus/theme-mermaid'], + + /* Brand navbar provides locale dropdown + GitHub by default; we + replace items[] with procest's own (Documentation sidebar link, + procest GitHub link, locale dropdown). Object.assign in + createConfig is shallow, so items: replaces wholesale. */ + navbar: { + items: [ + { + type: 'docSidebar', + sidebarId: 'tutorialSidebar', + position: 'left', + label: 'Documentation', + }, + { + href: 'https://github.com/ConductionNL/procest', + label: 'GitHub', + position: 'right', + }, + { type: 'localeDropdown', position: 'right' }, + ], + }, + + /* Per-property footer override (preset 1.2.0+): we pass `links` only, + so the brand `style: 'dark'` and the brand KvK/BTW/IBAN/address + copyright string both inherit unchanged. Single column: the brand + "Conduction" anchor. Site-specific Product / Support columns may + be added later. */ + footer: { + links: [ + ...baseFooterLinks().filter((column) => column.title === 'Conduction'), + ], + }, + + /* Drop the canal-footer's boat-sinking + kade-cyclist mini-games + on this product-page footer (preset 1.3.0+). The static skyline + + canal decoration are kept; the interactive layer goes away. */ + minigames: false, + + /* themeConfig is shallow-merged into the preset's defaults + (colorMode + navbar + footer). prism + mermaid land alongside. */ + themeConfig: { + prism: { + theme: require('prism-react-renderer/themes/github'), + darkTheme: require('prism-react-renderer/themes/dracula'), + }, + mermaid: { + theme: { light: 'default', dark: 'dark' }, + }, + }, +}); + +/* createConfig doesn't pass-through arbitrary top-level fields; assign + markdown directly so it makes it into the final Docusaurus config. */ +config.markdown = { + mermaid: true, +}; + +module.exports = config; diff --git a/docs/package-lock.json b/docs/package-lock.json index 381fe54f..79c82017 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -8,6 +8,7 @@ "name": "procest-docs", "version": "0.0.0", "dependencies": { + "@conduction/docusaurus-preset": "^1.4.3", "@docusaurus/core": "^3.7.0", "@docusaurus/preset-classic": "^3.7.0", "@docusaurus/theme-mermaid": "^3.7.0", @@ -2038,6 +2039,18 @@ "node": ">=0.1.90" } }, + "node_modules/@conduction/docusaurus-preset": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/@conduction/docusaurus-preset/-/docusaurus-preset-1.4.3.tgz", + "integrity": "sha512-64F8A0qal/EfNYJKqsXMGjsOV2X0WYi72plO6MTC/9h60Fz85cMwzEiRpi58e9lloHAc3UBVMuffrzmDimsfwA==", + "license": "EUPL-1.2", + "peerDependencies": { + "@docusaurus/core": "^3.0.0", + "@docusaurus/preset-classic": "^3.0.0", + "react": "^18.0.0", + "react-dom": "^18.0.0" + } + }, "node_modules/@csstools/cascade-layer-name-parser": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/@csstools/cascade-layer-name-parser/-/cascade-layer-name-parser-2.0.5.tgz", diff --git a/docs/package.json b/docs/package.json index 2db33471..4b87d755 100644 --- a/docs/package.json +++ b/docs/package.json @@ -15,6 +15,7 @@ "ci": "npm ci --legacy-peer-deps && npm run build" }, "dependencies": { + "@conduction/docusaurus-preset": "^1.4.3", "@docusaurus/core": "^3.7.0", "@docusaurus/preset-classic": "^3.7.0", "@docusaurus/theme-mermaid": "^3.7.0", diff --git a/docs/src/pages/index.js b/docs/src/pages/index.js index b59ebc9b..4dd1f48c 100644 --- a/docs/src/pages/index.js +++ b/docs/src/pages/index.js @@ -1,40 +1,303 @@ +/** + * Procest landing page. + * + * Composes the brand + from + * @conduction/docusaurus-preset/components, mirroring the connext page + * at sites/www/src/pages/apps/procest.mdx. + * + * Written as .js (not .mdx) because the docs site has the docs plugin + * pointed at `path: './'`, and an MDX file in src/pages/ trips the + * MDX-ESM parser even with the docs plugin's `src/**` exclude. + * Authoring the page in JSX keeps the same component composition. + */ + import React from 'react'; -import clsx from 'clsx'; -import Link from '@docusaurus/Link'; -import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import Layout from '@theme/Layout'; -import HomepageFeatures from '@site/src/components/HomepageFeatures'; +import { + DetailHero, + WidgetShelf, + AppMock, +} from '@conduction/docusaurus-preset/components'; + +const PROCEST_ICON = ( + + + + +); -import styles from './index.module.css'; +const TAGLINE = ( + <> + Case management for VTH (permits, supervision, enforcement) and citizen + processes on your Nextcloud. A workflow + engine plus typed registers plus an audit trail that meets the Wet + kwaliteitsborging and Algemene wet bestuursrecht. + +); + +function WerkvoorraadPanel() { + const rows = [ + { tone: 'var(--c-orange-knvb)', l1: '60%', l2: '40%', av: 'var(--c-mint-300)' }, + { tone: 'var(--c-lavender-300)', l1: '70%', l2: '50%', av: 'var(--c-lavender-300)' }, + { tone: 'var(--c-red-vermillion)', l1: '55%', l2: '45%', av: 'var(--c-orange-knvb)' }, + { tone: 'var(--c-lavender-300)', l1: '65%', l2: '35%', av: 'var(--c-mint-300)' }, + { tone: 'var(--c-lavender-300)', l1: '75%', l2: '50%', av: 'var(--c-forest-300)' }, + ]; + return ( +
+ {rows.map((row, i) => ( +
+ +
+
+
+
+ +
+ ))} +
+ ); +} -function HomepageHeader() { - const {siteConfig} = useDocusaurusContext(); +function DeadlinesPanel() { + const rows = [ + { w: '70%', accent: true }, + { w: '60%', accent: false }, + { w: '55%', accent: false }, + ]; return ( -
-
-

{siteConfig.title}

-

{siteConfig.tagline}

-
- - Documentation - +
+
+
+ 3 +
+
+ this week
-
+ {rows.map((row, i) => ( +
+ +
+
+
+ ))} +
+ ); +} + +function DecisionsPanel() { + const rows = [ + 'Vergunning · verleend', + 'Beschikking · afgewezen', + 'Vergunning · verleend', + 'Wijziging · verleend', + ]; + return ( +
+ {rows.map((_, i) => ( +
+ +
+
+
+
+
+
+ ))} +
); } +const WIDGETS = [ + { + title: 'Werkvoorraad', + desc: 'Active cases for the logged-in case-worker. Late ones in red, the next stage one click away.', + panel: , + }, + { + title: 'Deadlines today', + desc: 'Cases with statutory deadlines hitting today or this week. Pre-warning, then escalation.', + panel: , + }, + { + title: 'Recent decisions', + desc: 'Last decisions issued, with type and recipient. Linked back to the source register row.', + panel: , + }, +]; + export default function Home() { - const {siteConfig} = useDocusaurusContext(); return ( - -
- + title="Procest" + description="Case management for VTH and citizen processes on Nextcloud. Workflow engine plus typed registers plus an audit trail." + > +
+ } + /> + +
); diff --git a/docs/static/CNAME b/docs/static/CNAME index 93c87ce6..e765110a 100644 --- a/docs/static/CNAME +++ b/docs/static/CNAME @@ -1 +1 @@ -procest.app +procest.conduction.nl diff --git a/src/views/settings/Settings.vue b/src/views/settings/Settings.vue index ec040efe..425449bd 100644 --- a/src/views/settings/Settings.vue +++ b/src/views/settings/Settings.vue @@ -2,7 +2,7 @@