diff options
Diffstat (limited to 'site/layouts')
| -rw-r--r-- | site/layouts/partials/footer.html | 2 | ||||
| -rw-r--r-- | site/layouts/shortcodes/js-dismiss.html | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/site/layouts/partials/footer.html b/site/layouts/partials/footer.html index 5e0f88229..e3d0f13e4 100644 --- a/site/layouts/partials/footer.html +++ b/site/layouts/partials/footer.html @@ -18,7 +18,7 @@ <li class="mb-2"><a href="/">Home</a></li> <li class="mb-2"><a href="/docs/{{ .Site.Params.docs_version }}/">Docs</a></li> <li class="mb-2"><a href="/docs/{{ .Site.Params.docs_version }}/examples/">Examples</a></li> - <li class="mb-2"><a href="{{ .Site.Params.opencollective }}">Themes</a></li> + <li class="mb-2"><a href="{{ .Site.Params.themes }}">Themes</a></li> <li class="mb-2"><a href="{{ .Site.Params.blog }}">Blog</a></li> </ul> </div> diff --git a/site/layouts/shortcodes/js-dismiss.html b/site/layouts/shortcodes/js-dismiss.html new file mode 100644 index 000000000..45d72d0eb --- /dev/null +++ b/site/layouts/shortcodes/js-dismiss.html @@ -0,0 +1,15 @@ +{{- /* Usage: js-dismiss "ComponentName" */ -}} + +{{- $name := .Get 0 -}} + +Dismissal can be achieved with the `data` attribute on a button **within the {{ $name }}** as demonstrated below: + +```html +<button type="button" class="btn-close" data-bs-dismiss="{{ $name }}" aria-label="Close"></button> +``` + +or on a button **outside the {{ $name }}** using the `data-bs-target` as demonstrated below: + +```html +<button type="button" class="btn-close" data-bs-dismiss="{{ $name }}" data-bs-target="#my-{{ $name }}" aria-label="Close"></button> +``` |
