chore: update zh-cn translation

This commit is contained in:
Xin
2025-08-14 19:07:25 +08:00
parent 8773081fae
commit f79b1d262c
29 changed files with 993 additions and 495 deletions

View File

@@ -14,10 +14,10 @@ linkTitle: 卡片
{{< cards >}}
{{< card link="/" title="图片卡片" image="https://github.com/user-attachments/assets/71b7e3ec-1a8d-4582-b600-5425c6cc0407" subtitle="网络图片" >}}
{{< card link="/" title="本地图片" image="/images/card-image-unprocessed.jpg" subtitle="静态目录下的原始图片。" >}}
{{< card link="/" title="本地图片" image="images/space.jpg" subtitle="资源目录下的图片,Hugo 处理。" method="Resize" options="600x q80 webp" >}}
{{< card link="/" title="本地图片" image="images/space.jpg" subtitle="资源目录下的图片,经过Hugo处理。" method="Resize" options="600x q80 webp" >}}
{{< /cards >}}
##
## 使用方
```
{{</* cards */>}}
@@ -29,9 +29,9 @@ linkTitle: 卡片
```
{{</* cards */>}}
{{</* card link="/" title="图片卡片" image="https://source.unsplash.com/featured/800x600?landscape" subtitle="Unsplash 风景" */>}}
{{</* card link="/" title="图片卡片" image="https://source.unsplash.com/featured/800x600?landscape" subtitle="Unsplash风景" */>}}
{{</* card link="/" title="本地图片" image="/images/card-image-unprocessed.jpg" subtitle="静态目录下的原始图片。" */>}}
{{</* card link="/" title="本地图片" image="images/space.jpg" subtitle="资源目录下的图片,Hugo 处理。" method="Resize" options="600x q80 webp" */>}}
{{</* card link="/" title="本地图片" image="images/space.jpg" subtitle="资源目录下的图片,经过Hugo处理。" method="Resize" options="600x q80 webp" */>}}
{{</* /cards */>}}
```
@@ -39,37 +39,37 @@ linkTitle: 卡片
| 参数 | 描述 |
|----------- |-----------------------------------------------------------------|
| `link` | URL(内部或外部)。 |
| `title` | 卡片的标题。 |
| `subtitle` | 卡片的副标题(支持 Markdown。 |
| `icon` | 图标名称。 |
| `tag` | 标签中的文本。 |
| `tagColor` | 标签颜色:`gray`(默认)、`yellow``red``blue`。 |
| `link` | 链接地址(内部或外部)。 |
| `title` | 卡片的标题。 |
| `subtitle` | 卡片的副标题支持Markdown。 |
| `icon` | 图标名称。 |
| `tag` | 标签文本。 |
| `tagColor` | 标签颜色:`gray`(默认)、`yellow``red``blue`。 |
## 图片卡片
此外,卡片支持通过以下参数添加图片并进行处理:
此外,卡片支持通过以下参数添加图片并进行处理:
| 参数 | 描述 |
|-----------|--------------------------------------|
| `image` | 指定卡片的图片 URL。 |
| `method` | 设置 Hugo 的图片处理方法。 |
| `options` | 配置 Hugo 的图片处理选项。 |
| 参数 | 描述 |
|----------- |---------------------------------------------|
| `image` | 指定卡片的图片URL。 |
| `method` | 设置Hugo的图片处理方法。 |
| `options` | 配置Hugo的图片处理选项。 |
卡片支持三种类型的图片:
1. 远程图片:`image` 参数中完整 URL。
2. 静态图片:使用 Hugo `static/` 目录的相对路径。
3. 处理后的图片:使用 Hugo `assets/` 目录的相对路径。
1. 远程图片:`image`参数中填写完整URL。
2. 静态图片使用Hugo`static/`目录的相对路径。
3. 处理后的图片使用Hugo`assets/`目录的相对路径。
Hextra 在构建时自动检测是否需要图片处理,并应用 `options` 参数或默认设置Resize800x质量 80WebP 格式)。
目前支持以下 `method``Resize``Fit``Fill``Crop`
Hextra在构建时自动检测是否需要图片处理,并应用`options`参数或默认设置Resize800x质量80WebP格式
目前支持`method``Resize``Fit``Fill``Crop`
有关 Hugo 内置图片处理命令、方法和选项的更多信息,请参阅其[图片处理文档](https://gohugo.io/content-management/image-processing/)。
有关Hugo内置图片处理命令、方法和选项的更多信息请参阅其[图片处理文档](https://gohugo.io/content-management/image-processing/)。
## 标签
卡片支持添加标签,这对于显示额外的状态信息非常有用
卡片支持添加标签,可用于显示额外的状态信息。
{{< cards >}}
{{< card link="../callout" title="带默认标签的卡片" tag="标签文本" >}}
@@ -90,7 +90,7 @@ Hextra 在构建时自动检测是否需要图片处理,并应用 `options`
## 列数
可以通过`cols` 参数传递给 `cards` 短代码来指定卡片的最大列数。请注意,在较小的屏幕上列仍会折叠。
可以通过`cards`短代码传递`cols`参数来指定卡片的最大列数。请注意,在屏幕上列仍会折叠。
{{< cards cols="1" >}}
{{< card link="/" title="顶部卡片" >}}