import * as React from 'react'; import { startCase } from 'es-toolkit/string'; import NextLink from 'next/link'; import AspectRatio from '@mui/joy/AspectRatio'; import Box from '@mui/joy/Box'; import Card from '@mui/joy/Card'; import CardContent from '@mui/joy/CardContent'; import CardOverflow from '@mui/joy/CardOverflow'; import Link from '@mui/joy/Link'; import List from '@mui/joy/List'; import Button from '@mui/joy/Button'; import Typography from '@mui/joy/Typography'; import SvgIcon from '@mui/joy/SvgIcon'; import Visibility from '@mui/icons-material/Visibility'; import CodeRoundedIcon from '@mui/icons-material/CodeRounded'; import codeSandbox from 'docs/src/modules/sandbox/CodeSandbox'; import sourceJoyTemplates from 'docs/src/modules/joy/sourceJoyTemplates'; /** * To display a template on the site: * - Create a folder next to this file. * - The folder should have `App.(js|tsx)` * - The name of the folder will be used as the url and title */ const authors = { MUI: { name: 'MUI', link: 'https://x.com/MUI_hq', }, SteveEberger: { name: 'Steve Ernstberger', link: 'https://x.com/SteveEberger', }, }; const templates = [ { name: 'order-dashboard', author: authors.MUI, design: { name: 'Untitled UI', link: 'https://www.figma.com/community/file/1020079203222518115/untitled-ui-free-figma-ui-kit-and-design-system-v2-0', }, }, { name: 'profile-dashboard', author: authors.MUI, design: { name: 'Untitled UI', link: 'https://www.figma.com/community/file/1020079203222518115/untitled-ui-free-figma-ui-kit-and-design-system-v2-0', }, }, { name: 'messages', author: authors.SteveEberger, design: { name: 'Untitled UI', link: 'https://www.figma.com/community/file/1020079203222518115/untitled-ui-free-figma-ui-kit-and-design-system-v2-0', }, }, { name: 'sign-in-side', author: authors.MUI, }, { name: 'rental-dashboard', author: authors.SteveEberger, design: { name: 'Untitled UI', link: 'https://www.figma.com/community/file/1020079203222518115/untitled-ui-free-figma-ui-kit-and-design-system-v2-0', }, }, { name: 'team', author: authors.MUI, }, { name: 'files', author: authors.MUI, }, { name: 'email', author: authors.MUI, }, { name: 'framesx-web-blocks', author: authors.MUI, design: { name: 'Frames X', link: 'https://framesxdesign.com/', }, }, ]; export default function TemplateCollection() { const joyTemplates = sourceJoyTemplates(); return ( {templates.map((template) => { const item = joyTemplates.map.get(template.name); return ( ({ background: 'var(--template-name)', [theme.getColorSchemeSelector('dark')]: { background: 'var(--template-name-dark)', }, })} style={{ '--template-name': `center/cover no-repeat url(/static/screenshots/joy-ui/getting-started/templates/${template.name}.jpg)`, '--template-name-dark': `center/cover no-repeat url(/static/screenshots/joy-ui/getting-started/templates/${template.name}-dark.jpg)`, }} /> ({ display: 'flex', alignItems: 'center', justifyContent: 'center', flexDirection: 'column', gap: 1, transition: '0.15s', position: 'absolute', width: '100%', height: '100%', opacity: 0, top: 0, left: 0, bgcolor: `rgba(${theme.vars.palette.primary.lightChannel} / 0.3)`, backdropFilter: 'blur(4px)', '&:hover, &:focus': { opacity: 1, }, [theme.getColorSchemeSelector('dark')]: { bgcolor: `rgba(${theme.vars.palette.primary.darkChannel} / 0.3)`, }, }), ]} > View live preview {startCase(template.name)} {template.author && ( Built by{' '} {template.author.name} )} {template.design && ( Designed by{' '} {template.design.name} )} ); })} ); }