Skip to content

Commit

Permalink
Fix double slash issue in contribution links
Browse files Browse the repository at this point in the history
  • Loading branch information
rumenpetrov committed Oct 3, 2024
1 parent 274a7db commit 15c5568
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/components/EmbeddedDocumentPreview.astro
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
---
const { index, name } = Astro.props;
---

<div class="root">
<iframe src={`${import.meta.env.BASE_URL}challenge-contributions/${index}/${name}.html`} class="preview"></iframe>
<iframe
src={`${import.meta.env.BASE_URL}challenge-contributions/${index}/${name}.html`}
class="preview"></iframe>

<div class="actions">
<a href={`${import.meta.env.BASE_URL}/challenge-contributions/${index}/${name}.html`}>Go to {name}.html</a>
<a
href={`${import.meta.env.BASE_URL}challenge-contributions/${index}/${name}.html`}
target="_blank"
rel="noopener noreferrer">Go to {name}.html</a
>
</div>
</div>

Expand All @@ -32,4 +39,4 @@ const { index, name } = Astro.props;
.actions {
text-align: center;
}
</style>
</style>

0 comments on commit 15c5568

Please sign in to comment.