Files
newsui/packages/docs/app/blocks/zh-frontpage/page.tsx
T
sunzhongyi 5f65d741ed feat: responsive system, engineering infra, new components, performance
- Section: responsive prop with media query injection
- visual-weights: fontSize clamp() for responsive sizing
- variables.css: add border-radius/shadow/transition/z-index tokens
- ESLint flat config + Prettier + Changeset init
- New components: Footer, NewsSidebar, BreakingNewsBanner
- Image/Figure: loading=lazy, aspectRatio, sizes props
2026-05-21 10:04:35 +08:00

199 lines
14 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 { Layout, Section, Article, Rule, BodyText, Figure } from 'newspaperui-components';
const cn = { fontFamily: 'var(--font-family-cjk-serif)' };
const cnRed = { color: 'var(--nui-accent-cjk-red)' };
export default function ZhFrontPage() {
return (
<Layout columns={24} maxWidth="1280px" padding="1.5rem 1rem">
{/* 报头 */}
<header style={{
textAlign: 'center',
borderTop: '4px solid var(--nui-accent-cjk-red)',
borderBottom: '1px solid var(--nui-rule-decorative)',
paddingTop: '1rem',
paddingBottom: '0.5rem',
}}>
<div style={{
fontFamily: 'var(--font-family-meta)',
fontSize: '11px',
color: 'var(--nui-text-muted)',
letterSpacing: '0.2em',
marginBottom: '0.25rem',
}}>RENMIN ZHOUBAO · </div>
<h1 style={{
...cn,
...cnRed,
fontSize: '88px',
fontWeight: 900,
margin: 0,
letterSpacing: '0.1em',
lineHeight: 1,
}}></h1>
<div style={{
...cn,
display: 'flex',
justifyContent: 'space-between',
fontSize: '12px',
color: 'var(--nui-text-secondary)',
padding: '0.5rem 1rem',
borderTop: '1px solid var(--nui-rule-hairline)',
marginTop: '0.5rem',
}}>
<span> 2026 · 5891 </span>
<span>2026 5 19 · · </span>
<span> 5 · 260 </span>
</div>
</header>
{/* 版面导航条 */}
<div style={{
...cn,
display: 'flex',
gap: '0',
fontSize: '12px',
borderTop: '1px solid var(--nui-rule-hairline)',
borderBottom: '1px solid var(--nui-rule-hairline)',
marginTop: '1rem',
}}>
{['01版 要闻', '02版 经济', '03版 国际', '04版 文化', '05版 体育', '06版 副刊'].map((v, i) => (
<div key={i} style={{
padding: '0.4rem 1rem',
borderRight: '1px solid var(--nui-rule-hairline)',
color: i === 0 ? 'var(--nui-accent-cjk-red)' : 'var(--nui-text-secondary)',
fontWeight: i === 0 ? 700 : 400,
cursor: 'pointer',
}}>{v}</div>
))}
</div>
{/* 头条区 */}
<Section columns={24} gap="1rem" style={{ marginTop: '1rem', paddingBottom: '1rem', borderBottom: '2px solid var(--nui-rule-decorative)' }}>
<Article span={24}>
<div style={{ ...cn, ...cnRed, fontSize: '13px', fontWeight: 700, marginBottom: '0.5rem', textAlign: 'center', letterSpacing: '0.1em' }}></div>
<h2 style={{ ...cn, fontSize: '56px', fontWeight: 900, lineHeight: 1.1, color: 'var(--nui-text-primary)', textAlign: 'center', margin: 0 }}>
</h2>
<h3 style={{ ...cn, fontSize: '24px', fontWeight: 500, lineHeight: 1.4, color: 'var(--nui-text-secondary)', textAlign: 'center', margin: '0.5rem 0 1rem 0' }}>
</h3>
<div style={{ ...cn, textAlign: 'center', fontSize: '12px', color: 'var(--nui-text-muted)', marginBottom: '1rem' }}>
·
</div>
<Figure
src="https://images.unsplash.com/photo-1529107386315-e1a2ed48a620?auto=format&fit=crop&w=1200&q=80"
alt="签署仪式现场"
caption="各国代表在布鲁塞尔会议中心签署协定。"
credit="新华社记者 摄"
style={{ marginBottom: '1rem' }}
/>
<BodyText weight="Medium" columns={3} dropCap style={cn}>
<p> </p>
<p> 2040 2028 </p>
<p> 1.2% 0.7%</p>
<p></p>
<p>便</p>
<p></p>
<p></p>
<p> 2028 </p>
<p> 18 20 </p>
</BodyText>
</Article>
</Section>
{/* 二条区:3 栏并列 */}
<Section columns={24} gap="1rem" style={{ marginTop: '1rem', paddingBottom: '1rem', borderBottom: '1px solid var(--nui-rule-decorative)' }}>
<Article span={8} style={{ border: '1px solid var(--nui-rule-hairline)', padding: '1rem', background: 'var(--nui-bg-surface)' }}>
<div style={{ ...cn, ...cnRed, fontSize: '12px', fontWeight: 700, marginBottom: '0.5rem' }}> </div>
<h3 style={{ ...cn, fontSize: '22px', fontWeight: 700, lineHeight: 1.3, color: 'var(--nui-text-primary)', margin: '0 0 0.5rem 0' }}></h3>
<BodyText weight="Low" style={cn}>
<p></p>
<p></p>
</BodyText>
<Rule variant="hairline" style={{ margin: '0.75rem 0' }} />
<h4 style={{ ...cn, fontSize: '17px', fontWeight: 600, lineHeight: 1.3, margin: '0 0 0.4rem 0' }}>线</h4>
<BodyText weight="Low" style={cn}>
<p>亿线线 A8 </p>
</BodyText>
<Rule variant="hairline" style={{ margin: '0.75rem 0' }} />
<h4 style={{ ...cn, fontSize: '17px', fontWeight: 600, lineHeight: 1.3, margin: '0 0 0.4rem 0' }}></h4>
<BodyText weight="Low" style={cn}>
<p> A10</p>
</BodyText>
</Article>
<Article span={8} style={{ border: '1px solid var(--nui-rule-hairline)', padding: '1rem', background: 'var(--nui-bg-surface)' }}>
<div style={{ ...cn, ...cnRed, fontSize: '12px', fontWeight: 700, marginBottom: '0.5rem' }}> </div>
<h3 style={{ ...cn, fontSize: '22px', fontWeight: 700, lineHeight: 1.3, color: 'var(--nui-text-primary)', margin: '0 0 0.5rem 0' }}> PMI </h3>
<BodyText weight="Low" style={cn}>
<p> 52.4</p>
<p></p>
</BodyText>
<Rule variant="hairline" style={{ margin: '0.75rem 0' }} />
<h4 style={{ ...cn, fontSize: '17px', fontWeight: 600, lineHeight: 1.3, margin: '0 0 0.4rem 0' }}> 3.7%</h4>
<BodyText weight="Low" style={cn}>
<p></p>
</BodyText>
<Rule variant="hairline" style={{ margin: '0.75rem 0' }} />
<h4 style={{ ...cn, fontSize: '17px', fontWeight: 600, lineHeight: 1.3, margin: '0 0 0.4rem 0' }}></h4>
<BodyText weight="Low" style={cn}>
<p></p>
</BodyText>
</Article>
<Article span={8} style={{ border: '1px solid var(--nui-rule-hairline)', padding: '1rem', background: 'var(--nui-bg-surface)' }}>
<div style={{ ...cn, ...cnRed, fontSize: '12px', fontWeight: 700, marginBottom: '0.5rem' }}> · </div>
<h3 style={{ ...cn, fontSize: '22px', fontWeight: 700, lineHeight: 1.3, color: 'var(--nui-text-primary)', margin: '0 0 0.5rem 0' }}></h3>
<BodyText weight="Low" style={cn}>
<p>殿</p>
<p></p>
</BodyText>
<Rule variant="hairline" style={{ margin: '0.75rem 0' }} />
<h4 style={{ ...cn, fontSize: '17px', fontWeight: 600, lineHeight: 1.3, margin: '0 0 0.4rem 0' }}></h4>
<BodyText weight="Low" style={cn}>
<p> 18%</p>
</BodyText>
<Rule variant="hairline" style={{ margin: '0.75rem 0' }} />
<h4 style={{ ...cn, fontSize: '17px', fontWeight: 600, lineHeight: 1.3, margin: '0 0 0.4rem 0' }}></h4>
<BodyText weight="Low" style={cn}>
<p></p>
</BodyText>
</Article>
</Section>
{/* 简讯 + 要点提示 */}
<Section columns={24} gap="1rem" style={{ marginTop: '1rem' }}>
<Article span={6} style={{ background: 'var(--nui-bg-surface)', padding: '1rem', borderLeft: '3px solid var(--nui-accent-cjk-red)' }}>
<div style={{ ...cn, ...cnRed, fontSize: '11px', fontWeight: 700, marginBottom: '0.5rem', letterSpacing: '0.1em' }}></div>
<ul style={{ ...cn, fontSize: '14px', lineHeight: 1.7, paddingLeft: '1.2em', margin: 0, color: 'var(--nui-text-body)' }}>
<li> · A2</li>
<li> · A4</li>
<li> · B1</li>
<li> · C3</li>
<li> · C5</li>
<li> · D2</li>
<li> · E1</li>
<li> · F4</li>
</ul>
</Article>
<Article span={18}>
<div style={{ ...cn, ...cnRed, fontSize: '12px', fontWeight: 700, marginBottom: '0.5rem' }}> · </div>
<BodyText weight="Low" columns={4} style={cn}>
<p><strong></strong> 8000 西</p>
<p><strong></strong> </p>
<p><strong></strong> 退</p>
<p><strong>广</strong> 500 亿</p>
<p><strong></strong> </p>
<p><strong></strong> </p>
<p><strong></strong> </p>
<p><strong></strong> </p>
<p><strong></strong> 25 </p>
</BodyText>
</Article>
</Section>
</Layout>
);
}