diff --git a/docusaurus.config.js b/docusaurus.config.js index 6251ecd..18ffc37 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -76,6 +76,11 @@ const config = { position: 'right', label: 'Docs', }, + { + href: 'https://concerto-playground.accordproject.org', + label: 'Playground', + position: 'right', + }, { type: 'doc', docId: 'contributing', diff --git a/src/components/HomepageFeatures/index.js b/src/components/HomepageFeatures/index.js index aef7939..b6caa1c 100644 --- a/src/components/HomepageFeatures/index.js +++ b/src/components/HomepageFeatures/index.js @@ -3,31 +3,62 @@ import clsx from 'clsx'; import useBaseUrl from '@docusaurus/useBaseUrl'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import GitHubButton from 'react-github-btn'; -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; import CodeBlock from '@theme/CodeBlock'; -import { Mermaid } from '../mermaid'; -import samples from '../samples'; - import styles from './styles.module.css'; +const PLAYGROUND_URL = 'https://concerto-playground.accordproject.org'; + +const startPaths = [ + { + title: 'Try the Playground', + description: 'Write a model and see it compile live — no install.', + href: PLAYGROUND_URL, + target: '_blank', + featured: true, + }, + { + title: 'Learn the language', + description: 'Start with the basics of modeling in Concerto.', + href: '/docs/design/specification/model-introduction', + target: '_self', + }, + { + title: 'Use the SDK', + description: 'Parse, validate and generate code from TypeScript.', + href: '/docs/category/using-the-api', + target: '_self', + }, + { + title: 'Use the CLI', + description: 'Validate and compile models from your terminal.', + href: '/docs/tutorials/quick-start', + target: '_self', + }, +]; + +function PathCard({title, description, href, target, featured}) { + const resolvedHref = useBaseUrl(href); + return ( + + {featured && Recommended} +

{title}

+

{description}

+
+ ); +} + function HomeCallToAction() { return ( - <> - - Learn More - - - Quick Start Tutorial - - +
+ {startPaths.map((path, idx) => ( + + ))} +
); } @@ -37,7 +68,6 @@ function HomepageHeader() { return (
-
@@ -106,22 +136,6 @@ Bootstrap your models from existing - - - - {samples.typescript} - - - {samples.jsonSchema} - - - ) -} - /*Adjust the Svg property with current files*/ const FeatureList = [ { @@ -174,7 +188,11 @@ function Heading({text}) { function ActionButton({href, type = 'primary', target, children}) { return ( - + {children} ); @@ -190,17 +208,6 @@ function TextColumn({title, text, moreContent}) { ); } -function TwitterButton({accountName}) { - return ( - -
- Follow @{accountName} - - ); -} - function GitHubStarButton() { return (
@@ -268,16 +275,44 @@ function SchemasPeople() { function CrossPlatform() { return (
- + +
+
+ ); +} + +function PlaygroundSection() { + return ( +
+
+ +

+ No install required. Write a .cto model and watch it + compile live to TypeScript, Java, Go, JSON Schema, GraphQL, Protobuf + and more — everything runs client-side in your browser. +

+
+
+ + concerto-playground.accordproject.org +
+