<div class="test">This is a test.</div>
{{< /example >}}
+{{< example class=bg-body-secondary >}}
+<div class="test">This is a test with a custom background color.</div>
+{{< /example >}}
+
{{< scss-docs name="variable-gradient" file="scss/_variables.scss" >}}
- {{< js-docs name="live-toast" file="site/assets/js/snippets.js" >}}
+ {{< js-docs name="live-toast" file="site/assets/js/partials/snippets.js" >}}
{{- $content := .Inner -}}
<div class="bd-example-snippet bd-code-snippet">
- {{- if eq $show_preview true -}}
+ {{- if eq $show_preview true }}
<div{{ with $id }} id="{{ . }}"{{ end }} class="bd-example m-0 border-0{{ with $class }} {{ . }}{{ end }}">
- {{- $input -}}
+ {{ $content }}
</div>
- {{- end -}}
+ {{- end }}
- {{- if eq $show_markup true -}}
- {{- if eq $show_preview true -}}
- <div class="d-flex align-items-center highlight-toolbar ps-3 pe-2 py-1 border-0 border-top border-bottom">
- <small class="font-monospace text-body-secondary text-uppercase">{{ $lang }}</small>
- <div class="d-flex ms-auto">
- <button type="button" class="btn-edit text-nowrap"{{ with $stackblitz_add_js }} data-sb-js-snippet="{{ $stackblitz_add_js }}"{{ end }} title="Try it on StackBlitz">
- <svg class="bi" aria-hidden="true"><use xlink:href="#lightning-charge-fill"/></svg>
- </button>
- <button type="button" class="btn-clipboard mt-0 me-0" title="Copy to clipboard">
+ <div class="d-flex align-items-center highlight-toolbar ps-3 pe-2 py-1">
- <small class="font-monospace text-body-secondary text-uppercase">{{- $lang -}}</small>
++ <small class="font-monospace text-body-secondary text-uppercase">{{ $lang }}</small>
+ <div class="d-flex ms-auto">
+ {{- if eq $show_preview true -}}
+ <button type="button" class="btn-edit text-nowrap"{{ with $stackblitz_add_js }} data-sb-js-snippet="{{ $stackblitz_add_js }}"{{ end }} title="Try it on StackBlitz">
+ <svg class="bi" aria-hidden="true"><use xlink:href="#lightning-charge-fill"/></svg>
+ </button>
+ {{- end -}}
+ <button type="button" class="btn-clipboard mt-0 me-0" title="Copy to clipboard">
<svg class="bi" aria-hidden="true"><use xlink:href="#clipboard"/></svg>
</button>
</div>