mirror of
https://github.com/imfing/hextra.git
synced 2025-06-19 10:24:16 -04:00
feat: add badge shortcode (#457)
* feat: move badge to a separate partial * feat: badge shortcode * docs: add badge shortcode examples * chore: generate css * docs: add spaces between badges
This commit is contained in:
@ -10,6 +10,41 @@ sidebar:
|
||||
These shortcodes are considered less stable and may be changed anytime.
|
||||
{{< /callout >}}
|
||||
|
||||
## Badge
|
||||
|
||||
```
|
||||
{{</* badge "Badge" */>}}
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
{{< badge "Badge" >}}
|
||||
|
||||
Variants:
|
||||
|
||||
```
|
||||
{{</* badge content="info" type="info" */>}}
|
||||
{{</* badge content="warning" type="warning" */>}}
|
||||
{{</* badge content="error" type="error" */>}}
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
{{< badge content="info" type="info" >}}
|
||||
{{< badge content="warning" type="warning" >}}
|
||||
{{< badge content="error" type="error" >}}
|
||||
|
||||
With link:
|
||||
|
||||
```
|
||||
{{</* badge content="Releases" link="https://github.com/imfing/hextra/releases" */>}}
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
{{< badge content="Releases" link="https://github.com/imfing/hextra/releases" >}}
|
||||
|
||||
|
||||
## YouTube
|
||||
|
||||
Embed a YouTube video.
|
||||
|
@ -209,6 +209,7 @@
|
||||
"group-hover:hx-underline",
|
||||
"group-open:before:hx-rotate-90",
|
||||
"hamburger-menu",
|
||||
"hextra-badge",
|
||||
"hextra-card",
|
||||
"hextra-card-icon",
|
||||
"hextra-card-image",
|
||||
@ -464,6 +465,7 @@
|
||||
"hx-sticky",
|
||||
"hx-text-2xl",
|
||||
"hx-text-4xl",
|
||||
"hx-text-[.65rem]",
|
||||
"hx-text-[10px]",
|
||||
"hx-text-[color:hsl(var(--primary-hue),100%,50%)]",
|
||||
"hx-text-base",
|
||||
@ -488,7 +490,6 @@
|
||||
"hx-text-white",
|
||||
"hx-text-xl",
|
||||
"hx-text-xs",
|
||||
"hx-text-xxs",
|
||||
"hx-text-yellow-900",
|
||||
"hx-to-gray-600",
|
||||
"hx-top-0",
|
||||
|
Reference in New Issue
Block a user