mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-17 19:21:23 +03:00
Improve callout shortcode. (#31802)
Remove the `markdownify` call, and instead rely on Hugo's proper syntax; `{{% callout %}}` when we want to the content to be processed as Markdown.
This allows for stuff like:
{{% callout info %}}
##### I'm an info callout!
```css
.foo {
color: #fff;
}
```
{{< example >}}
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<strong>Holy guacamole!</strong> You should check in on some of those fields below.
<button type="button" class="btn-close" data-dismiss="alert" aria-label="Close"></button>
</div>
{{< /example >}}
{{% /callout %}}
This commit is contained in:
@@ -22,9 +22,9 @@ Alerts are available for any length of text, as well as an optional close button
|
||||
{{< /alerts.inline >}}
|
||||
{{< /example >}}
|
||||
|
||||
{{< callout info >}}
|
||||
{{% callout info %}}
|
||||
{{< partial "callout-warning-color-assistive-technologies.md" >}}
|
||||
{{< /callout >}}
|
||||
{{% /callout %}}
|
||||
|
||||
### Link color
|
||||
|
||||
@@ -70,9 +70,9 @@ You can see this in action with a live demo:
|
||||
</div>
|
||||
{{< /example >}}
|
||||
|
||||
{{< callout warning >}}
|
||||
{{% callout warning %}}
|
||||
When an alert is dismissed, the element is completely removed from the page structure. If a keyboard user dismisses the alert using the close button, their focus will suddenly be lost and, depending on the browser, reset to the start of the page/document. For this reason, we recommend including additional JavaScript that listens for the `closed.bs.alert` event and programmatically sets `focus()` to the most appropriate location in the page. If you're planning to move focus to a non-interactive element that normally does not receive focus, make sure to add `tabindex="-1"` to the element.
|
||||
{{< /callout >}}
|
||||
{{% /callout %}}
|
||||
|
||||
## JavaScript behavior
|
||||
|
||||
|
||||
Reference in New Issue
Block a user