This commit is contained in:
sunzhongyi
2026-05-19 21:09:56 +08:00
commit f3e6b95be9
78 changed files with 10099 additions and 0 deletions
@@ -0,0 +1,192 @@
'use client';
import { Demo } from '@/components/Demo';
import { PropsTable } from '@/components/PropsTable';
import { Layout, Section, Article, Headline, BodyText, Subhead } from '@newspaperui/components';
export default function ArticlePage() {
return (
<div className="prose prose-lg max-w-none">
<h1>Article </h1>
<p className="text-xl text-gray-600">
Article
</p>
<h2></h2>
<p>
<code>Article</code>
span
</p>
<h2>API </h2>
<PropsTable
data={[
{
name: 'span',
type: 'number',
required: true,
description: '文章占据的列数,必须 ≤ 所在 Section 的 columns',
},
{
name: 'priority',
type: 'number',
default: '0',
description: '优先级,数值越大优先级越高,影响排序',
},
{
name: 'weight',
type: '"High" | "Medium" | "Low"',
default: '"Medium"',
description: '视觉权重,影响内部文本组件的默认样式',
},
{
name: 'breakable',
type: 'boolean',
default: 'true',
description: '是否允许在此处分页断开',
},
{
name: 'className',
type: 'string',
description: '自定义 CSS 类名',
},
{
name: 'children',
type: 'React.ReactNode',
required: true,
description: '文章内容',
},
]}
/>
<h2></h2>
<Demo
title="单列文章"
description="创建一个占据 8 列的文章"
code={`<Layout columns={24}>
<Section columns={24}>
<Article span={8}>
<Headline weight="High">文章标题</Headline>
<Subhead>副标题说明</Subhead>
<BodyText>
这是文章的正文内容。Article 组件提供了内容容器,
可以包含多种文本和媒体组件。
</BodyText>
</Article>
</Section>
</Layout>`}
>
<Layout columns={24}>
<Section columns={24}>
<Article span={8}>
<Headline weight="High"></Headline>
<Subhead></Subhead>
<BodyText>
Article
</BodyText>
</Article>
</Section>
</Layout>
</Demo>
<h2></h2>
<p>
span span
span
</p>
<Demo
title="多列文章并排"
description="在 24 列布局中创建三个 8 列的文章"
code={`<Layout columns={24}>
<Section columns={24}>
<Article span={8}>
<Headline weight="High">主要文章</Headline>
<BodyText>占据 8 列的主要内容</BodyText>
</Article>
<Article span={8}>
<Headline weight="Medium">次要文章</Headline>
<BodyText>占据 8 列的次要内容</BodyText>
</Article>
<Article span={8}>
<Headline weight="Medium">更多内容</Headline>
<BodyText>占据 8 列的更多内容</BodyText>
</Article>
</Section>
</Layout>`}
>
<Layout columns={24}>
<Section columns={24}>
<Article span={8}>
<Headline weight="High"></Headline>
<BodyText> 8 使 High </BodyText>
</Article>
<Article span={8}>
<Headline weight="Medium"></Headline>
<BodyText> 8 使 Medium </BodyText>
</Article>
<Article span={8}>
<Headline weight="Medium"></Headline>
<BodyText> 8 </BodyText>
</Article>
</Section>
</Layout>
</Demo>
<h2></h2>
<Demo
title="混合宽度布局"
description="组合不同宽度的文章实现复杂布局"
code={`<Layout columns={24}>
<Section columns={24}>
<Article span={16}>
<Headline weight="High">宽文章 (16 列)</Headline>
<BodyText>
这是一篇占据 16 列的宽文章,适合放置重要内容或长篇文章。
</BodyText>
</Article>
<Article span={8}>
<Headline weight="Low">窄文章 (8 列)</Headline>
<BodyText>这是占据 8 列的窄文章,适合侧边栏或简短内容。</BodyText>
</Article>
</Section>
</Layout>`}
>
<Layout columns={24}>
<Section columns={24}>
<Article span={16}>
<Headline weight="High"> (16 )</Headline>
<BodyText>
16
</BodyText>
</Article>
<Article span={8}>
<Headline weight="Low"> (8 )</Headline>
<BodyText> 8 </BodyText>
</Article>
</Section>
</Layout>
</Demo>
<h2>使</h2>
<ul>
<li>使 12-16 </li>
<li>使 6-8 </li>
<li> Section Article span Section.columns</li>
<li>使 priority </li>
<li> weight </li>
<li>使 span </li>
</ul>
<h2></h2>
<ul>
<li>Article span Section columns </li>
<li> Section Article span Section.columns</li>
<li>Article </li>
<li>breakable </li>
</ul>
</div>
);
}
+199
View File
@@ -0,0 +1,199 @@
'use client';
import { Demo } from '@/components/Demo';
import { PropsTable } from '@/components/PropsTable';
import { Layout, Section, Article, Layer, Headline, BodyText } from '@newspaperui/components';
export default function LayerPage() {
return (
<div className="prose prose-lg max-w-none">
<h1>Layer </h1>
<p className="text-xl text-gray-600">
Layer 广
</p>
<h2></h2>
<p>
<code>Layer</code> 使
广
</p>
<h2>API </h2>
<PropsTable
data={[
{
name: 'position',
type: '"absolute" | "fixed" | "sticky"',
default: '"absolute"',
description: 'CSS position 属性',
},
{
name: 'top',
type: 'string | number',
description: '距离顶部的距离',
},
{
name: 'right',
type: 'string | number',
description: '距离右侧的距离',
},
{
name: 'bottom',
type: 'string | number',
description: '距离底部的距离',
},
{
name: 'left',
type: 'string | number',
description: '距离左侧的距离',
},
{
name: 'zIndex',
type: 'number',
default: '10',
description: 'z-index 层级',
},
{
name: 'className',
type: 'string',
description: '自定义 CSS 类名',
},
{
name: 'children',
type: 'React.ReactNode',
required: true,
description: '浮动层内容',
},
]}
/>
<h2></h2>
<Demo
title="浮动拉引"
description="在文章旁边添加浮动的拉引文字"
code={`<Layout columns={24}>
<Section columns={24}>
<div style={{ position: 'relative', minHeight: '300px' }}>
<Article span={16}>
<Headline weight="High">主要文章</Headline>
<BodyText>
这是一篇主要文章的内容。旁边有一个浮动的拉引,
用于突出显示文章中的重要引用或观点。
</BodyText>
</Article>
<Layer position="absolute" top="20px" right="20px" zIndex={10}>
<div className="bg-yellow-50 border-l-4 border-yellow-400 p-4 max-w-xs">
<p className="text-lg font-semibold text-gray-800">
"这是一段重要的引用文字"
</p>
</div>
</Layer>
</div>
</Section>
</Layout>`}
>
<Layout columns={24}>
<Section columns={24}>
<div style={{ position: 'relative', minHeight: '300px' }}>
<Article span={16}>
<Headline weight="High"></Headline>
<BodyText>
Layer 使
</BodyText>
</Article>
<Layer position="absolute" top="20px" right="20px" zIndex={10}>
<div className="bg-yellow-50 border-l-4 border-yellow-400 p-4 max-w-xs">
<p className="text-lg font-semibold text-gray-800">
"这是一段重要的引用文字"
</p>
</div>
</Layer>
</div>
</Section>
</Layout>
</Demo>
<h2>广</h2>
<Demo
title="侧边浮动广告"
description="在页面侧边添加固定位置的广告"
code={`<Layout columns={24}>
<Section columns={24}>
<div style={{ position: 'relative', minHeight: '400px' }}>
<Article span={18}>
<Headline weight="High">文章内容</Headline>
<BodyText>
这是文章的主要内容区域。右侧有一个浮动的广告位,
使用 Layer 组件实现。
</BodyText>
</Article>
<Layer position="absolute" top="0" right="0" zIndex={5}>
<div className="bg-blue-100 border border-blue-300 p-6 w-48">
<p className="text-center font-bold text-blue-900">广告位</p>
<p className="text-sm text-blue-700 mt-2">300x250</p>
</div>
</Layer>
</div>
</Section>
</Layout>`}
>
<Layout columns={24}>
<Section columns={24}>
<div style={{ position: 'relative', minHeight: '400px' }}>
<Article span={18}>
<Headline weight="High"></Headline>
<BodyText>
广
使 Layer 广
</BodyText>
<BodyText>
Layer
</BodyText>
</Article>
<Layer position="absolute" top="0" right="0" zIndex={5}>
<div className="bg-blue-100 border border-blue-300 p-6 w-48 text-center">
<p className="font-bold text-blue-900">广</p>
<p className="text-sm text-blue-700 mt-2">300x250</p>
</div>
</Layer>
</div>
</Section>
</Layout>
</Demo>
<h2>使</h2>
<ul>
<li>Layer <code>position: relative</code></li>
<li>使 zIndex Layer </li>
<li></li>
<li> Layer</li>
<li>使 <code>position="fixed"</code> </li>
<li>使 <code>position="sticky"</code> </li>
</ul>
<h2></h2>
<ul>
<li>Layer Section Article </li>
<li> Layer </li>
<li> Layer </li>
<li> Layer 访</li>
<li> Layer </li>
</ul>
<h2></h2>
<ul>
<li> - </li>
<li>广 - 广</li>
<li> - </li>
<li> - 使 fixed </li>
<li> - 使 sticky </li>
</ul>
</div>
);
}
+271
View File
@@ -0,0 +1,271 @@
'use client';
import { Demo } from '@/components/Demo';
import { PropsTable } from '@/components/PropsTable';
import { Layout, Section, Article, Headline, BodyText } from '@newspaperui/components';
import { Image, Figure } from '@newspaperui/components';
export default function MediaPage() {
return (
<div className="prose prose-lg max-w-none">
<h1></h1>
<p className="text-xl text-gray-600">
NewspaperUI ImageFigure Video
</p>
<h2>Image </h2>
<p>
<code>Image</code>
</p>
<PropsTable
data={[
{
name: 'src',
type: 'string',
required: true,
description: '图片 URL',
},
{
name: 'alt',
type: 'string',
required: true,
description: '图片替代文本(无障碍)',
},
{
name: 'span',
type: 'number',
description: '图片占据的列数',
},
{
name: 'aspectRatio',
type: 'string',
default: '"16/9"',
description: '图片宽高比',
},
{
name: 'objectFit',
type: '"cover" | "contain" | "fill"',
default: '"cover"',
description: '图片填充方式',
},
{
name: 'className',
type: 'string',
description: '自定义 CSS 类名',
},
]}
/>
<Demo
title="基础图片"
description="在文章中插入图片"
code={`<Article span={12}>
<Headline weight="High">带图片的文章</Headline>
<Image
src="https://via.placeholder.com/800x600"
alt="示例图片"
span={12}
/>
<BodyText>图片下方的文字说明</BodyText>
</Article>`}
>
<Layout columns={24}>
<Section columns={24}>
<Article span={12}>
<Headline weight="High"></Headline>
<Image
src="https://via.placeholder.com/800x600"
alt="示例图片"
span={12}
/>
<BodyText></BodyText>
</Article>
</Section>
</Layout>
</Demo>
<h2>Figure </h2>
<p>
<code>Figure</code>
</p>
<PropsTable
data={[
{
name: 'src',
type: 'string',
required: true,
description: '图片 URL',
},
{
name: 'alt',
type: 'string',
required: true,
description: '图片替代文本',
},
{
name: 'caption',
type: 'string',
required: true,
description: '图注文字',
},
{
name: 'span',
type: 'number',
description: 'Figure 占据的列数',
},
{
name: 'aspectRatio',
type: 'string',
default: '"16/9"',
description: '图片宽高比',
},
{
name: 'className',
type: 'string',
description: '自定义 CSS 类名',
},
]}
/>
<Demo
title="带图注的图片"
description="使用 Figure 组件添加图注"
code={`<Article span={12}>
<Headline weight="High">新闻标题</Headline>
<Figure
src="https://via.placeholder.com/800x600"
alt="新闻配图"
caption="这是图片的说明文字,描述图片内容"
span={12}
/>
<BodyText>新闻正文内容...</BodyText>
</Article>`}
>
<Layout columns={24}>
<Section columns={24}>
<Article span={12}>
<Headline weight="High"></Headline>
<Figure
src="https://via.placeholder.com/800x600"
alt="新闻配图"
caption="这是图片的说明文字,描述图片内容"
span={12}
/>
<BodyText>...</BodyText>
</Article>
</Section>
</Layout>
</Demo>
<h2>Video </h2>
<p>
<code>Video</code>
</p>
<PropsTable
data={[
{
name: 'src',
type: 'string',
required: true,
description: '视频 URL',
},
{
name: 'poster',
type: 'string',
description: '视频封面图片 URL',
},
{
name: 'span',
type: 'number',
description: '视频占据的列数',
},
{
name: 'controls',
type: 'boolean',
default: 'true',
description: '是否显示控制条',
},
{
name: 'autoPlay',
type: 'boolean',
default: 'false',
description: '是否自动播放',
},
{
name: 'loop',
type: 'boolean',
default: 'false',
description: '是否循环播放',
},
{
name: 'muted',
type: 'boolean',
default: 'false',
description: '是否静音',
},
{
name: 'className',
type: 'string',
description: '自定义 CSS 类名',
},
]}
/>
<Demo
title="嵌入视频"
description="在文章中嵌入视频内容"
code={`<Article span={16}>
<Headline weight="High">视频新闻</Headline>
<Video
src="https://example.com/video.mp4"
poster="https://via.placeholder.com/800x450"
span={16}
controls
/>
<BodyText>视频相关的文字说明...</BodyText>
</Article>`}
>
<Layout columns={24}>
<Section columns={24}>
<Article span={16}>
<Headline weight="High"></Headline>
<div className="bg-gray-200 aspect-video flex items-center justify-center">
<p className="text-gray-600"></p>
</div>
<BodyText>...</BodyText>
</Article>
</Section>
</Layout>
</Demo>
<h2>使</h2>
<ul>
<li>使 Image </li>
<li>使 Figure </li>
<li>使 Video </li>
<li> span </li>
<li> aspectRatio </li>
<li> alt </li>
<li></li>
</ul>
<h2></h2>
<p>
</p>
<h2></h2>
<ul>
<li>使WebPAVIF</li>
<li></li>
<li>使lazy loading</li>
<li></li>
<li>使 CDN </li>
</ul>
</div>
);
}
@@ -0,0 +1,251 @@
'use client';
import { Demo } from '@/components/Demo';
import { Layout, Section, Article } from '@newspaperui/components';
import { Headline, BodyText } from '@newspaperui/components';
export default function ResponsivePage() {
return (
<div className="prose prose-lg max-w-none">
<h1></h1>
<p className="text-xl text-gray-600">
NewspaperUI
</p>
<h2></h2>
<p>
NewspaperUI
</p>
<div className="bg-blue-50 border-l-4 border-blue-400 p-4 my-6">
<h3 className="text-lg font-semibold text-blue-900 mt-0"></h3>
<ul className="mb-0 text-blue-800">
<li><strong>1024px</strong>: 24 </li>
<li><strong>768px-1023px</strong>: 16 </li>
<li><strong>&lt;768px</strong>: 12 </li>
</ul>
</div>
<h2></h2>
<p>
</p>
<Demo
title="响应式三栏布局"
description="大屏显示三栏,中屏显示两栏,小屏显示单栏"
code={`<Layout columns={24}>
<Section columns={24}>
{/* 大屏: 8+8+8, 中屏: 12+12, 小屏: 24 */}
<Article span={8} className="lg:span-8 md:span-12 sm:span-24">
<Headline weight="Medium">第一栏</Headline>
<BodyText>内容自动适应屏幕宽度</BodyText>
</Article>
<Article span={8} className="lg:span-8 md:span-12 sm:span-24">
<Headline weight="Medium">第二栏</Headline>
<BodyText>响应式布局</BodyText>
</Article>
<Article span={8} className="lg:span-8 md:span-12 sm:span-24">
<Headline weight="Medium">第三栏</Headline>
<BodyText>自动换行</BodyText>
</Article>
</Section>
</Layout>`}
>
<Layout columns={24}>
<Section columns={24}>
<Article span={8}>
<Headline weight="Medium"></Headline>
<BodyText>
</BodyText>
</Article>
<Article span={8}>
<Headline weight="Medium"></Headline>
<BodyText>
</BodyText>
</Article>
<Article span={8}>
<Headline weight="Medium"></Headline>
<BodyText>
NewspaperUI
</BodyText>
</Article>
</Section>
</Layout>
</Demo>
<h2></h2>
<p>
</p>
<Demo
title="主次内容自适应"
description="大屏 16+8,中屏 12+12,小屏全宽堆叠"
code={`<Layout columns={24}>
<Section columns={24}>
<Article span={16}>
<Headline weight="High">主要内容</Headline>
<BodyText weight="High">
主要内容在大屏占据 16 列,在中屏占据 12 列,
在小屏占据全宽。
</BodyText>
</Article>
<Article span={8}>
<Headline weight="Low">侧边栏</Headline>
<BodyText weight="Low">
侧边栏在大屏占据 8 列,在中屏占据 12 列,
在小屏移到主内容下方。
</BodyText>
</Article>
</Section>
</Layout>`}
>
<Layout columns={24}>
<Section columns={24}>
<Article span={16}>
<Headline weight="High"></Headline>
<BodyText weight="High">
</BodyText>
<BodyText>
</BodyText>
</Article>
<Article span={8}>
<Headline weight="Low"></Headline>
<BodyText weight="Low">
1<br />
2<br />
3<br />
...
</BodyText>
</Article>
</Section>
</Layout>
</Demo>
<h2></h2>
<p>
NewspaperUI
</p>
<Demo
title="移动优先布局"
description="小屏优化的单栏布局"
>
<Layout columns={24}>
<Section columns={24}>
<Article span={24}>
<Headline weight="High"></Headline>
<BodyText>
</BodyText>
</Article>
</Section>
</Layout>
</Demo>
<h2></h2>
<p>
</p>
<Demo
title="响应式媒体"
description="图片自动适应容器宽度"
>
<Layout columns={24}>
<Section columns={24}>
<Article span={16}>
<Headline weight="High"></Headline>
<div className="bg-gray-200 aspect-video flex items-center justify-center my-4">
<span className="text-gray-600"></span>
</div>
<BodyText>
</BodyText>
</Article>
</Section>
</Layout>
</Demo>
<h2></h2>
<ul>
<li>使remempx</li>
<li></li>
<li> 16px</li>
<li> 44x44px</li>
<li></li>
<li></li>
<li></li>
</ul>
<h2></h2>
<p>
</p>
<div className="grid grid-cols-1 md:grid-cols-3 gap-4 my-6">
<div className="border border-gray-200 rounded-lg p-4">
<h3 className="text-lg font-semibold mb-2"></h3>
<ul className="text-sm space-y-1 mb-0">
<li>iPhone SE (375px)</li>
<li>iPhone 12/13 (390px)</li>
<li>iPhone 14 Pro Max (430px)</li>
<li>Android (360px)</li>
</ul>
</div>
<div className="border border-gray-200 rounded-lg p-4">
<h3 className="text-lg font-semibold mb-2"></h3>
<ul className="text-sm space-y-1 mb-0">
<li>iPad Mini (768px)</li>
<li>iPad (810px)</li>
<li>iPad Pro (1024px)</li>
<li>Android (800px)</li>
</ul>
</div>
<div className="border border-gray-200 rounded-lg p-4">
<h3 className="text-lg font-semibold mb-2"></h3>
<ul className="text-sm space-y-1 mb-0">
<li> (1366px)</li>
<li> (1920px)</li>
<li> (2560px)</li>
<li> (3440px)</li>
</ul>
</div>
</div>
<h2></h2>
<p>
使
</p>
<ul>
<li><strong>Chrome DevTools</strong>: Cmd/Ctrl + Shift + M</li>
<li><strong>Firefox</strong>: Cmd/Ctrl + Shift + M</li>
<li><strong>Safari</strong>: Develop Enter Responsive Design Mode</li>
</ul>
<h2></h2>
<ul>
<li>使lazy loading</li>
<li></li>
<li>使WebPAVIF</li>
<li></li>
<li>使 CDN </li>
<li> JavaScript CSS</li>
</ul>
</div>
);
}
@@ -0,0 +1,267 @@
'use client';
import { Demo } from '@/components/Demo';
import { Layout, Section, Article, Layer } from '@newspaperui/components';
import { Headline, Subhead, BodyText, Quote } from '@newspaperui/components';
export default function SpanningPage() {
return (
<div className="prose prose-lg max-w-none">
<h1></h1>
<p className="text-xl text-gray-600">
使 NewspaperUI
</p>
<h2></h2>
<p>
</p>
<Demo
title="报纸头版"
description="主新闻占据 16 列,侧边栏占据 8 列,带浮动拉引"
code={`<Layout columns={24}>
<Section columns={24}>
<div style={{ position: 'relative', minHeight: '600px' }}>
{/* 主新闻 - 16 列 */}
<Article span={16}>
<Headline weight="High">重大新闻标题占据主要版面</Headline>
<Subhead weight="High">
副标题提供更多背景信息和上下文
</Subhead>
<BodyText weight="High">
这是主要新闻的正文内容。在报纸布局中,最重要的新闻通常占据最大的版面,
使用最大的字号和最粗的字重。这样的布局能够立即吸引读者的注意力。
</BodyText>
<BodyText>
新闻的后续段落继续详细描述事件的发展。通过合理的跨栏布局,
我们可以在有限的版面中呈现丰富的内容。
</BodyText>
</Article>
{/* 侧边栏 - 8 列 */}
<Article span={8}>
<Headline weight="Medium">次要新闻</Headline>
<BodyText weight="Medium">
侧边栏的新闻使用较小的字号,适合放置次要但仍然重要的内容。
</BodyText>
</Article>
{/* 浮动拉引 */}
<Layer position="absolute" top="100px" right="20px" zIndex={10}>
<div className="bg-yellow-50 border-l-4 border-yellow-400 p-4 max-w-xs">
<Quote weight="High">
"这是一段重要的引用,用于突出文章中的关键观点"
</Quote>
</div>
</Layer>
</div>
</Section>
</Layout>`}
>
<Layout columns={24}>
<Section columns={24}>
<div style={{ position: 'relative', minHeight: '600px' }}>
<Article span={16}>
<Headline weight="High"></Headline>
<Subhead weight="High">
</Subhead>
<BodyText weight="High">
使
</BodyText>
<BodyText>
</BodyText>
</Article>
<Article span={8}>
<Headline weight="Medium"></Headline>
<BodyText weight="Medium">
使
</BodyText>
</Article>
<Layer position="absolute" top="100px" right="20px" zIndex={10}>
<div className="bg-yellow-50 border-l-4 border-yellow-400 p-4 max-w-xs">
<Quote weight="High">
"这是一段重要的引用,用于突出文章中的关键观点"
</Quote>
</div>
</Layer>
</div>
</Section>
</Layout>
</Demo>
<h2></h2>
<p>
24 8
</p>
<Demo
title="三栏布局"
description="三个 8 列的文章并排显示"
code={`<Layout columns={24}>
<Section columns={24}>
<Article span={8}>
<Headline weight="Medium">第一栏标题</Headline>
<BodyText>第一栏的内容...</BodyText>
</Article>
<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={24}>
<Article span={8}>
<Headline weight="Medium"></Headline>
<BodyText>
</BodyText>
</Article>
<Article span={8}>
<Headline weight="Medium"></Headline>
<BodyText>
</BodyText>
</Article>
<Article span={8}>
<Headline weight="Medium"></Headline>
<BodyText>
</BodyText>
</Article>
</Section>
</Layout>
</Demo>
<h2></h2>
<p>
使
</p>
<Demo
title="12 + 12 列布局"
description="两个等宽的 12 列区域"
code={`<Layout columns={24}>
<Section columns={24}>
<Article span={12}>
<Headline weight="High">左侧主要内容</Headline>
<BodyText weight="High">
占据 12 列的主要内容区域...
</BodyText>
</Article>
<Article span={12}>
<Headline weight="High">右侧主要内容</Headline>
<BodyText weight="High">
同样占据 12 列的内容区域...
</BodyText>
</Article>
</Section>
</Layout>`}
>
<Layout columns={24}>
<Section columns={24}>
<Article span={12}>
<Headline weight="High"></Headline>
<BodyText weight="High">
12
</BodyText>
</Article>
<Article span={12}>
<Headline weight="High"></Headline>
<BodyText weight="High">
</BodyText>
</Article>
</Section>
</Layout>
</Demo>
<h2></h2>
<p>
</p>
<Demo
title="混合列宽布局"
description="6 + 12 + 6 列的组合布局"
code={`<Layout columns={24}>
<Section columns={24}>
<Article span={6}>
<Headline weight="Low">侧边栏</Headline>
<BodyText weight="Low">简短内容</BodyText>
</Article>
<Article span={12}>
<Headline weight="High">主要内容</Headline>
<BodyText>详细的主要内容...</BodyText>
</Article>
<Article span={6}>
<Headline weight="Low">另一侧边栏</Headline>
<BodyText weight="Low">补充信息</BodyText>
</Article>
</Section>
</Layout>`}
>
<Layout columns={24}>
<Section columns={24}>
<Article span={6}>
<Headline weight="Low"></Headline>
<BodyText weight="Low">
1<br />
2<br />
3
</BodyText>
</Article>
<Article span={12}>
<Headline weight="High"></Headline>
<BodyText>
12
6
</BodyText>
</Article>
<Article span={6}>
<Headline weight="Low"></Headline>
<BodyText weight="Low">
1<br />
2<br />
3
</BodyText>
</Article>
</Section>
</Layout>
</Demo>
<h2></h2>
<ul>
<li>使 span 12-16 </li>
<li>使 span 4-8 </li>
<li></li>
<li>使 Layer </li>
<li></li>
<li></li>
</ul>
<h2></h2>
<ul>
<li> Article span Section columns</li>
<li></li>
<li></li>
<li>使 8:166:12:6 </li>
<li></li>
</ul>
</div>
);
}
+35
View File
@@ -0,0 +1,35 @@
@import '@newspaperui/theme/variables.css';
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
body {
@apply bg-white text-gray-900;
}
h1 {
@apply text-4xl font-bold mb-4;
}
h2 {
@apply text-3xl font-semibold mt-8 mb-4;
}
h3 {
@apply text-2xl font-semibold mt-6 mb-3;
}
p {
@apply mb-4 leading-relaxed;
}
code {
@apply text-sm bg-gray-100 px-1.5 py-0.5 rounded;
}
pre code {
@apply bg-transparent p-0;
}
}
+209
View File
@@ -0,0 +1,209 @@
'use client';
import { Demo } from '@/components/Demo';
import { PropsTable } from '@/components/PropsTable';
import { Layout, Section, Article, Headline, BodyText } from '@newspaperui/components';
export default function GridSystemPage() {
return (
<div className="prose prose-lg max-w-none">
<h1></h1>
<p className="text-xl text-gray-600">
NewspaperUI 24
</p>
<h2></h2>
<p>
24 12 24
使 1/32/31/43/4
</p>
<h2>Layout </h2>
<p>
<code>Layout</code>
</p>
<PropsTable
data={[
{
name: 'columns',
type: 'number',
default: '24',
description: '栅格总列数,默认 24 列',
},
{
name: 'maxWidth',
type: 'string',
default: '"1440px"',
description: '容器最大宽度',
},
{
name: 'gutter',
type: 'number',
default: '16',
description: '列间距(单位 px',
},
{
name: 'padding',
type: 'string',
default: '"1rem"',
description: '容器内边距',
},
{
name: 'className',
type: 'string',
description: '自定义 CSS 类名',
},
]}
/>
<Demo
title="基础 Layout"
description="创建一个 24 列的栅格容器"
code={`<Layout columns={24}>
{/* 内容 */}
</Layout>`}
>
<Layout columns={24}>
<div className="bg-blue-50 border-2 border-blue-200 p-4 text-center">
24
</div>
</Layout>
</Demo>
<h2>Section </h2>
<p>
<code>Section</code> Layout Section
Section span Section columns
</p>
<PropsTable
data={[
{
name: 'columns',
type: 'number',
required: true,
description: 'Section 占据的列数,必须 ≤ Layout.columns',
},
{
name: 'breakable',
type: 'boolean',
default: 'true',
description: '是否允许在此处分页断开',
},
{
name: 'priority',
type: "'High' | 'Medium' | 'Low'",
default: "'Medium'",
description: '优先级,用于排序',
},
{
name: 'className',
type: 'string',
description: '自定义 CSS 类名',
},
]}
/>
<Demo
title="多 Section 布局"
description="将 24 列划分为 8 列和 16 列两个区域"
code={`<Layout columns={24}>
<Section columns={8}>
<Article span={8}>
<Headline weight="High">8 列区域</Headline>
<BodyText>这个区域占据 8 列</BodyText>
</Article>
</Section>
<Section columns={16}>
<Article span={8}>
<Headline weight="Medium">16 列区域 - 左</Headline>
<BodyText>这个区域占据 16 列,分为两个 8 列文章</BodyText>
</Article>
<Article span={8}>
<Headline weight="Medium">16 列区域 - 右</Headline>
<BodyText>第二个 8 列文章</BodyText>
</Article>
</Section>
</Layout>`}
>
<Layout columns={24}>
<Section columns={8}>
<Article span={8}>
<Headline weight="High">8 </Headline>
<BodyText> 8 </BodyText>
</Article>
</Section>
<Section columns={16}>
<Article span={8}>
<Headline weight="Medium">16 - </Headline>
<BodyText> 16 8 </BodyText>
</Article>
<Article span={8}>
<Headline weight="Medium">16 - </Headline>
<BodyText> 8 </BodyText>
</Article>
</Section>
</Layout>
</Demo>
<h2></h2>
<p>
12-16
CSS
</p>
<Demo
title="响应式栅格示例"
description="在不同屏幕尺寸下自动调整列数"
>
<Layout columns={24}>
<Section columns={6}>
<Article span={6}>
<Headline weight="Low">6 </Headline>
<BodyText></BodyText>
</Article>
</Section>
<Section columns={6}>
<Article span={6}>
<Headline weight="Low">6 </Headline>
<BodyText></BodyText>
</Article>
</Section>
<Section columns={6}>
<Article span={6}>
<Headline weight="Low">6 </Headline>
<BodyText></BodyText>
</Article>
</Section>
<Section columns={6}>
<Article span={6}>
<Headline weight="Low">6 </Headline>
<BodyText></BodyText>
</Article>
</Section>
</Layout>
</Demo>
<h2></h2>
<ul>
<li>Layout columns 24</li>
<li>Section columns Layout columns</li>
<li>Section span Section columns</li>
<li> span </li>
<li> 12-16 </li>
</ul>
<h2></h2>
<ul>
<li>使 24 1/21/31/41/61/8 </li>
<li>使 8-16 </li>
<li>使 4-8 </li>
<li></li>
<li> Section 8:166:1812:12 </li>
</ul>
</div>
);
}
+29
View File
@@ -0,0 +1,29 @@
import type { Metadata } from 'next';
import { Sidebar } from '@/components/Sidebar';
import './globals.css';
export const metadata: Metadata = {
title: 'NewspaperUI - Documentation',
description: 'A newspaper-style UI component library',
};
export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="zh-CN">
<body className="antialiased">
<div className="flex min-h-screen">
<Sidebar />
<main className="flex-1 overflow-x-hidden">
<div className="max-w-5xl mx-auto px-8 py-12">
{children}
</div>
</main>
</div>
</body>
</html>
);
}
+102
View File
@@ -0,0 +1,102 @@
'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>
);
}
+334
View File
@@ -0,0 +1,334 @@
'use client';
import { Demo } from '@/components/Demo';
import { PropsTable } from '@/components/PropsTable';
import { Headline, Subhead, BodyText, Quote, Byline, Caption } from '@newspaperui/components';
export default function TextPage() {
return (
<div className="prose prose-lg max-w-none">
<h1></h1>
<p className="text-xl text-gray-600">
NewspaperUI
</p>
<h2></h2>
<p>
Visual Weight NewspaperUI
HighMediumLow
</p>
<h2>Headline </h2>
<p>
<code>Headline</code>
</p>
<PropsTable
data={[
{
name: 'weight',
type: '"High" | "Medium" | "Low"',
default: '"Medium"',
description: '视觉权重级别',
},
{
name: 'as',
type: '"h1" | "h2" | "h3" | "h4" | "h5" | "h6"',
default: '"h2"',
description: 'HTML 标签类型',
},
{
name: 'className',
type: 'string',
description: '自定义 CSS 类名',
},
{
name: 'children',
type: 'React.ReactNode',
required: true,
description: '标题内容',
},
]}
/>
<Demo
title="标题视觉权重"
description="展示不同权重的标题效果"
code={`<Headline weight="High">High 权重标题</Headline>
<Headline weight="Medium">Medium 权重标题</Headline>
<Headline weight="Low">Low 权重标题</Headline>`}
>
<div className="space-y-4">
<Headline weight="High">High (36-48px, 700)</Headline>
<Headline weight="Medium">Medium (28-34px, 600)</Headline>
<Headline weight="Low">Low (22-26px, 500)</Headline>
</div>
</Demo>
<h2>Subhead </h2>
<p>
<code>Subhead</code>
</p>
<PropsTable
data={[
{
name: 'weight',
type: '"High" | "Medium"',
default: '"Medium"',
description: '视觉权重级别',
},
{
name: 'className',
type: 'string',
description: '自定义 CSS 类名',
},
{
name: 'children',
type: 'React.ReactNode',
required: true,
description: '副标题内容',
},
]}
/>
<Demo
title="副标题示例"
description="标题和副标题的组合使用"
code={`<Headline weight="High">主标题</Headline>
<Subhead weight="High">副标题说明文字</Subhead>
<BodyText>正文内容...</BodyText>`}
>
<div className="space-y-2">
<Headline weight="High"></Headline>
<Subhead weight="High"></Subhead>
<BodyText>...</BodyText>
</div>
</Demo>
<h2>BodyText </h2>
<p>
<code>BodyText</code>
</p>
<PropsTable
data={[
{
name: 'weight',
type: '"High" | "Medium" | "Low"',
default: '"Medium"',
description: '视觉权重级别',
},
{
name: 'className',
type: 'string',
description: '自定义 CSS 类名',
},
{
name: 'children',
type: 'React.ReactNode',
required: true,
description: '正文内容',
},
]}
/>
<Demo
title="正文文本权重"
description="不同权重的正文文本"
code={`<BodyText weight="High">High 权重正文 (16px)</BodyText>
<BodyText weight="Medium">Medium 权重正文 (14-15px)</BodyText>
<BodyText weight="Low">Low 权重正文 (12-14px)</BodyText>`}
>
<div className="space-y-3">
<BodyText weight="High">
High 16px
</BodyText>
<BodyText weight="Medium">
Medium 14-15px
</BodyText>
<BodyText weight="Low">
Low 12-14px
</BodyText>
</div>
</Demo>
<h2>Quote </h2>
<p>
<code>Quote</code>
</p>
<PropsTable
data={[
{
name: 'weight',
type: '"High" | "Medium"',
default: '"Medium"',
description: '视觉权重级别',
},
{
name: 'className',
type: 'string',
description: '自定义 CSS 类名',
},
{
name: 'children',
type: 'React.ReactNode',
required: true,
description: '引用内容',
},
]}
/>
<Demo
title="引用文本"
description="在文章中插入引用"
code={`<Quote weight="High">
这是一段重要的引用文字,来自某位专家的观点。
</Quote>`}
>
<Quote weight="High">
</Quote>
</Demo>
<h2>Byline Caption </h2>
<p>
<code>Byline</code> <code>Caption</code>
</p>
<PropsTable
data={[
{
name: 'className',
type: 'string',
description: '自定义 CSS 类名',
},
{
name: 'children',
type: 'React.ReactNode',
required: true,
description: '文本内容',
},
]}
/>
<Demo
title="署名和图注"
description="使用 Byline 和 Caption"
code={`<Headline weight="High">文章标题</Headline>
<Byline>作者:张三 | 2024年1月1日</Byline>
<BodyText>文章内容...</BodyText>
<Caption>图1:示例图片的说明文字</Caption>`}
>
<div className="space-y-2">
<Headline weight="High"></Headline>
<Byline> | 202411 | </Byline>
<BodyText>...</BodyText>
<div className="bg-gray-200 h-32 flex items-center justify-center">
<span className="text-gray-500"></span>
</div>
<Caption>1</Caption>
</div>
</Demo>
<h2></h2>
<p>
24
</p>
<div className="my-6 overflow-x-auto">
<table className="w-full border-collapse text-sm">
<thead>
<tr className="border-b-2 border-gray-300">
<th className="text-left py-2 px-3"></th>
<th className="text-left py-2 px-3"></th>
<th className="text-left py-2 px-3"></th>
<th className="text-left py-2 px-3"></th>
<th className="text-left py-2 px-3"></th>
<th className="text-left py-2 px-3"></th>
</tr>
</thead>
<tbody className="text-sm">
<tr className="border-b border-gray-200">
<td className="py-2 px-3">Headline</td>
<td className="py-2 px-3">High</td>
<td className="py-2 px-3">36-48px</td>
<td className="py-2 px-3">700</td>
<td className="py-2 px-3">1.1</td>
<td className="py-2 px-3">#111</td>
</tr>
<tr className="border-b border-gray-200">
<td className="py-2 px-3">Headline</td>
<td className="py-2 px-3">Medium</td>
<td className="py-2 px-3">28-34px</td>
<td className="py-2 px-3">600</td>
<td className="py-2 px-3">1.2</td>
<td className="py-2 px-3">#111</td>
</tr>
<tr className="border-b border-gray-200">
<td className="py-2 px-3">Headline</td>
<td className="py-2 px-3">Low</td>
<td className="py-2 px-3">22-26px</td>
<td className="py-2 px-3">500</td>
<td className="py-2 px-3">1.3</td>
<td className="py-2 px-3">#222</td>
</tr>
<tr className="border-b border-gray-200">
<td className="py-2 px-3">Subhead</td>
<td className="py-2 px-3">High</td>
<td className="py-2 px-3">20-24px</td>
<td className="py-2 px-3">600</td>
<td className="py-2 px-3">1.25</td>
<td className="py-2 px-3">#222</td>
</tr>
<tr className="border-b border-gray-200">
<td className="py-2 px-3">Subhead</td>
<td className="py-2 px-3">Medium</td>
<td className="py-2 px-3">16-18px</td>
<td className="py-2 px-3">500</td>
<td className="py-2 px-3">1.3</td>
<td className="py-2 px-3">#333</td>
</tr>
<tr className="border-b border-gray-200">
<td className="py-2 px-3">BodyText</td>
<td className="py-2 px-3">High</td>
<td className="py-2 px-3">16px</td>
<td className="py-2 px-3">400</td>
<td className="py-2 px-3">1.5</td>
<td className="py-2 px-3">#333</td>
</tr>
<tr className="border-b border-gray-200">
<td className="py-2 px-3">BodyText</td>
<td className="py-2 px-3">Medium</td>
<td className="py-2 px-3">14-15px</td>
<td className="py-2 px-3">400</td>
<td className="py-2 px-3">1.5</td>
<td className="py-2 px-3">#444</td>
</tr>
<tr className="border-b border-gray-200">
<td className="py-2 px-3">BodyText</td>
<td className="py-2 px-3">Low</td>
<td className="py-2 px-3">12-14px</td>
<td className="py-2 px-3">400</td>
<td className="py-2 px-3">1.4</td>
<td className="py-2 px-3">#555</td>
</tr>
</tbody>
</table>
</div>
<h2>使</h2>
<ul>
<li>使 Headline High </li>
<li>使 Headline Medium Low </li>
<li>使 BodyText Medium </li>
<li>使 BodyText High </li>
<li>使 BodyText Low </li>
<li>使 Quote </li>
<li>使 Byline </li>
<li>使 Caption </li>
</ul>
</div>
);
}
+310
View File
@@ -0,0 +1,310 @@
import { CodeBlock } from '@/components/CodeBlock';
export default function ThemePage() {
return (
<div className="prose prose-lg max-w-none">
<h1></h1>
<p className="text-xl text-gray-600">
NewspaperUI CSS Variables
</p>
<h2>CSS Variables</h2>
<p>
使 CSS CSS Variables
使
</p>
<h3></h3>
<CodeBlock
title="CSS Variables"
language="css"
code={`:root {
/* 颜色系统 */
--color-text-primary: #111;
--color-text-secondary: #222;
--color-text-tertiary: #333;
--color-text-muted: #555;
--color-background: #ffffff;
--color-border: #e5e7eb;
/* 字体系统 */
--font-family-serif: Georgia, 'Times New Roman', serif;
--font-family-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
--font-family-mono: 'Courier New', monospace;
/* 间距系统 */
--spacing-gutter: 1rem;
--spacing-section: 2rem;
--spacing-article: 1.5rem;
/* 栅格系统 */
--grid-columns: 24;
--grid-max-width: 1280px;
}`}
/>
<h2>Tailwind </h2>
<p>
NewspaperUI Tailwind CSS Tailwind 使
</p>
<CodeBlock
title="tailwind.config.js"
language="javascript"
code={`import { newspaperTheme } from '@newspaperui/theme';
export default {
content: ['./src/**/*.{js,ts,jsx,tsx}'],
theme: {
extend: {
colors: {
newspaper: {
text: {
primary: 'var(--color-text-primary)',
secondary: 'var(--color-text-secondary)',
tertiary: 'var(--color-text-tertiary)',
muted: 'var(--color-text-muted)',
},
},
},
fontFamily: {
serif: 'var(--font-family-serif)',
sans: 'var(--font-family-sans)',
mono: 'var(--font-family-mono)',
},
},
},
plugins: [newspaperTheme],
};`}
/>
<h2>使</h2>
<p>
使 CSS Variables Tailwind
</p>
<CodeBlock
title="使用示例"
language="tsx"
code={`// 使用 CSS Variables
<div style={{ color: 'var(--color-text-primary)' }}>
主要文本
</div>
// 使用 Tailwind 工具类
<div className="text-newspaper-text-primary">
主要文本
</div>`}
/>
<h2></h2>
<p>
CSS Variables
</p>
<CodeBlock
title="自定义主题"
language="css"
code={`:root {
/* 覆盖默认颜色 */
--color-text-primary: #000000;
--color-text-secondary: #1a1a1a;
--color-background: #f9f9f9;
/* 自定义字体 */
--font-family-serif: 'Merriweather', Georgia, serif;
/* 调整间距 */
--spacing-gutter: 1.5rem;
--grid-max-width: 1440px;
}`}
/>
<h2></h2>
<p>
CSS Variables
</p>
<CodeBlock
title="深色模式"
language="css"
code={`@media (prefers-color-scheme: dark) {
:root {
--color-text-primary: #f5f5f5;
--color-text-secondary: #e0e0e0;
--color-text-tertiary: #cccccc;
--color-text-muted: #999999;
--color-background: #1a1a1a;
--color-border: #333333;
}
}
/* 或使用类名切换 */
.dark {
--color-text-primary: #f5f5f5;
--color-text-secondary: #e0e0e0;
--color-background: #1a1a1a;
}`}
/>
<h2></h2>
<p>
</p>
<CodeBlock
title="自定义视觉权重"
language="typescript"
code={`import { visualWeights } from '@newspaperui/theme';
// 查看默认配置
console.log(visualWeights.Headline.High);
// {
// fontSize: '36px',
// fontWeight: 700,
// lineHeight: 1.1,
// color: '#111',
// span: [6, 8],
// margin: '0 0 1rem 0',
// }
// 自定义权重配置
const customWeights = {
...visualWeights,
Headline: {
...visualWeights.Headline,
High: {
...visualWeights.Headline.High,
fontSize: '48px', // 更大的标题
fontWeight: 800,
},
},
};`}
/>
<h2></h2>
<p>
</p>
<CodeBlock
title="响应式变量"
language="css"
code={`:root {
--grid-columns: 24;
--spacing-gutter: 1rem;
}
@media (max-width: 768px) {
:root {
--grid-columns: 12;
--spacing-gutter: 0.75rem;
}
}
@media (max-width: 480px) {
:root {
--grid-columns: 6;
--spacing-gutter: 0.5rem;
}
}`}
/>
<h2></h2>
<ul>
<li>使 <code>--color-text-primary</code> <code>--color-black</code></li>
<li> WCAG </li>
<li>使remempx</li>
<li></li>
<li></li>
<li></li>
</ul>
<h2></h2>
<p>
NewspaperUI
</p>
<CodeBlock
title="导入主题"
language="typescript"
code={`// 在你的主 CSS 文件中
import '@newspaperui/theme/variables.css';
// 或在 Next.js 的 _app.tsx 中
import '@newspaperui/theme/variables.css';
import '@newspaperui/theme/tailwind.css';`}
/>
<h2></h2>
<p>
NewspaperUI 使
</p>
<CodeBlock
title="主题工具"
language="typescript"
code={`import { getVisualWeight, applyTheme } from '@newspaperui/theme';
// 获取特定组件的视觉权重配置
const headlineHighConfig = getVisualWeight('Headline', 'High');
// 应用主题到元素
applyTheme(element, {
'--color-text-primary': '#000',
'--font-family-serif': 'Georgia',
});`}
/>
<h2></h2>
<p>
</p>
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 my-8">
<div className="border border-gray-200 rounded-lg p-6">
<h3 className="text-lg font-semibold mb-3"></h3>
<div className="space-y-2 text-sm">
<div className="flex justify-between">
<span></span>
<span className="font-mono">#111111</span>
</div>
<div className="flex justify-between">
<span></span>
<span className="font-mono">#ffffff</span>
</div>
<div className="flex justify-between">
<span></span>
<span className="font-mono">Georgia</span>
</div>
</div>
</div>
<div className="border border-gray-200 rounded-lg p-6 bg-gray-900 text-white">
<h3 className="text-lg font-semibold mb-3"></h3>
<div className="space-y-2 text-sm">
<div className="flex justify-between">
<span></span>
<span className="font-mono">#f5f5f5</span>
</div>
<div className="flex justify-between">
<span></span>
<span className="font-mono">#1a1a1a</span>
</div>
<div className="flex justify-between">
<span></span>
<span className="font-mono">Georgia</span>
</div>
</div>
</div>
</div>
<h2></h2>
<ul>
<li><a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_custom_properties">MDN: CSS Custom Properties</a></li>
<li><a href="https://tailwindcss.com/docs/customizing-colors">Tailwind CSS: Customizing Colors</a></li>
<li><a href="https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html">WCAG: Contrast Guidelines</a></li>
</ul>
</div>
);
}