Files
newsui/packages/docs/app/page.tsx
T
sunzhongyi f3e6b95be9 -
2026-05-19 21:09:56 +08:00

103 lines
3.9 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
'use client';
import { Demo } from '@/components/Demo';
import { Layout, Section, Article } from '@newspaperui/components';
import { Headline, BodyText } from '@newspaperui/components';
export default function HomePage() {
return (
<div className="prose prose-lg max-w-none">
<h1>NewspaperUI</h1>
<p className="text-xl text-gray-600">
InDesign 24
</p>
<h2></h2>
<p>
NewspaperUI InDesign Web
</p>
<h2></h2>
<ul>
<li><strong>24 </strong> - </li>
<li><strong></strong> - </li>
<li><strong></strong> - High/Medium/Low </li>
<li><strong></strong> - CSS Variables</li>
<li><strong></strong> - 12-16 </li>
<li><strong> Layer</strong> - 广</li>
</ul>
<h2></h2>
<h3></h3>
<pre className="bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto">
<code>pnpm add @newspaperui/components @newspaperui/theme</code>
</pre>
<h3>使</h3>
<Demo
title="简单的报纸布局"
description="使用 Layout 和 Section 创建基础的栅格布局"
code={`import { Layout, Section, Article, Headline, BodyText } from '@newspaperui/components';
function MyPage() {
return (
<Layout columns={24}>
<Section columns={8}>
<Article span={8}>
<Headline weight="High">主要新闻标题</Headline>
<BodyText>这是一篇重要的新闻内容...</BodyText>
</Article>
</Section>
<Section columns={16}>
<Article span={8}>
<Headline weight="Medium">次要新闻</Headline>
<BodyText>这是另一篇新闻...</BodyText>
</Article>
<Article span={8}>
<Headline weight="Medium">更多新闻</Headline>
<BodyText>更多内容...</BodyText>
</Article>
</Section>
</Layout>
);
}`}
>
<Layout columns={24}>
<Section columns={8}>
<Article span={8}>
<Headline weight="High"></Headline>
<BodyText>使 High </BodyText>
</Article>
</Section>
<Section columns={16}>
<Article span={8}>
<Headline weight="Medium"></Headline>
<BodyText>使 Medium </BodyText>
</Article>
<Article span={8}>
<Headline weight="Medium"></Headline>
<BodyText></BodyText>
</Article>
</Section>
</Layout>
</Demo>
<h2></h2>
<p>
</p>
<ul>
<li><a href="/grid-system"></a> - 24 </li>
<li><a href="/components/article"></a> - ArticleLayer </li>
<li><a href="/text"></a> - </li>
<li><a href="/theme"></a> - </li>
<li><a href="/examples/spanning"></a> - </li>
</ul>
</div>
);
}