组件
我们默认不提供任何排版样式。此页面是您如何使用实用程序类来设置文本样式的一个示例。
欢笑税:笑话税编年史
很久很久以前,在一个遥远的国度里,有一位非常懒惰的国王,他整天躺在宝座上。有一天,他的顾问们带着一个问题来找他:王国快没钱了。
国王的计划
国王冥思苦想,终于想出了 一个绝妙的计划:他要对王国里的笑话征税。
他说:“毕竟,每个人都喜欢一个好笑话,所以他们为这种特权付费是公平的。”
笑话税
国王的臣民们并不觉得好笑。他们抱怨不已,但国王态度坚决。
- 第一级双关语:5 枚金币
- 第二级笑话:10 枚金币
- 第三级单句笑话:20 枚金币
结果,人们不再讲笑话,王国陷入了忧郁。但有一个人拒绝让国王的愚蠢打倒他:一个名叫小丑的宫廷小丑。
小丑的起义
小丑开始在半夜偷偷溜进城堡,把笑话留在各处:国王的枕头下,他的汤里,甚至在皇家马桶里。国王勃然大怒,但他似乎无法阻止小丑。
然后,有一天,王国里的人们发现小丑留下的笑话是如此有趣,以至于他们情不自禁地笑了。一旦他们开始笑,他们就停不下来。
人民的反抗
王国的人民受到欢笑的鼓舞,又开始讲笑话和双关语,很快整个王国都加入了这个笑话。
国王的国库 | 人民的幸福 |
---|---|
空虚 | 溢满 |
适度 | 满足 |
充实 | 狂喜 |
国王看到他的臣民们如此快乐,意识到自己的错误,废除了笑话税。小丑被宣布为英雄,王国从此过上了幸福的生活。
这个故事的寓意是:永远不要低估一个好笑话的力量,并且永远要小心坏主意。
export function TypographyDemo() {
return (
<div>
<h1 className="scroll-m-20 text-4xl font-extrabold tracking-tight text-balance">
Taxing Laughter: The Joke Tax Chronicles
</h1>
<p className="text-muted-foreground text-xl leading-7 [&:not(:first-child)]:mt-6">
Once upon a time, in a far-off land, there was a very lazy king who
spent all day lounging on his throne. One day, his advisors came to him
with a problem: the kingdom was running out of money.
</p>
<h2 className="mt-10 scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight transition-colors first:mt-0">
The King's Plan
</h2>
<p className="leading-7 [&:not(:first-child)]:mt-6">
The king thought long and hard, and finally came up with{" "}
<a
href="#"
className="text-primary font-medium underline underline-offset-4"
>
a brilliant plan
</a>
: he would tax the jokes in the kingdom.
</p>
<blockquote className="mt-6 border-l-2 pl-6 italic">
"After all," he said, "everyone enjoys a good joke, so
it's only fair that they should pay for the privilege."
</blockquote>
<h3 className="mt-8 scroll-m-20 text-2xl font-semibold tracking-tight">
The Joke Tax
</h3>
<p className="leading-7 [&:not(:first-child)]:mt-6">
The king's subjects were not amused. They grumbled and complained,
but the king was firm:
</p>
<ul className="my-6 ml-6 list-disc [&>li]:mt-2">
<li>1st level of puns: 5 gold coins</li>
<li>2nd level of jokes: 10 gold coins</li>
<li>3rd level of one-liners : 20 gold coins</li>
</ul>
<p className="leading-7 [&:not(:first-child)]:mt-6">
As a result, people stopped telling jokes, and the kingdom fell into a
gloom. But there was one person who refused to let the king's
foolishness get him down: a court jester named Jokester.
</p>
<h3 className="mt-8 scroll-m-20 text-2xl font-semibold tracking-tight">
Jokester's Revolt
</h3>
<p className="leading-7 [&:not(:first-child)]:mt-6">
Jokester began sneaking into the castle in the middle of the night and
leaving jokes all over the place: under the king's pillow, in his
soup, even in the royal toilet. The king was furious, but he
couldn't seem to stop Jokester.
</p>
<p className="leading-7 [&:not(:first-child)]:mt-6">
And then, one day, the people of the kingdom discovered that the jokes
left by Jokester were so funny that they couldn't help but laugh.
And once they started laughing, they couldn't stop.
</p>
<h3 className="mt-8 scroll-m-20 text-2xl font-semibold tracking-tight">
The People's Rebellion
</h3>
<p className="leading-7 [&:not(:first-child)]:mt-6">
The people of the kingdom, feeling uplifted by the laughter, started to
tell jokes and puns again, and soon the entire kingdom was in on the
joke.
</p>
<div className="my-6 w-full overflow-y-auto">
<table className="w-full">
<thead>
<tr className="even:bg-muted m-0 border-t p-0">
<th className="border px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right">
King's Treasury
</th>
<th className="border px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right">
People's happiness
</th>
</tr>
</thead>
<tbody>
<tr className="even:bg-muted m-0 border-t p-0">
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Empty
</td>
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Overflowing
</td>
</tr>
<tr className="even:bg-muted m-0 border-t p-0">
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Modest
</td>
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Satisfied
</td>
</tr>
<tr className="even:bg-muted m-0 border-t p-0">
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Full
</td>
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Ecstatic
</td>
</tr>
</tbody>
</table>
</div>
<p className="leading-7 [&:not(:first-child)]:mt-6">
The king, seeing how much happier his subjects were, realized the error
of his ways and repealed the joke tax. Jokester was declared a hero, and
the kingdom lived happily ever after.
</p>
<p className="leading-7 [&:not(:first-child)]:mt-6">
The moral of the story is: never underestimate the power of a good laugh
and always be careful of bad ideas.
</p>
</div>
)
}
h1
欢笑税:笑话税编年史
export function TypographyH1() {
return (
<h1 className="scroll-m-20 text-center text-4xl font-extrabold tracking-tight text-balance">
Taxing Laughter: The Joke Tax Chronicles
</h1>
)
}
h2
王国人民
export function TypographyH2() {
return (
<h2 className="scroll-m-20 border-b pb-2 text-3xl font-semibold tracking-tight first:mt-0">
The People of the Kingdom
</h2>
)
}
h3
笑话税
export function TypographyH3() {
return (
<h3 className="scroll-m-20 text-2xl font-semibold tracking-tight">
The Joke Tax
</h3>
)
}
h4
人们停止讲笑话
export function TypographyH4() {
return (
<h4 className="scroll-m-20 text-xl font-semibold tracking-tight">
People stopped telling jokes
</h4>
)
}
p
国王看到他的臣民们如此快乐,意识到自己的错误,废除了笑话税。
export function TypographyP() {
return (
<p className="leading-7 [&:not(:first-child)]:mt-6">
The king, seeing how much happier his subjects were, realized the error of
his ways and repealed the joke tax.
</p>
)
}
blockquote
他说:“毕竟,每个人都喜欢一个好笑话,所以他们为这种特权付费是公平的。”
export function TypographyBlockquote() {
return (
<blockquote className="mt-6 border-l-2 pl-6 italic">
"After all," he said, "everyone enjoys a good joke, so
it's only fair that they should pay for the privilege."
</blockquote>
)
}
table
国王的国库 | 人民的幸福 |
---|---|
空虚 | 溢满 |
适度 | 满足 |
充实 | 狂喜 |
export function TypographyTable() {
return (
<div className="my-6 w-full overflow-y-auto">
<table className="w-full">
<thead>
<tr className="even:bg-muted m-0 border-t p-0">
<th className="border px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right">
King's Treasury
</th>
<th className="border px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right">
People's happiness
</th>
</tr>
</thead>
<tbody>
<tr className="even:bg-muted m-0 border-t p-0">
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Empty
</td>
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Overflowing
</td>
</tr>
<tr className="even:bg-muted m-0 border-t p-0">
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Modest
</td>
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Satisfied
</td>
</tr>
<tr className="even:bg-muted m-0 border-t p-0">
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Full
</td>
<td className="border px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right">
Ecstatic
</td>
</tr>
</tbody>
</table>
</div>
)
}
list
- 第一级双关语:5 枚金币
- 第二级笑话:10 枚金币
- 第三级单句笑话:20 枚金币
export function TypographyList() {
return (
<ul className="my-6 ml-6 list-disc [&>li]:mt-2">
<li>1st level of puns: 5 gold coins</li>
<li>2nd level of jokes: 10 gold coins</li>
<li>3rd level of one-liners : 20 gold coins</li>
</ul>
)
}
行内代码
@radix-ui/react-alert-dialog
export function TypographyInlineCode() {
return (
<code className="bg-muted relative rounded px-[0.3rem] py-[0.2rem] font-mono text-sm font-semibold">
@radix-ui/react-alert-dialog
</code>
)
}
引导语
一个模态对话框,用重要内容打断用户并期望得到回复。
export function TypographyLead() {
return (
<p className="text-muted-foreground text-xl">
A modal dialog that interrupts the user with important content and expects
a response.
</p>
)
}
大尺寸
您确定吗?
export function TypographyLarge() {
return <div className="text-lg font-semibold">Are you absolutely sure?</div>
}
小尺寸
电子邮件地址
export function TypographySmall() {
return (
<small className="text-sm leading-none font-medium">Email address</small>
)
}
静音
输入您的电子邮件地址。
export function TypographyMuted() {
return (
<p className="text-muted-foreground text-sm">Enter your email address.</p>
)
}