Skip to content
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
13 changes: 13 additions & 0 deletions LICENSES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Third-Party Licenses & Attributions

This project includes third-party assets that are licensed separately.

---

## Sound: "Sad Trombone"

- Author: Benboncan
- Source: https://freesound.org/people/Benboncan/sounds/73581/
- License: Creative Commons Attribution 4.0 International (CC BY 4.0)
- License text: https://creativecommons.org/licenses/by/4.0/
- Modifications: Re-encoded from WAV to Ogg Vorbis
18 changes: 18 additions & 0 deletions src/lib/components/common/Menu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
import { resolve } from "$app/paths";
import { page } from "$app/state";
import { m } from "$lib/paraglide/messages.js";
import { getLocale } from "$lib/paraglide/runtime";
import sadtrombone from "$lib/sound/sadtrombone.ogg";

const sadTromboneText: string = "🪊 surullinen pasuuna";

let audio: HTMLAudioElement;

function playAudio() {
audio.currentTime = 0;
audio.play();
}
</script>

<div class="menu">
Expand Down Expand Up @@ -33,6 +44,13 @@
<li aria-current={page.url.pathname === "/contacts" ? "page" : undefined}>
<a href={resolve("/contacts")}>{m["navigation.contacts"]()}</a>
</li>
{#if getLocale() === "fi"}
<li>
<!-- svelte-ignore a11y_invalid_attribute -->
<a href="#" onclick={playAudio}>{sadTromboneText.toUpperCase()}</a>
</li>
<audio bind:this={audio} src={sadtrombone}></audio>
{/if}
</ul>
</nav>
</div>
Expand Down
Binary file added src/lib/sound/sadtrombone.ogg
Binary file not shown.
Loading