mirror of
https://github.com/twbs/bootstrap.git
synced 2024-12-02 14:24:19 +01:00
Allow to pass integrity & async attribute to extra js
This commit is contained in:
parent
ae0baff087
commit
3b73dfc44b
@ -4,7 +4,7 @@ title: Checkout example
|
|||||||
extra_css:
|
extra_css:
|
||||||
- "form-validation.css"
|
- "form-validation.css"
|
||||||
extra_js:
|
extra_js:
|
||||||
- "form-validation.js"
|
- src: "form-validation.js"
|
||||||
body_class: "bg-light"
|
body_class: "bg-light"
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -4,9 +4,11 @@ title: Dashboard Template
|
|||||||
extra_css:
|
extra_css:
|
||||||
- "dashboard.css"
|
- "dashboard.css"
|
||||||
extra_js:
|
extra_js:
|
||||||
- "https://cdnjs.cloudflare.com/ajax/libs/feather-icons/4.9.0/feather.min.js"
|
- src: "https://cdnjs.cloudflare.com/ajax/libs/feather-icons/4.22.1/feather.min.js"
|
||||||
- "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.min.js"
|
integrity: "sha256-v7ozvh+7DfgbxrO6V1UgXsR+DDFHZr5ESbMWn6J5c8s="
|
||||||
- "dashboard.js"
|
- src: "https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.js"
|
||||||
|
integrity: "sha256-Uv9BNBucvCPipKQ2NS9wYpJmi8DTOEfTA/nH2aoJALw="
|
||||||
|
- src: "dashboard.js"
|
||||||
---
|
---
|
||||||
|
|
||||||
<nav class="navbar navbar-dark fixed-top bg-dark flex-md-nowrap p-0 shadow">
|
<nav class="navbar navbar-dark fixed-top bg-dark flex-md-nowrap p-0 shadow">
|
||||||
|
@ -4,7 +4,7 @@ title: Offcanvas template
|
|||||||
extra_css:
|
extra_css:
|
||||||
- "offcanvas.css"
|
- "offcanvas.css"
|
||||||
extra_js:
|
extra_js:
|
||||||
- "offcanvas.js"
|
- src: "offcanvas.js"
|
||||||
body_class: "bg-light"
|
body_class: "bg-light"
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -50,7 +50,9 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
{{ range .Page.Params.extra_js }}
|
{{ range .Page.Params.extra_js }}
|
||||||
<script src="{{ . }}"></script>
|
{{ $integrity := .integrity }}
|
||||||
|
{{ $async := .async }}
|
||||||
|
<script src="{{ .src }}"{{ with $integrity }} integrity="{{ $integrity }}"{{ end }}{{ with $async }} async{{ end }} crossorigin="anonymous"></script>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
Reference in New Issue
Block a user