Skip to content

Commit

Permalink
AUTO: Sync components to docs site repo (#495)
Browse files Browse the repository at this point in the history
Co-authored-by: josh-wong <[email protected]>
  • Loading branch information
github-actions[bot] and josh-wong committed Sep 17, 2024
1 parent ca050f9 commit ac59f43
Show file tree
Hide file tree
Showing 3 changed files with 317 additions and 0 deletions.
307 changes: 307 additions & 0 deletions src/components/Cards/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,307 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/* eslint-disable global-require */

import React from 'react';
import clsx from 'clsx';
import Translate from '@docusaurus/Translate';
import Link from '@docusaurus/Link';

const CardsAbout = [
{
// name: '',
// image: '<LINK_TO>.png',
url: {
page: 'overview/',
},
description: (
<Translate id="home.about.description">
Overview
</Translate>
),
},
{
// name: '',
// image: '<LINK_TO>.png',
url: {
page: 'implementation/',
},
description: (
<Translate id="home.about.description">
Implementation
</Translate>
),
},
]

const CardsGettingStarted = [
{
// name: '',
// image: '<LINK_TO>.png',
url: {
page: 'getting-started/',
},
description: (
<Translate id="home.gettingStarted.description">
Getting started with ScalarDL
</Translate>
),
},
{
// name: '',
// image: '<LINK_TO>.png',
url: {
page: 'getting-started-auditor/',
},
description: (
<Translate id="home.gettingStarted.description">
Getting started with ScalarDL Auditor
</Translate>
),
},
]

const CardsSamples = [
{
// name: '',
// image: '<LINK_TO>.png',
url: {
page: 'applications/simple-bank-account/',
},
description: (
<Translate id="home.samples.description">
Bank account application
</Translate>
),
},
{
// name: '',
// image: '<LINK_TO>.png',
url: {
page: 'applications/escrow-payment/',
},
description: (
<Translate id="home.samples.description">
Escrow payment CLI
</Translate>
),
},
]

const CardsDevelop = [
{
// name: 'For database engineers',
// image: '<LINK_TO>.png',
url: {
page: 'schema-loader/',
},
description: (
<Translate id="home.develop.description">
Load a database schema
</Translate>
),
},
{
// name: 'For infrastructure engineers',
// image: '<LINK_TO>.png',
url: {
page: 'ca/caclient-getting-started/',
},
description: (
<Translate id="home.develop.description">
Get a certificate for the network
</Translate>
),
},
]

const CardsDeploy = [
{
// name: '',
// image: '<LINK_TO>.png',
url: {
page: 'scalar-kubernetes/SetupDatabaseForAWS/',
},
description: (
<Translate id="home.deploy.description">
Set up a database for ScalarDL on AWS
</Translate>
),
},
{
// name: '',
// image: '<LINK_TO>.png',
url: {
page: 'scalar-kubernetes/ProductionChecklistForScalarDLLedger/',
},
description: (
<Translate id="home.deploy.description">
See the ScalarDL Ledger production checklist
</Translate>
),
},
]

const CardsManage = [
{
// name: '',
// image: '<LINK_TO>.png',
url: {
page: 'scalar-kubernetes/K8sMonitorGuide/',
},
description: (
<Translate id="home.manage.description">
Monitor ScalarDL in a Kubernetes cluster
</Translate>
),
},
{
// name: '',
// image: '<LINK_TO>.png',
url: {
page: 'scalar-kubernetes/BackupRestoreGuide/',
},
description: (
<Translate id="home.manage.description">
Back up and restore in a Kubernetes environment
</Translate>
),
},
]

const CardsReference = [
{
// name: '',
// image: '<LINK_TO>.png',
url: {
page: 'compatibility/',
},
description: (
<Translate id="home.reference.description">
Compatibility matrix
</Translate>
),
},
{
// name: '',
// image: '<LINK_TO>.png',
url: {
page: 'scalardl-benchmarks/',
},
description: (
<Translate id="home.reference.description">
Benchmarking tools
</Translate>
),
},
];

interface Props {
// name: string;
// image: string;
url: {
page?: string;
};
description: JSX.Element;
}

function Card({ /* name, image,*/ url, description }: Props) {
return (
<div className="col col--6 margin-bottom--lg">
<div className={clsx('card')}>
<div className={clsx('card__image')}>
{/* <Link to={url.page}>
<img src={image}></img>}
</Link> */}
</div>
<Link to={url.page}>
<div className="card__body">
{/* <h3>{name}</h3> */}
<p>{description}</p>
</div>
</Link>
{/* <div className="card__footer">
<div className="button-group button-group--block">
<Link className="button button--secondary" to={url.page}>
<Translate id="button.readMore">Read more</Translate>
</Link>
</div>
</div> */}
</div>
</div>
);
}

export function CardRowAbout(): JSX.Element {
return (
<div className="row">
{CardsAbout.map((special) => (
<Card key={special.name} {...special} />
))}
</div>
);
}

export function CardRowGettingStarted(): JSX.Element {
return (
<div className="row">
{CardsGettingStarted.map((special) => (
<Card key={special.name} {...special} />
))}
</div>
);
}

export function CardRowSamples(): JSX.Element {
return (
<div className="row">
{CardsSamples.map((special) => (
<Card key={special.name} {...special} />
))}
</div>
);
}

export function CardRowDevelop(): JSX.Element {
return (
<div className="row">
{CardsDevelop.map((special) => (
<Card key={special.name} {...special} />
))}
</div>
);
}

export function CardRowDeploy(): JSX.Element {
return (
<div className="row">
{CardsDeploy.map((special) => (
<Card key={special.name} {...special} />
))}
</div>
);
}

export function CardRowManage(): JSX.Element {
return (
<div className="row">
{CardsManage.map((special) => (
<Card key={special.name} {...special} />
))}
</div>
);
}
export function CardRowReference(): JSX.Element {
return (
<div className="row">
{CardsReference.map((special) => (
<Card key={special.name} {...special} />
))}
</div>
);
}
5 changes: 5 additions & 0 deletions src/components/en-us/_warning-license-key-contact.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
:::warning

You need to have a license key (trial license or commercial license) to use {props.product}. If you don't have a license key, please [contact us](https://www.scalar-labs.com/contact-us).

:::
5 changes: 5 additions & 0 deletions src/components/ja-jp/_warning-license-key-contact.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
:::warning

{props.product} を使用するには、ライセンスキー (試用ライセンスまたは商用ライセンス) が必要です。ライセンスキーをお持ちでない場合は、[お問い合わせ](https://www.scalar-labs.com/contact-jp)ください。

:::

0 comments on commit ac59f43

Please sign in to comment.