mirror of https://github.com/jpanther/congo.git
🚸 Allow icon to be specified in `alert` shortcode
parent
c1857711ed
commit
e5021c9d30
|
@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
- Markdown images and `figure` shortcode now search the `assets/` directory if an image cannot be found in page bundle ([#126](https://github.com/jpanther/congo/issues/126))
|
- Markdown images and `figure` shortcode now search the `assets/` directory if an image cannot be found in page bundle ([#126](https://github.com/jpanther/congo/issues/126))
|
||||||
- Markdown images and `figure` shortcode now fallback to static assets if an image is not provided as a Hugo resource ([#126](https://github.com/jpanther/congo/issues/126))
|
- Markdown images and `figure` shortcode now fallback to static assets if an image is not provided as a Hugo resource ([#126](https://github.com/jpanther/congo/issues/126))
|
||||||
- Taxonomy term listings now honour the `groupByYear` parameter ([#145](https://github.com/jpanther/congo/pull/145))
|
- Taxonomy term listings now honour the `groupByYear` parameter ([#145](https://github.com/jpanther/congo/pull/145))
|
||||||
|
- The `alert` shortcode now allows its icon to be specified as a parameter
|
||||||
|
|
||||||
## [2.0.5] - 2022-02-20
|
## [2.0.5] - 2022-02-20
|
||||||
|
|
||||||
|
|
|
@ -15,17 +15,27 @@ In addition to all the [default Hugo shortcodes](https://gohugo.io/content-manag
|
||||||
|
|
||||||
The input is written in Markdown so you can format it however you please.
|
The input is written in Markdown so you can format it however you please.
|
||||||
|
|
||||||
|
By default, the alert is presented with an exclaimation triangle icon. To change the icon, include the icon name in the shortcode. Check out the [icon shortcode](#icon) for more details on using icons.
|
||||||
|
|
||||||
**Example:**
|
**Example:**
|
||||||
|
|
||||||
```md
|
```md
|
||||||
{{</* alert */>}}
|
{{</* alert */>}}
|
||||||
**Warning!** This action is destructive!
|
**Warning!** This action is destructive!
|
||||||
{{</* /alert */>}}
|
{{</* /alert */>}}
|
||||||
|
|
||||||
|
{{</* alert "twitter" */>}}
|
||||||
|
Don't forget to [follow me](https://twitter.com/jpanther) on Twitter.
|
||||||
|
{{</* /alert */>}}
|
||||||
```
|
```
|
||||||
|
|
||||||
{{< alert >}}
|
{{< alert >}}
|
||||||
**Warning!** This action is destructive!
|
**Warning!** This action is destructive!
|
||||||
{{< /alert >}}
|
{{< /alert >}}
|
||||||
|
|
||||||
|
{{< alert "twitter" >}}
|
||||||
|
Don't forget to [follow me](https://twitter.com/jpanther) on Twitter.
|
||||||
|
{{< /alert >}}
|
||||||
|
|
||||||
## Badge
|
## Badge
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="flex px-4 py-3 rounded-md bg-primary-100 dark:bg-primary-900">
|
<div class="flex px-4 py-3 rounded-md bg-primary-100 dark:bg-primary-900">
|
||||||
<span class="ltr:pr-3 rtl:pl-3 text-primary-400">
|
<span class="ltr:pr-3 rtl:pl-3 text-primary-400">
|
||||||
{{ partial "icon.html" "exclamation-triangle" }}
|
{{ partial "icon.html" (.Get 0 | default "exclamation-triangle") }}
|
||||||
</span>
|
</span>
|
||||||
<span class="dark:text-neutral-300">
|
<span class="dark:text-neutral-300">
|
||||||
{{- .Inner | markdownify -}}
|
{{- .Inner | markdownify -}}
|
||||||
|
|
Loading…
Reference in New Issue