Skip to content

Commit

Permalink
Docs: Make "Edit in Stackblitz" links explicit in 'Examples' page (#4…
Browse files Browse the repository at this point in the history
…0766)

Co-authored-by: Julien Déramond <juderamond@gmail.com>
  • Loading branch information
hannahiss and julien-deramond authored Oct 6, 2024
1 parent d07536f commit 653f8f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions site/layouts/partials/examples/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,17 @@ <h2 id="{{ $entry.category | urlize }}">{{ $entry.category }}</h2>
<svg class="bi fs-5 flex-shrink-0 mt-1" aria-hidden="true"><use xlink:href="#box-seam"></use></svg>
<div>
<h3 class="h5 mb-1">
<a class="d-block link-offset-1" href="{{ urls.JoinPath $.Site.Params.github_org $example.url }}" target="_blank" rel="noopener">
<a class="d-block link-offset-1" href="{{ urls.JoinPath $.Site.Params.github_org $example.url }}" target="_blank" rel="noopener" id="starter-{{ $i }}">
{{ $example.name }}
</a>
</h3>
<p class="text-body-secondary">{{ $example.description }}</p>
<p>
{{- $indexPath := default "index.html" $example.indexPath -}}
{{- $stackBlitzUrl := printf "%s%s%s" (urls.JoinPath "https://stackblitz.com/github/twbs" $example.url) "?file=" ($indexPath | urlquery) }}
<a class="icon-link small link-secondary link-offset-1" href="{{ $stackBlitzUrl }}" target="_blank" rel="noopener">
<a class="icon-link small link-secondary link-offset-1" href="{{ $stackBlitzUrl }}" target="_blank" rel="noopener" aria-labelledby="edit-{{ $i }} starter-{{ $i }}">
<svg class="bi flex-shrink-0" aria-hidden="true"><use xlink:href="#lightning-charge-fill"></use></svg>
Edit in StackBlitz
<span id="edit-{{ $i }}">Edit in StackBlitz</span>
</a>
</p>
</div>
Expand Down

0 comments on commit 653f8f3

Please sign in to comment.