mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-14 09:34:36 +02:00
WIP
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
import sdk from '@stackblitz/sdk'
|
import sdk from '@stackblitz/sdk'
|
||||||
// https://gohugo.io/hugo-pipes/js/#options
|
// https://gohugo.io/hugo-pipes/js/#options
|
||||||
import {
|
import {
|
||||||
cssCdn, cssCdnHash, docsVersion, jsBundleCdn, jsBundleCdnHash, jsSnippetFile
|
cssCdn, cssCdnHash, docsVersion, jsBundleCdn, jsBundleCdnHash, jsSnippetFile, isNetlify
|
||||||
} from '@params' // eslint-disable-line import/no-unresolved
|
} from '@params' // eslint-disable-line import/no-unresolved
|
||||||
|
|
||||||
// Open in StackBlitz logic
|
// Open in StackBlitz logic
|
||||||
@@ -38,10 +38,10 @@ const openBootstrapSnippet = (htmlSnippet, jsSnippet, classes) => {
|
|||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<link href="${cssCdn}" rel="stylesheet" integrity="${cssCdnHash}" crossorigin="anonymous">
|
<link href="${cssCdn}" rel="stylesheet"${!isNetlify ? `integrity="${cssCdnHash}" crossorigin="anonymous"` : ''}>
|
||||||
<link href="https://getbootstrap.com/docs/${docsVersion}/assets/css/docs.css" rel="stylesheet">
|
<link href="https://getbootstrap.com/docs/${docsVersion}/assets/css/docs.css" rel="stylesheet">
|
||||||
<title>Bootstrap Example</title>
|
<title>Bootstrap Example</title>
|
||||||
<${'script'} defer src="${jsBundleCdn}" integrity="${jsBundleCdnHash}" crossorigin="anonymous"></${'script'}>
|
<${'script'} defer src="${jsBundleCdn}"${!isNetlify ? `integrity="${jsBundleCdnHash}" crossorigin="anonymous"` : ''}></${'script'}>
|
||||||
</head>
|
</head>
|
||||||
<body class="p-3 m-0 border-0 ${classes}">
|
<body class="p-3 m-0 border-0 ${classes}">
|
||||||
<!-- Example Code Start-->
|
<!-- Example Code Start-->
|
||||||
|
@@ -28,6 +28,7 @@
|
|||||||
{{ if eq .Page.Layout "docs" -}}
|
{{ if eq .Page.Layout "docs" -}}
|
||||||
{{- $snippetsFile := resources.Get "js/snippets.js" | js.Build $esbuildOptions -}}
|
{{- $snippetsFile := resources.Get "js/snippets.js" | js.Build $esbuildOptions -}}
|
||||||
{{- $esbuildParams := dict
|
{{- $esbuildParams := dict
|
||||||
|
"isNetlify" (eq (getenv "NETLIFY") "true")
|
||||||
"cssCdn" .Site.Params.cdn.css
|
"cssCdn" .Site.Params.cdn.css
|
||||||
"cssCdnHash" .Site.Params.cdn.css_hash
|
"cssCdnHash" .Site.Params.cdn.css_hash
|
||||||
"jsBundleCdn" .Site.Params.cdn.js_bundle
|
"jsBundleCdn" .Site.Params.cdn.js_bundle
|
||||||
|
Reference in New Issue
Block a user