Compare commits
11 commits
ab8d36a66f
...
d071dad97a
Author | SHA1 | Date | |
---|---|---|---|
d071dad97a | |||
d8b7bf27bf | |||
52e9775173 | |||
1e30532bc9 | |||
8f84fff4e4 | |||
f6039d562d | |||
1e9b1bccca | |||
a330503ad3 | |||
01b1ea04bf | |||
5c3a49b75c | |||
e69d4bfae3 |
10 changed files with 39 additions and 10 deletions
BIN
src/assets/effects/click_1.wav
Normal file
BIN
src/assets/effects/click_1.wav
Normal file
Binary file not shown.
BIN
src/assets/effects/hover_1.wav
Normal file
BIN
src/assets/effects/hover_1.wav
Normal file
Binary file not shown.
BIN
src/assets/effects/hover_2.wav
Normal file
BIN
src/assets/effects/hover_2.wav
Normal file
Binary file not shown.
BIN
src/assets/effects/hover_3.wav
Normal file
BIN
src/assets/effects/hover_3.wav
Normal file
Binary file not shown.
BIN
src/assets/effects/hover_4.wav
Normal file
BIN
src/assets/effects/hover_4.wav
Normal file
Binary file not shown.
BIN
src/assets/effects/hover_5.wav
Normal file
BIN
src/assets/effects/hover_5.wav
Normal file
Binary file not shown.
BIN
src/assets/effects/hover_6.wav
Normal file
BIN
src/assets/effects/hover_6.wav
Normal file
Binary file not shown.
25
src/assets/sound.js
Normal file
25
src/assets/sound.js
Normal file
|
@ -0,0 +1,25 @@
|
|||
function load_effects(names) {
|
||||
return names.map(name => {
|
||||
let audio = document.createElement("audio");
|
||||
audio.src = `/assets/effects/${name}.wav`;
|
||||
audio.volume = 0.1;
|
||||
return audio;
|
||||
});
|
||||
}
|
||||
|
||||
function play_random(effects) {
|
||||
let index = Math.floor(Math.random() * effects.length);
|
||||
effects[index].pause();
|
||||
effects[index].play().catch(() => { });
|
||||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", () => {
|
||||
let click_effects = load_effects(["click_1"]);
|
||||
let hover_effects = load_effects(["hover_1", "hover_2", "hover_3", "hover_4", "hover_5", "hover_6"]);
|
||||
let links = [...document.getElementsByTagName("a")];
|
||||
links.forEach(link => {
|
||||
link.addEventListener("mouseover", () => play_random(hover_effects));
|
||||
link.addEventListener("mousedown", () => play_random(click_effects));
|
||||
});
|
||||
})
|
||||
|
|
@ -1,12 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="da-dk">
|
||||
<html lang="en-us">
|
||||
|
||||
<head>
|
||||
<title>Frederik Palmø</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="description" content="Home page of Frederik Palmø (vodofrede)" />
|
||||
<link rel="stylesheet" href="/assets/main.css" />
|
||||
<link rel="icon" type="image/x-icon " href="/assets/favicon.ico" />
|
||||
<script src="/assets/sound.js"></script>
|
||||
</head>
|
||||
|
||||
<body class="column separate" style="padding: 2%; gap: 15px">
|
||||
|
@ -18,7 +20,7 @@
|
|||
<h2>Projects</h2>
|
||||
<article class="column separate">
|
||||
<div class="row separate wrap">
|
||||
<h3>Character planner</h3>
|
||||
<h3>Character Planner</h3>
|
||||
<span class="row separate">
|
||||
<a href="https://erdtree.palmoe.dk">project</a>
|
||||
<a href="https://git.palmoe.dk/vodofrede/erdtree">source</a>
|
||||
|
@ -28,7 +30,7 @@
|
|||
</article>
|
||||
<article class="column separate">
|
||||
<div class="row separate wrap">
|
||||
<h3>Hashing library</h3>
|
||||
<h3>Hashing Library</h3>
|
||||
<span class="row separate">
|
||||
<a href="https://crates.io/crates/lore">project</a>
|
||||
<a href="https://git.palmoe.dk/vodofrede/lore">source</a>
|
||||
|
@ -39,7 +41,7 @@
|
|||
</article>
|
||||
<article class="column separate">
|
||||
<div class="row separate wrap">
|
||||
<h3>Leetcode input parser</h3>
|
||||
<h3>Leetcode Input Parser</h3>
|
||||
<span class="row separate">
|
||||
<a href="https://crates.io/crates/eyes">project</a>
|
||||
<a href="https://git.palmoe.dk/vodofrede/eyes">source</a>
|
||||
|
@ -50,14 +52,14 @@
|
|||
</article>
|
||||
<article class="column separate">
|
||||
<div class="row separate wrap">
|
||||
<h3>Controllable string lights</h3>
|
||||
<h3>Controllable String Lights</h3>
|
||||
<span class="row separate"></span>
|
||||
</div>
|
||||
<p>This project involved a solution for having outdoor string lights for use in a covered lounge area. The project utilizes inexpensive, "dumb" string lights along with a microcontroller that provides a control interface accessible over the home network (for platforms like Apple HomeKit and Home-Assistant). Through this project, I have learned about IoT protocols and programming microcontrollers.</p>
|
||||
</article>
|
||||
<article class="column separate">
|
||||
<div class="row separate wrap">
|
||||
<h3>Clones of Galaga og Breakout</h3>
|
||||
<h3>Clones of Galaga and Breakout</h3>
|
||||
<span class="row separate">
|
||||
<a href="https://github.com/vodofrede/DIKUGames">source</a>
|
||||
</span>
|
||||
|
@ -73,8 +75,8 @@
|
|||
</article>
|
||||
</section>
|
||||
<aside class="column" style="align-items: center; min-width: 25%; gap: 15px">
|
||||
<img src="/assets/palmoe.png" style="width: 50%; height: auto; border-radius: 10px" alt="palmoe.dk logo" />
|
||||
<dl>
|
||||
<img src="/assets/palmoe.png" width="100" height="100" style="width: 50%; height: auto; border-radius: 10px" alt="palmoe.dk logo" />
|
||||
<dl class="column center" style="gap: 8px;">
|
||||
<div class="row separate">
|
||||
<dt>Gitea</dt>
|
||||
<dd><a href="https://git.palmoe.dk/vodofrede">vodofrede</a></dd>
|
||||
|
|
|
@ -5,8 +5,10 @@
|
|||
<title>Frederik Palmø</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<meta name="description" content="Home page of Frederik Palmø (vodofrede)" />
|
||||
<link rel="stylesheet" href="/assets/main.css" />
|
||||
<link rel="icon" type="image/x-icon " href="/assets/favicon.ico" />
|
||||
<script src="/assets/sound.js"></script>
|
||||
</head>
|
||||
|
||||
<body class="column separate" style="padding: 2%; gap: 15px">
|
||||
|
@ -73,8 +75,8 @@
|
|||
</article>
|
||||
</section>
|
||||
<aside class="column" style="align-items: center; min-width: 25%; gap: 15px">
|
||||
<img src="/assets/palmoe.png" style="width: 50%; height: auto; border-radius: 10px" alt="palmoe.dk logo" />
|
||||
<dl>
|
||||
<img src="/assets/palmoe.png" width="100" height="100" style="width: 50%; height: auto; border-radius: 10px" alt="palmoe.dk logo" />
|
||||
<dl class="column center" style="gap: 8px;">
|
||||
<div class="row separate">
|
||||
<dt>Gitea</dt>
|
||||
<dd><a href="https://git.palmoe.dk/vodofrede">vodofrede</a></dd>
|
||||
|
|
Loading…
Reference in a new issue