mirror of
https://gitee.com/butubb8/blowfish.git
synced 2025-12-05 14:17:50 +08:00
Merge pull request #2465 from ZhenShuo2021/feat/timeline-md
✨ Feat(timeline): support markdown content
This commit is contained in:
@@ -721,6 +721,7 @@ The `timeline` creates a visual timeline that can be used in different use-cases
|
||||
<!-- prettier-ignore-start -->
|
||||
| Parameter | Description |
|
||||
| ----------- | -------------------------------------------- |
|
||||
| `md` | render the content as Markdown (true/false) |
|
||||
| `icon` | the icon to be used in the timeline visuals. |
|
||||
| `header` | header for each entry |
|
||||
| `badge` | text to place within the top right badge |
|
||||
|
||||
@@ -718,6 +718,7 @@ B-->C[利益]
|
||||
<!-- prettier-ignore-start -->
|
||||
| パラメータ | 説明 |
|
||||
| ----------- | -------------------------------------------- |
|
||||
| `md` | コンテンツを Markdown としてレンダリングする (true/false) |
|
||||
| `icon` | タイムラインのビジュアルで使用するアイコン |
|
||||
| `header` | 各エントリのヘッダーー |
|
||||
| `badge` | 右上のバッジ内に配置するテキスト |
|
||||
|
||||
@@ -728,7 +728,8 @@ The `timeline` creates a visual timeline that can be used in different use-cases
|
||||
<!-- prettier-ignore-start -->
|
||||
| Parameter | Description |
|
||||
| ----------- | -------------------------------------------- |
|
||||
| `icon` | the icon to be used in the timeline visuals. |
|
||||
| `md` | render the content as Markdown (true/false) |
|
||||
| `icon` | the icon to be used in the timeline visuals |
|
||||
| `header` | header for each entry |
|
||||
| `badge` | text to place within the top right badge |
|
||||
| `subheader` | entry's subheader |
|
||||
|
||||
@@ -730,8 +730,9 @@ B-->C[Profit]
|
||||
|
||||
<!-- prettier-ignore-start -->
|
||||
| 参数 | 功能 |
|
||||
| ----------- | ------------------------ |
|
||||
| `icon` | 要在时间线中使用的图标。 |
|
||||
| ----------- | ----------------------------------- |
|
||||
| `md` | 将内容渲染为 Markdown (true/false) |
|
||||
| `icon` | 要在时间线中使用的图标 |
|
||||
| `header` | 每个条目的标题 |
|
||||
| `badge` | 放置在右上角徽章内的文本 |
|
||||
| `subheader` | 每个条目的副标题 |
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{{ $icon := .Get "icon" | default "check" }}
|
||||
{{ $md := .Get "md" | default false }}
|
||||
{{ $header := .Get "header" }}
|
||||
{{ $badge := .Get "badge" }}
|
||||
{{ $subheader := .Get "subheader" }}
|
||||
@@ -25,7 +26,11 @@
|
||||
</h4>
|
||||
{{ end }}
|
||||
<div class="mb-6">
|
||||
{{ if $md }}
|
||||
{{- .Inner | markdownify -}}
|
||||
{{ else }}
|
||||
{{- .Inner -}}
|
||||
{{ end }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user