Skip to content

Commit

Permalink
feat: add text shortcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang committed Jul 15, 2022
1 parent 49ed2d9 commit fc5f1f2
Show file tree
Hide file tree
Showing 11 changed files with 164 additions and 0 deletions.
52 changes: 52 additions & 0 deletions exampleSite/content/docs/shortcodes/text/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
+++
# type = "docs"
title = "Text Shortcodes"
linkTitle = "Text"
date = 2022-07-15T01:00:43+08:00
# description = "" # Used by description meta tag, summary will be used instead if not set or empty.
featured = false
draft = false
comment = true
toc = true
reward = true
pinned = false
carousel = false
categories = ["Shortcode"]
tags = ["Text", "Text Alignment", "Text Transform", "Text Selection"]
series = ["Docs"]
images = []
+++

In this article, we will explore some shortcodes for text, such as alignment, transform and selection.

<!--more-->

## Text Transform

{{< text/lowercase >}}Lowercased text.{{< /text/lowercase >}}
{{< text/uppercase >}}Uppercased text.{{< /text/uppercase >}}
{{< text/capitalize >}}CapiTaliZed text.{{< /text/capitalize >}}

## Text Alignment

{{< text/align-start >}}
Align text to the start.
{{< /text/align-start >}}

{{< text/align-center >}}
Align text to the center.
{{< /text/align-center >}}

{{< text/align-end >}}
Align text to the end.
{{< /text/align-end >}}

## Text Selection

{{< text/user-select-all >}}
This paragraph will be entirely selected when clicked by the user.
{{< /text/user-select-all >}}

{{< text/user-select-none >}}
This paragraph will not be selectable when clicked by the user.
{{< /text/user-select-none >}}
52 changes: 52 additions & 0 deletions exampleSite/content/docs/shortcodes/text/index.zh-cn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
+++
# type = "docs"
title = "文本 Shortcodes"
linkTitle = "文本"
date = 2022-07-15T01:00:43+08:00
# description = "" # Used by description meta tag, summary will be used instead if not set or empty.
featured = false
draft = false
comment = true
toc = true
reward = true
pinned = false
carousel = false
categories = ["Shortcode"]
tags = ["文本", "文本对齐", "文本转换", "文本选择"]
series = ["文档"]
images = []
+++

在本文中,我们将探讨文本的一些短代码,例如文本的对齐、转换和选择。

<!--more-->

## 文本转换

{{< text/lowercase >}}Lowercased text.{{< /text/lowercase >}}
{{< text/uppercase >}}Uppercased text.{{< /text/uppercase >}}
{{< text/capitalize >}}CapiTaliZed text.{{< /text/capitalize >}}

## 文本对齐

{{< text/align-start >}}
Align text to the start.
{{< /text/align-start >}}

{{< text/align-center >}}
Align text to the center.
{{< /text/align-center >}}

{{< text/align-end >}}
Align text to the end.
{{< /text/align-end >}}

## 文本选择

{{< text/user-select-all >}}
This paragraph will be entirely selected when clicked by the user.
{{< /text/user-select-all >}}

{{< text/user-select-none >}}
This paragraph will not be selectable when clicked by the user.
{{< /text/user-select-none >}}
52 changes: 52 additions & 0 deletions exampleSite/content/docs/shortcodes/text/index.zh-tw.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
+++
# type = "docs"
title = "文本 Shortcodes"
linkTitle = "文本"
date = 2022-07-15T01:00:43+08:00
# description = "" # Used by description meta tag, summary will be used instead if not set or empty.
featured = false
draft = false
comment = true
toc = true
reward = true
pinned = false
carousel = false
categories = ["Shortcode"]
tags = ["文本", "文本對齊", "文本轉換", "文本選擇"]
series = ["文檔"]
images = []
+++

在本文中,我們將探討文本的一些短代碼,例如文本的對齊、轉換和選擇。

<!--more-->

## 文本轉換

{{< text/lowercase >}}Lowercased text.{{< /text/lowercase >}}
{{< text/uppercase >}}Uppercased text.{{< /text/uppercase >}}
{{< text/capitalize >}}CapiTaliZed text.{{< /text/capitalize >}}

## 文本對齊

{{< text/align-start >}}
Align text to the start.
{{< /text/align-start >}}

{{< text/align-center >}}
Align text to the center.
{{< /text/align-center >}}

{{< text/align-end >}}
Align text to the end.
{{< /text/align-end >}}

## 文本選擇

{{< text/user-select-all >}}
This paragraph will be entirely selected when clicked by the user.
{{< /text/user-select-all >}}

{{< text/user-select-none >}}
This paragraph will not be selectable when clicked by the user.
{{< /text/user-select-none >}}
1 change: 1 addition & 0 deletions layouts/shortcodes/text/align-center.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p class="text-center">{{ .Inner }}</p>
1 change: 1 addition & 0 deletions layouts/shortcodes/text/align-end.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p class="text-end">{{ .Inner }}</p>
1 change: 1 addition & 0 deletions layouts/shortcodes/text/align-start.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p class="text-start">{{ .Inner }}</p>
1 change: 1 addition & 0 deletions layouts/shortcodes/text/capitalize.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p class="text-capitalize">{{ .Inner }}</p>
1 change: 1 addition & 0 deletions layouts/shortcodes/text/lowercase.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>{{ .Inner | lower }}</p>
1 change: 1 addition & 0 deletions layouts/shortcodes/text/uppercase.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p>{{ .Inner | upper }}</p>
1 change: 1 addition & 0 deletions layouts/shortcodes/text/user-select-all.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p class="user-select-all">{{- .Inner -}}</p>
1 change: 1 addition & 0 deletions layouts/shortcodes/text/user-select-none.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p class="user-select-none">{{- .Inner -}}</p>

0 comments on commit fc5f1f2

Please sign in to comment.