1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-02-19 15:40:59 +00:00

Fix reference to twbs/examples/icons-font + fine-tune index.html SB location target (#38310)

* 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>
This commit is contained in:
Julien Déramond 2023-03-24 15:00:58 +01:00 committed by GitHub
parent e8730484b8
commit 0653e7f648
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 3 deletions

View File

@ -108,6 +108,7 @@
"unstyled", "unstyled",
"Uppercased", "Uppercased",
"urlize", "urlize",
"urlquery",
"vbtn", "vbtn",
"viewports", "viewports",
"Vite", "Vite",

View File

@ -26,13 +26,17 @@ aliases: "/examples/"
<svg class="bi fs-5 flex-shrink-0 mt-1"><use xlink:href="#box-seam"></use></svg> <svg class="bi fs-5 flex-shrink-0 mt-1"><use xlink:href="#box-seam"></use></svg>
<div> <div>
<h3 class="h5 mb-1"> <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 }} {{ $example.name }}
</a> </a>
</h3> </h3>
<p class="text-body-secondary">{{ $example.description }}</p> <p class="text-body-secondary">{{ $example.description }}</p>
<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> <svg class="bi flex-shrink-0"><use xlink:href="#lightning-charge-fill"></use></svg>
Edit in StackBlitz Edit in StackBlitz
</a> </a>

View File

@ -14,15 +14,18 @@
- name: Webpack - name: Webpack
description: "Import and bundle Bootstrap's source Sass and JavaScript with Webpack." description: "Import and bundle Bootstrap's source Sass and JavaScript with Webpack."
url: /examples/tree/main/webpack url: /examples/tree/main/webpack
htmlIndexLocation: src
- name: Parcel - name: Parcel
description: "Import and bundle Bootstrap's source Sass and JavaScript via Parcel." description: "Import and bundle Bootstrap's source Sass and JavaScript via Parcel."
url: /examples/tree/main/parcel url: /examples/tree/main/parcel
htmlIndexLocation: src
- name: Vite - name: Vite
description: "Import and bundle Bootstrap's source Sass and JavaScript with Vite." description: "Import and bundle Bootstrap's source Sass and JavaScript with Vite."
url: /examples/tree/main/vite url: /examples/tree/main/vite
htmlIndexLocation: src
- name: Bootstrap Icons - name: Bootstrap Icons
description: "Import and compile Bootstrap's Sass with Stylelint, PurgeCSS, and the Bootstrap Icons web font." 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 - category: Snippets
description: "Common patterns for building sites and apps that build on existing components and utilities with custom CSS and more." description: "Common patterns for building sites and apps that build on existing components and utilities with custom CSS and more."