Skip to content
This repository has been archived by the owner on Aug 1, 2022. It is now read-only.

add legacy v0 page and "support" folder to docs + add accordion "coming soon" status #106

Open
wants to merge 5 commits into
base: v1-docs
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docs/components/accordion.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: Accordion
description: An accordion is a type of flexible container that allows the user to control the display of content by manually expanding and collapsing the container.
component: accordion
status: "Coming soon"
---

## Anatomy

<Container caption="Note: Image is not to scale" css={{ padding: "$200" }}>
<InlineSVG
path="/img/components/divider/anatomy.svg"
width={353}
height={130}
/>
</Container>

1. Accordion

---
26 changes: 26 additions & 0 deletions docs/support/legacy-v0.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: v0 Design System
description: Information about WPDS legacy v0
---

<BR />

<Box css={{ marginTop: "$200", gridColumn: "1/-1" }}>
<AlertBanner.Root variant="warning">
<AlertBanner.Content>
WPDS v0 is no longer under active development.
</AlertBanner.Content>
</AlertBanner.Root>
</Box>

<BR />

The Washington Post Design system has evolved from its initial form — known as &ldquo;version 0&rdquo; — developed from 2018&mdash;2019.

<BR />

**Version 0 has been deprecated to legacy status and is no longer under active development.**

<BR />

For additional information visit the [WPDS v0 docs site](https://build.washingtonpost.com/v0).
63 changes: 63 additions & 0 deletions pages/support/[slug].js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import { MDXRemote } from "next-mdx-remote";
import dynamic from "next/dynamic";
import { NextSeo } from "next-seo";
import { styled, theme } from "@washingtonpost/wpds-ui-kit";
import MDXStyling from "~/components/Markdown/Styling";

import Header from "~/components/Typography/Headers";

import { getAllPathsBySection, getDocByPathName } from "~/services";
import { getNavigation } from "~/services/getNavigation";

const components = {
...MDXStyling,
CustomComponent: dynamic(() => import("~/components/Typography/Headers")),
};
const P = styled("p", {
color: theme.colors.accessible,
});

export default function Page({ source }) {
return (
<>
<NextSeo
title={`WPDS - ${source.scope.title} | Support`}
description={source.scope.description}
/>
<header className="post-header">
<Header>{source.scope.title}</Header>
{source.scope.description && (
<P className="description">{source.scope.description}</P>
)}
</header>
<article>
<MDXRemote {...source} components={components} />
</article>
</>
);
}

const thisSection = "support";

export const getStaticProps = async ({ params }) => {
const source = await getDocByPathName(`${thisSection}/${params.slug}`);

const navigation = await getNavigation();

return {
props: {
current: params.slug,
navigation,
source,
},
};
};

export const getStaticPaths = async () => {
const paths = await getAllPathsBySection(thisSection);

return {
paths: paths,
fallback: false,
};
};
8 changes: 8 additions & 0 deletions public/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
<loc>https://build.washingtonpost.com</loc>
</url>

<url>
<loc>https://build.washingtonpost.com/components/accordion</loc>
</url>

<url>
<loc>https://build.washingtonpost.com/components/alert-banner</loc>
</url>
Expand Down Expand Up @@ -223,4 +227,8 @@
>https://build.washingtonpost.com/resources/workshops/developer_4-7-22</loc
>
</url>

<url>
<loc>https://build.washingtonpost.com/support/legacy-v0</loc>
</url>
</urlset>