Compare commits

..

11 commits

10 changed files with 39 additions and 10 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

25
src/assets/sound.js Normal file
View 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));
});
})

View file

@ -1,12 +1,14 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="da-dk"> <html lang="en-us">
<head> <head>
<title>Frederik Palmø</title> <title>Frederik Palmø</title>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <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="stylesheet" href="/assets/main.css" />
<link rel="icon" type="image/x-icon " href="/assets/favicon.ico" /> <link rel="icon" type="image/x-icon " href="/assets/favicon.ico" />
<script src="/assets/sound.js"></script>
</head> </head>
<body class="column separate" style="padding: 2%; gap: 15px"> <body class="column separate" style="padding: 2%; gap: 15px">
@ -18,7 +20,7 @@
<h2>Projects</h2> <h2>Projects</h2>
<article class="column separate"> <article class="column separate">
<div class="row separate wrap"> <div class="row separate wrap">
<h3>Character planner</h3> <h3>Character Planner</h3>
<span class="row separate"> <span class="row separate">
<a href="https://erdtree.palmoe.dk">project</a> <a href="https://erdtree.palmoe.dk">project</a>
<a href="https://git.palmoe.dk/vodofrede/erdtree">source</a> <a href="https://git.palmoe.dk/vodofrede/erdtree">source</a>
@ -28,7 +30,7 @@
</article> </article>
<article class="column separate"> <article class="column separate">
<div class="row separate wrap"> <div class="row separate wrap">
<h3>Hashing library</h3> <h3>Hashing Library</h3>
<span class="row separate"> <span class="row separate">
<a href="https://crates.io/crates/lore">project</a> <a href="https://crates.io/crates/lore">project</a>
<a href="https://git.palmoe.dk/vodofrede/lore">source</a> <a href="https://git.palmoe.dk/vodofrede/lore">source</a>
@ -39,7 +41,7 @@
</article> </article>
<article class="column separate"> <article class="column separate">
<div class="row separate wrap"> <div class="row separate wrap">
<h3>Leetcode input parser</h3> <h3>Leetcode Input Parser</h3>
<span class="row separate"> <span class="row separate">
<a href="https://crates.io/crates/eyes">project</a> <a href="https://crates.io/crates/eyes">project</a>
<a href="https://git.palmoe.dk/vodofrede/eyes">source</a> <a href="https://git.palmoe.dk/vodofrede/eyes">source</a>
@ -50,14 +52,14 @@
</article> </article>
<article class="column separate"> <article class="column separate">
<div class="row separate wrap"> <div class="row separate wrap">
<h3>Controllable string lights</h3> <h3>Controllable String Lights</h3>
<span class="row separate"></span> <span class="row separate"></span>
</div> </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> <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>
<article class="column separate"> <article class="column separate">
<div class="row separate wrap"> <div class="row separate wrap">
<h3>Clones of Galaga og Breakout</h3> <h3>Clones of Galaga and Breakout</h3>
<span class="row separate"> <span class="row separate">
<a href="https://github.com/vodofrede/DIKUGames">source</a> <a href="https://github.com/vodofrede/DIKUGames">source</a>
</span> </span>
@ -73,8 +75,8 @@
</article> </article>
</section> </section>
<aside class="column" style="align-items: center; min-width: 25%; gap: 15px"> <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" /> <img src="/assets/palmoe.png" width="100" height="100" style="width: 50%; height: auto; border-radius: 10px" alt="palmoe.dk logo" />
<dl> <dl class="column center" style="gap: 8px;">
<div class="row separate"> <div class="row separate">
<dt>Gitea</dt> <dt>Gitea</dt>
<dd><a href="https://git.palmoe.dk/vodofrede">vodofrede</a></dd> <dd><a href="https://git.palmoe.dk/vodofrede">vodofrede</a></dd>

View file

@ -5,8 +5,10 @@
<title>Frederik Palmø</title> <title>Frederik Palmø</title>
<meta charset="utf-8" /> <meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" /> <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="stylesheet" href="/assets/main.css" />
<link rel="icon" type="image/x-icon " href="/assets/favicon.ico" /> <link rel="icon" type="image/x-icon " href="/assets/favicon.ico" />
<script src="/assets/sound.js"></script>
</head> </head>
<body class="column separate" style="padding: 2%; gap: 15px"> <body class="column separate" style="padding: 2%; gap: 15px">
@ -73,8 +75,8 @@
</article> </article>
</section> </section>
<aside class="column" style="align-items: center; min-width: 25%; gap: 15px"> <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" /> <img src="/assets/palmoe.png" width="100" height="100" style="width: 50%; height: auto; border-radius: 10px" alt="palmoe.dk logo" />
<dl> <dl class="column center" style="gap: 8px;">
<div class="row separate"> <div class="row separate">
<dt>Gitea</dt> <dt>Gitea</dt>
<dd><a href="https://git.palmoe.dk/vodofrede">vodofrede</a></dd> <dd><a href="https://git.palmoe.dk/vodofrede">vodofrede</a></dd>