- New TinaCMS collection 'pages' with 15 block templates: Hero, TextBlock, TwoColumn, Features, Stats, Testimonials, Team, FAQ, CTABanner, Video, Gallery, Pricing, Timeline, Divider, ContactForm - Each page has published toggle (unpublished → 404) - Route /p/:slug renders dynamic pages from content/pages/*.json - scripts/copy-pages.mjs copies content/pages → public/pages at build - prerender.mjs extended to prerender published pages - All blocks styled with design tokens + Framer Motion animations Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
28 lines
724 B
TypeScript
28 lines
724 B
TypeScript
import { TinaMarkdown } from 'tinacms/dist/rich-text';
|
|
import { motion } from 'framer-motion';
|
|
import './BlockTextBlock.css';
|
|
|
|
interface Props {
|
|
content?: unknown;
|
|
width?: 'full' | 'narrow';
|
|
}
|
|
|
|
const BlockTextBlock: React.FC<Props> = ({ content, width = 'full' }) => {
|
|
if (!content) return null;
|
|
|
|
return (
|
|
<motion.section
|
|
className={`block-text-block block-text-block--${width}`}
|
|
initial={{ opacity: 0, y: 30 }}
|
|
whileInView={{ opacity: 1, y: 0 }}
|
|
viewport={{ once: true }}
|
|
transition={{ duration: 0.5 }}
|
|
>
|
|
<div className="block-text-block-inner">
|
|
<TinaMarkdown content={content as any} />
|
|
</div>
|
|
</motion.section>
|
|
);
|
|
};
|
|
|
|
export default BlockTextBlock;
|