未验证 提交 f83b1c14 编写于 作者: D Dillon 提交者: GitHub

Merge pull request #104 from dillonzq/feature/add_some_shortcodes

feat(shortcodes): replace [align]/[float] with [style] and add [style]
......@@ -321,26 +321,6 @@
word-break: break-all;
}
}
.align-left {
text-align: left;
}
.align-center {
text-align: center;
}
.align-right {
text-align: right;
}
.float-left {
float: left;
}
.float-right {
float: right;
}
}
@import "../_partial/_single/footer";
......
......@@ -393,11 +393,11 @@ Here is a story about love...
int a = 1;
{{< /typeit >}}
## Test Align
## Test Style
{{% align right %}}
{{< style "text-align: right">}}
**Test Text**
{{% /align %}}
{{< /style >}}
## Test Katex
......
{{- /* [left, center, right] */ -}}
<div class={{ .Get 0 | printf "align-%s" }}>
{{- .Inner | .Page.RenderString -}}
</div>
{{- /* [left, right] */ -}}
<div class={{ .Get 0 | printf "float-%s" }}>
{{- .Inner | .Page.RenderString -}}
</div>
<figure{{ with .Get "class" }} class="{{ . }}"{{ end }}>
{{- $options := .Get "src" | dict "src" -}}
{{- $options = .Get "src_s" | dict "src_s" | merge $options -}}
{{- $options = .Get "src_l" | dict "src_l" | merge $options -}}
{{- $options = .Get "title" | dict "title" | merge $options -}}
{{- $options = .Get "description" | dict "description" | merge $options -}}
{{- $lightgallery := ne .Page.Site.Params.page.lightgallery false | and (ne .Page.Params.lightgallery false) -}}
{{- $options = $lightgallery | dict "lightgallery" | merge $options -}}
{{- $options = .Page.Scratch.Get "scratch" | dict "scratch" | merge $options -}}
{{- partial "plugin/image.html" $options -}}
{{- with (.Get "title" | default .Get "description") -}}
<figcaption class="image-caption">
{{- . | safeHTML -}}
</figcaption>
{{- end -}}
</figure>
{{- $content := .Inner | .Page.RenderString -}}
{{- $tag := .Get 1 | default "div" -}}
{{- printf `<%s style="%s">%s</%s>` $tag ($.Get 0) $content $tag | safeHTML -}}
{"Target":"css/style.min.5313a7cd528e285a82280f60228e0e2501181a5445bde1bc99d7c7dbdb7a4767.css","MediaType":"text/css","Data":{"Integrity":"sha256-UxOnzVKOKFqCKA9gIo4OJQEYGlRFveG8mdfH29t6R2c="}}
\ No newline at end of file
{"Target":"css/style.min.22797a679118d2eb3f376ecb55adbba6052c813ae165d44e004bbf861d5a1ed1.css","MediaType":"text/css","Data":{"Integrity":"sha256-Inl6Z5EY0us/N27LVa27pgUsgTrhZdROAEu/hh1aHtE="}}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册