]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Fix reference to twbs/examples/icons-font + fine-tune index.html SB location target...
authorJulien Déramond <julien.deramond@orange.com>
Fri, 24 Mar 2023 14:00:58 +0000 (15:00 +0100)
committerGitHub <noreply@github.com>
Fri, 24 Mar 2023 14:00:58 +0000 (16:00 +0200)
* Fix reference to twbs/examples/icons-font + fine-tune index.html SB location target

* Use urlquery

* Add `rel="noopener"`

---------

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
.cspell.json
site/content/docs/5.3/examples/_index.md
site/data/examples.yml

index 752acd5218740bfb87a414b266120567746fa755..e477ef83d3936ee6449c8eef87d0f8c44d80b55d 100644 (file)
     "unstyled",
     "Uppercased",
     "urlize",
+    "urlquery",
     "vbtn",
     "viewports",
     "Vite",
index 4ab6ffe5bff90ad79659010b99d2b8e257940f53..2fa9a45285f52500d2f0e1f8831e90075336c431 100644 (file)
@@ -26,13 +26,17 @@ aliases: "/examples/"
           <svg class="bi fs-5 flex-shrink-0 mt-1"><use xlink:href="#box-seam"></use></svg>
           <div>
             <h3 class="h5 mb-1">
-              <a class="d-block link-offset-1" href="{{ $.Site.Params.github_org }}{{ $example.url }}/" target="_blank">
+              <a class="d-block link-offset-1" href="{{ $.Site.Params.github_org }}{{ $example.url }}/" target="_blank" rel="noopener">
                 {{ $example.name }}
               </a>
             </h3>
             <p class="text-body-secondary">{{ $example.description }}</p>
             <p>
-              <a class="icon-link small link-secondary link-offset-1" href="https://stackblitz.com/github/twbs{{ $example.url }}?file=index.html" target="_blank">
+              {{- $htmlIndexLocation := "index.html" -}}
+              {{- if $example.htmlIndexLocation -}}
+                {{- $htmlIndexLocation = printf "%s/index.html" $example.htmlIndexLocation -}}
+              {{- end }}
+              <a class="icon-link small link-secondary link-offset-1" href="https://stackblitz.com/github/twbs{{ $example.url }}?file={{ $htmlIndexLocation | urlquery }}" target="_blank" rel="noopener">
                 <svg class="bi flex-shrink-0"><use xlink:href="#lightning-charge-fill"></use></svg>
                 Edit in StackBlitz
               </a>
index 017aaa7c5ec91ac454a863a25962bbac308de049..4b85c57b1fe07d3a0ae092841bddf86c4cd65192 100644 (file)
     - name: Webpack
       description: "Import and bundle Bootstrap's source Sass and JavaScript with Webpack."
       url: /examples/tree/main/webpack
+      htmlIndexLocation: src
     - name: Parcel
       description: "Import and bundle Bootstrap's source Sass and JavaScript via Parcel."
       url: /examples/tree/main/parcel
+      htmlIndexLocation: src
     - name: Vite
       description: "Import and bundle Bootstrap's source Sass and JavaScript with Vite."
       url: /examples/tree/main/vite
+      htmlIndexLocation: src
     - name: Bootstrap Icons
       description: "Import and compile Bootstrap's Sass with Stylelint, PurgeCSS, and the Bootstrap Icons web font."
-      url: /examples/tree/main/bootstrap-icons
+      url: /examples/tree/main/icons-font
 
 - category: Snippets
   description: "Common patterns for building sites and apps that build on existing components and utilities with custom CSS and more."