Compare commits
4 commits
main
...
main-xmr-d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5bcb6df688 | ||
|
|
1e4d088c00 | ||
|
|
d51374f9b9 | ||
|
|
e3624bb986 |
4 changed files with 28 additions and 3 deletions
|
|
@ -198,7 +198,7 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt
|
|||
<td><code>selector</code></td>
|
||||
<td>string | false</td>
|
||||
<td><code>false</code></td>
|
||||
<td>If a selector is provided, popover objects will be delegated to the specified targets. In practice, this is used to enable dynamic HTML content to have popovers added. See <a href="{{< param repo >}}/issues/4215">this</a> and <a href="https://codepen.io/team/bootstrap/pen/zYBXGwX?editors=1010">an informative example</a>.</td>
|
||||
<td>If a selector is provided, popover objects will be delegated to the specified targets. In practice, this is used to enable dynamic HTML content to have popovers added. See {{< gh "issue 4215" >}} and <a href="https://codepen.io/team/bootstrap/pen/zYBXGwX?editors=1010">an informative example</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>template</code></td>
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt
|
|||
<td><code>selector</code></td>
|
||||
<td>string | false</td>
|
||||
<td><code>false</code></td>
|
||||
<td>If a selector is provided, tooltip objects will be delegated to the specified targets. In practice, this is used to also apply tooltips to dynamically added DOM elements (<code>jQuery.on</code> support). See <a href="{{< param repo >}}/issues/4215">this</a> and <a href="https://codepen.io/team/bootstrap/pen/zYBXGwX?editors=1010">an informative example</a>.</td>
|
||||
<td>If a selector is provided, tooltip objects will be delegated to the specified targets. In practice, this is used to also apply tooltips to dynamically added DOM elements (<code>jQuery.on</code> support). See {{< gh "issue 4215" >}} and <a href="https://codepen.io/team/bootstrap/pen/zYBXGwX?editors=1010">an informative example</a>.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>template</code></td>
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ While this approach is understandable, please pay attention to the following:
|
|||
|
||||
1. When switching `.ltr` and `.rtl`, make sure you add `dir` and `lang` attributes accordingly.
|
||||
2. Loading both files can be a real performance bottleneck: consider some [optimization]({{< docsref "/customize/optimize" >}}), and maybe try to [load one of those files asynchronously](https://www.filamentgroup.com/lab/load-css-simpler/).
|
||||
3. Nesting styles this way will prevent our `form-validation-state()` mixin from working as intended, thus require you tweak it a bit by yourself. [See #31223](https://github.com/twbs/bootstrap/issues/31223).
|
||||
3. Nesting styles this way will prevent our `form-validation-state()` mixin from working as intended, thus require you tweak it a bit by yourself. See {{< gh "issue 31223" >}}.
|
||||
{{< /callout >}}
|
||||
|
||||
## The breadcrumb case
|
||||
|
|
|
|||
25
site/layouts/shortcodes/gh.html
Normal file
25
site/layouts/shortcodes/gh.html
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{{- /*
|
||||
Usage: gh "foo", where foo can be:
|
||||
|
||||
* "pr 1" -> <a href="https://github.com/twbs/bootstrap/pull/1">#1</a>
|
||||
* "issue 2" -> <a href="https://github.com/twbs/bootstrap/issues/2">#2</a>
|
||||
* "@XhmikosR" -> <a href="https://github.com/XhmikosR">@XhmikosR</a>
|
||||
* "a3b09530fb31cfe6bd14d49965c19e8f89c1b023" -> <a href="https://github.com/twbs/bootstrap/commit/a3b09530fb31cfe6bd14d49965c19e8f89c1b023">a3b0953</a>
|
||||
* "a3b0953" -> <a href="https://github.com/twbs/bootstrap/commit/a3b09530fb31cfe6bd14d49965c19e8f89c1b023">a3b0953</a>
|
||||
|
||||
Quotes are not always needed, but Hugo can choke on some characters like @, in which case wrap the parameter with quotes. Also, they are needed for PR and Issue
|
||||
*/ -}}
|
||||
|
||||
{{ range .Params -}}
|
||||
{{- if hasPrefix . "@" -}}
|
||||
<a href="https://github.com/{{ substr . 1 }}">{{ . }}</a>
|
||||
{{- else if hasPrefix (. | lower) "pr" -}}
|
||||
<a href="{{ $.Site.Params.repo }}/pull/{{ trim (substr . 2) " " }}">#{{ trim (substr . 2) " " }}</a>
|
||||
{{- else if hasPrefix (. | lower) "issue" -}}
|
||||
<a href="{{ $.Site.Params.repo }}/issues/{{ trim (substr . 5) " " }}">#{{ trim (substr . (len "issue")) " " }}</a>
|
||||
{{- else if or (eq (len .) 7) (eq (len .) 40) -}}
|
||||
<a href="{{ $.Site.Params.repo }}/commit/{{ trim . " " }}">{{ trim (substr . 0 7) " " }}</a>
|
||||
{{- else -}}
|
||||
{{ errorf `Wrong parameter passed in %q shortcode: %s` $.Name $.Position }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue