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

Redirected 404 Button to stay on the original tab. #730

Merged
merged 3 commits into from
Nov 20, 2022
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
9 changes: 8 additions & 1 deletion src/lib/components/button/button.svelte
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
<script lang="ts">
export let link = '#';
export let redirect = false;
export let text = 'Submit';
</script>

<a class="brand-header size-md" role="button" href={link} target="_blank" rel="noopener norefferer">
<a
class="brand-header size-md"
role="button"
href={link}
target={redirect ? '_blank' : '_self'}
rel="noopener norefferer"
>
{text}
</a>

Expand Down
2 changes: 1 addition & 1 deletion src/routes/(site)/hero.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<b class="acm-blue">CSUF</b>
</h1>

<AcmButton text="Join us today!" link="/discord" />
<AcmButton text="Join us today!" link="/discord" redirect={true}/>
</div>

<img
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(site)/ready-up.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
</p>
</div>

<AcmButton text="Join us today!" link="/discord" />
<AcmButton text="Join us today!" link="/discord" redirect={true} />
</div>
</section>

Expand Down