Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 6 commits into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
"unstyled",
"Uppercased",
"urlize",
"urlquery",
"vbtn",
"viewports",
"Vite",
Expand Down
8 changes: 6 additions & 2 deletions site/content/docs/5.3/examples/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
5 changes: 4 additions & 1 deletion site/data/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,18 @@
- 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."
Expand Down