-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Play an otter sound when the logo is clicked
- Loading branch information
1 parent
0c77193
commit a746679
Showing
3 changed files
with
18 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,20 @@ | ||
<div class="page-header logo"> | ||
<div class="page-header logo" onclick="playAudio()"> | ||
<h1><% if (config.subtitle){ %><%= config.subtitle%><% } else { %><%= config.title%><% }%><span class="blink-fast">∎</span></h1> | ||
</div> | ||
|
||
<%- partial('_partial/index', {index: true}) %> | ||
<%- partial('_partial/index', {index: true}) %> | ||
|
||
<audio id="audio" src="../otter_whistle_snarl.mp3"></audio> | ||
|
||
<script> | ||
/* | ||
Function that plays the audio file inside the audio element. | ||
*/ | ||
function playAudio() { | ||
var audio = document.getElementById("audio"); | ||
if(audio) { | ||
audio.volume = 0.5; // Lowering the volume to 50% | ||
audio.play(); | ||
} | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.