2025-06-16 20:32:46 +01:00
|
|
|
import { hijackClickEvent } from "./main.js";
|
|
|
|
|
2025-01-22 11:39:15 +00:00
|
|
|
const hexPrimary = document.getElementById("hex-primary");
|
|
|
|
const hexSecondary = document.getElementById("hex-secondary");
|
|
|
|
const hexTertiary = document.getElementById("hex-tertiary");
|
|
|
|
|
|
|
|
function updateHexColours() {
|
|
|
|
const style = getComputedStyle(document.body);
|
|
|
|
hexPrimary.textContent = style.getPropertyValue('--primary');
|
|
|
|
hexSecondary.textContent = style.getPropertyValue('--secondary');
|
|
|
|
hexTertiary.textContent = style.getPropertyValue('--tertiary');
|
|
|
|
}
|
|
|
|
|
|
|
|
updateHexColours();
|
|
|
|
|
|
|
|
window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", () => {
|
|
|
|
updateHexColours();
|
|
|
|
});
|
2025-06-16 20:32:46 +01:00
|
|
|
|
|
|
|
document.querySelectorAll("ul#projects li.project-item").forEach(projectItem => {
|
|
|
|
const link = projectItem.querySelector('a');
|
|
|
|
hijackClickEvent(projectItem, link);
|
|
|
|
});
|