diff --git a/src/app/page.tsx b/src/app/page.tsx index 1a70e9f..ac6eda1 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,15 +1,103 @@ -import GeneratedImage from "@/components/GeneratedImage"; +import CardGrid from "@/components/CardGrid"; +import ContentNav from "@/components/ContentNav/ContentNav"; +import ErrorBanner from "@/components/ErrorBanner"; +import Switchback from "@/components/Switchback"; export default function Home() { return ( -
-
-

- Create your own watercolor masterpiece -

-
- - +
+ + + 10 Most
+ Popular Models + + } + cards={[ + { + icon: "/models/mistral.webp", + modelAuthor: "stabilityai", + modelName: "japanese-stablelm-instruct-alpha-7b", + externalLink: "https://huggingface.co/mistralai/Mistral-7B-v0.1", + }, + { + icon: "/models/mistral.webp", + modelAuthor: "mistralai", + modelName: "Mistral-7B-v0.1", + externalLink: "https://huggingface.co/mistralai/Mistral-7B-v0.1", + }, + { + icon: "/models/mistral.webp", + modelAuthor: "mistralai", + modelName: "Mistral-7B-v0.1", + externalLink: "https://huggingface.co/mistralai/Mistral-7B-v0.1", + }, + { + icon: "/models/mistral.webp", + modelAuthor: "mistralai", + modelName: "Mistral-7B-v0.1", + externalLink: "https://huggingface.co/mistralai/Mistral-7B-v0.1", + }, + { + icon: "/models/mistral.webp", + modelAuthor: "mistralai", + modelName: "Mistral-7B-v0.1", + externalLink: "https://huggingface.co/mistralai/Mistral-7B-v0.1", + }, + { + icon: "/models/mistral.webp", + modelAuthor: "mistralai", + modelName: "Mistral-7B-v0.1", + externalLink: "https://huggingface.co/mistralai/Mistral-7B-v0.1", + }, + { + icon: "/models/mistral.webp", + modelAuthor: "mistralai", + modelName: "Mistral-7B-v0.1", + externalLink: "https://huggingface.co/mistralai/Mistral-7B-v0.1", + }, + { + icon: "/models/mistral.webp", + modelAuthor: "mistralai", + modelName: "Mistral-7B-v0.1", + externalLink: "https://huggingface.co/mistralai/Mistral-7B-v0.1", + }, + { + icon: "/models/mistral.webp", + modelAuthor: "mistralai", + modelName: "Mistral-7B-v0.1", + externalLink: "https://huggingface.co/mistralai/Mistral-7B-v0.1", + }, + { + icon: "/models/mistral.webp", + modelAuthor: "mistralai", + modelName: "Mistral-7B-v0.1", + externalLink: "https://huggingface.co/mistralai/Mistral-7B-v0.1", + }, + ]} + /> + + 45,515 text gen +
models existed + + } + rightContent={ +

+ We like to say that in AI, a week is a month and a month is a year, + and the "latest and greatest model" changes just as quickly. We + tracked the most popular text-gen models starting in January 2023 to + highlight the rapid rate of change in the AI industry. Click through + time to see how quickly the state-of-the-art changes. +

+ } + />
); } diff --git a/src/components/CardGrid/CardGrid.mdx b/src/components/CardGrid/CardGrid.mdx new file mode 100644 index 0000000..9780cfc --- /dev/null +++ b/src/components/CardGrid/CardGrid.mdx @@ -0,0 +1,13 @@ +import { Canvas, Meta, ArgTypes } from '@storybook/blocks'; + +import * as CardGridStories from './CardGrid.stories'; + + + +# Card Grid + + + +### Props Table + + \ No newline at end of file diff --git a/src/components/CardGrid/CardGrid.stories.tsx b/src/components/CardGrid/CardGrid.stories.tsx new file mode 100644 index 0000000..655c83e --- /dev/null +++ b/src/components/CardGrid/CardGrid.stories.tsx @@ -0,0 +1,91 @@ +import type { Meta, StoryObj } from "@storybook/react"; + +import CardGrid from "."; + +const meta: Meta = { + title: "Components/Card Grid", + component: CardGrid, + decorators: [ + (Story) => ( +
+ +
+ ), + ], +}; + +export default meta; + +type Story = StoryObj; + +export const Default: Story = { + args: { + heading: ( +

+ 10 Most PopularModels +

+ ), + cards: [ + { + icon: "/models/mistral.webp", + modelAuthor: "mistralai", + modelName: "Mistral-7B-v0.1", + externalLink: "https://huggingface.co/mistralai/Mistral-7B-v0.1", + }, + { + icon: "/models/mistral.webp", + modelAuthor: "mistralai", + modelName: "Mistral-7B-v0.1", + externalLink: "https://huggingface.co/mistralai/Mistral-7B-v0.1", + }, + { + icon: "/models/mistral.webp", + modelAuthor: "mistralai", + modelName: "Mistral-7B-v0.1", + externalLink: "https://huggingface.co/mistralai/Mistral-7B-v0.1", + }, + { + icon: "/models/mistral.webp", + modelAuthor: "mistralai", + modelName: "Mistral-7B-v0.1", + externalLink: "https://huggingface.co/mistralai/Mistral-7B-v0.1", + }, + { + icon: "/models/mistral.webp", + modelAuthor: "mistralai", + modelName: "Mistral-7B-v0.1", + externalLink: "https://huggingface.co/mistralai/Mistral-7B-v0.1", + }, + { + icon: "/models/mistral.webp", + modelAuthor: "mistralai", + modelName: "Mistral-7B-v0.1", + externalLink: "https://huggingface.co/mistralai/Mistral-7B-v0.1", + }, + { + icon: "/models/mistral.webp", + modelAuthor: "mistralai", + modelName: "Mistral-7B-v0.1", + externalLink: "https://huggingface.co/mistralai/Mistral-7B-v0.1", + }, + { + icon: "/models/mistral.webp", + modelAuthor: "mistralai", + modelName: "Mistral-7B-v0.1", + externalLink: "https://huggingface.co/mistralai/Mistral-7B-v0.1", + }, + { + icon: "/models/mistral.webp", + modelAuthor: "mistralai", + modelName: "Mistral-7B-v0.1", + externalLink: "https://huggingface.co/mistralai/Mistral-7B-v0.1", + }, + { + icon: "/models/mistral.webp", + modelAuthor: "mistralai", + modelName: "Mistral-7B-v0.1", + externalLink: "https://huggingface.co/mistralai/Mistral-7B-v0.1", + }, + ], + }, +}; diff --git a/src/components/CardGrid/CardGrid.tsx b/src/components/CardGrid/CardGrid.tsx new file mode 100644 index 0000000..b2aaa89 --- /dev/null +++ b/src/components/CardGrid/CardGrid.tsx @@ -0,0 +1,25 @@ +import Image from "next/image"; +import { FC, ReactElement } from "react"; +import ModelCard, { ModelCardProps } from "../Cards/ModelCard/ModelCard"; + +interface CardGridProps { + /** Heading above grid */ + heading?: ReactElement; + /** Array of cards to display */ + cards: ModelCardProps[]; +} + +const CardGrid: FC = ({ heading, cards }) => { + return ( +
+ {heading &&
{heading}
} +
+ {cards?.map((card) => ( + + ))} +
+
+ ); +}; + +export default CardGrid; diff --git a/src/components/CardGrid/index.ts b/src/components/CardGrid/index.ts new file mode 100644 index 0000000..8b57ad2 --- /dev/null +++ b/src/components/CardGrid/index.ts @@ -0,0 +1,2 @@ +import CardGrid from "./CardGrid"; +export default CardGrid; diff --git a/src/components/Cards/ModelCard/ModelCard.tsx b/src/components/Cards/ModelCard/ModelCard.tsx index 01fd19d..3666a78 100644 --- a/src/components/Cards/ModelCard/ModelCard.tsx +++ b/src/components/Cards/ModelCard/ModelCard.tsx @@ -1,6 +1,6 @@ import { FC } from "react"; -interface ModelCardProps { +export interface ModelCardProps { /** Image url for model icon */ icon: string; /** Model modelAuthor */ diff --git a/src/components/ContentNav/ContentNav.mdx b/src/components/ContentNav/ContentNav.mdx new file mode 100644 index 0000000..3ad41c1 --- /dev/null +++ b/src/components/ContentNav/ContentNav.mdx @@ -0,0 +1,13 @@ +import { Canvas, Meta, ArgTypes } from '@storybook/blocks'; + +import * as ContentNavStories from './ContentNav.stories'; + + + +# Content Nav + + + +### Props Table + + \ No newline at end of file diff --git a/src/components/ContentNav/ContentNav.stories.tsx b/src/components/ContentNav/ContentNav.stories.tsx new file mode 100644 index 0000000..74614d8 --- /dev/null +++ b/src/components/ContentNav/ContentNav.stories.tsx @@ -0,0 +1,27 @@ +import type { Meta, StoryObj } from "@storybook/react"; + +import ContentNav from "."; + +const meta: Meta = { + title: "Components/Content Nav", + component: ContentNav, + decorators: [ + (Story) => ( +
+ +
+ ), + ], +}; + +export default meta; + +type Story = StoryObj; + +export const Default: Story = { + args: { + prevText: "Jan 24, 2023", + current: "January 25, 2023", + nextText: "Jan 26, 2023", + }, +}; diff --git a/src/components/ContentNav/ContentNav.tsx b/src/components/ContentNav/ContentNav.tsx new file mode 100644 index 0000000..cbee5e1 --- /dev/null +++ b/src/components/ContentNav/ContentNav.tsx @@ -0,0 +1,37 @@ +import Image from "next/image"; +import { FC } from "react"; + +interface ContentNavProps { + /** Text for previous button */ + prevText?: string; + /** Text for next button */ + nextText?: string; + /** Text for current content */ + current?: string; +} + +const ContentNav: FC = ({ + prevText = "Previous", + nextText = "Next", + current, +}) => { + const Chevron = ( + + ); + return ( +
+ + {current &&
{current}
} + + {current &&
{current}
} +
+ ); +}; + +export default ContentNav; diff --git a/src/components/ContentNav/index.ts b/src/components/ContentNav/index.ts new file mode 100644 index 0000000..dbb71a5 --- /dev/null +++ b/src/components/ContentNav/index.ts @@ -0,0 +1,2 @@ +import ContentNav from "./ContentNav"; +export default ContentNav; diff --git a/src/components/ErrorBanner/ErrorBanner.tsx b/src/components/ErrorBanner/ErrorBanner.tsx index f51c905..27b3a86 100644 --- a/src/components/ErrorBanner/ErrorBanner.tsx +++ b/src/components/ErrorBanner/ErrorBanner.tsx @@ -1,27 +1,27 @@ import { FC } from "react"; interface ErrorBannerProps { - bannerText: string + bannerText: string; } const ErrorBanner: FC = ({ bannerText }) => { - return ( - - - ) + return ( + + ); }; export default ErrorBanner; diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx index 5109f63..ad9ec28 100644 --- a/src/components/Header/Header.tsx +++ b/src/components/Header/Header.tsx @@ -1,21 +1,39 @@ import Image from "next/image"; +import Select from "../Select"; const Header = () => { return ( -
+
- - powered by - OctoAI Icon - +