added stuff, broke some other stuff, made admin auth!
Signed-off-by: ari melody <ari@arimelody.me>
BIN
public/img/buttons/elke.gif
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
public/img/buttons/itzzen.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
public/img/buttons/misc/blink.gif
Normal file
After Width: | Height: | Size: 6.4 KiB |
BIN
public/img/favicon-256.png
Normal file
After Width: | Height: | Size: 95 KiB |
BIN
public/img/favicon-36.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 122 KiB After Width: | Height: | Size: 944 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 24 KiB |
32
public/img/prideflag.svg
Normal file
|
@ -0,0 +1,32 @@
|
|||
<!--
|
||||
pride flag - copyright (c) 2024 ari melody
|
||||
|
||||
this code is provided AS-IS, WITHOUT ANY WARRANTY, to be
|
||||
freely redistributed and/or modified as you please, however
|
||||
retaining this license in any redistribution.
|
||||
|
||||
please use this flag to link to an LGBTQI+-supporting page
|
||||
of your choosing!
|
||||
|
||||
web: https://arimelody.me
|
||||
source: https://git.arimelody.me/ari/prideflag
|
||||
-->
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 120" width="120" height="120">
|
||||
<path id="red" d="M120,80 L100,100 L120,120 Z" style="fill:#d20605"/>
|
||||
<path id="orange" d="M120,80 V40 L80,80 L100,100 Z" style="fill:#ef9c00"/>
|
||||
<path id="yellow" d="M120,40 V0 L60,60 L80,80 Z" style="fill:#e5fe02"/>
|
||||
<path id="green" d="M120,0 H80 L40,40 L60,60 Z" style="fill:#09be01"/>
|
||||
<path id="blue" d="M80,0 H40 L20,20 L40,40 Z" style="fill:#081a9a"/>
|
||||
<path id="purple" d="M40,0 H0 L20,20 Z" style="fill:#76008a"/>
|
||||
|
||||
<rect id="black" x="60" width="60" height="60" style="fill:#010101"/>
|
||||
<rect id="brown" x="70" width="50" height="50" style="fill:#603814"/>
|
||||
<rect id="lightblue" x="80" width="40" height="40" style="fill:#73d6ed"/>
|
||||
<rect id="pink" x="90" width="30" height="30" style="fill:#ffafc8"/>
|
||||
<rect id="white" x="100" width="20" height="20" style="fill:#fff"/>
|
||||
|
||||
<rect id="intyellow" x="110" width="10" height="10" style="fill:#fed800"/>
|
||||
<circle id="intpurple" cx="120" cy="0" r="5" stroke="#7601ad" stroke-width="2" fill="none"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
|
@ -1,79 +1,73 @@
|
|||
import "./main.js";
|
||||
|
||||
function apply_funny_bob_to_upcoming_tags() {
|
||||
const upcoming_tags = document.querySelectorAll("#type.upcoming");
|
||||
for (var i = 0; i < upcoming_tags.length; i++) {
|
||||
const tag = upcoming_tags[i];
|
||||
const chars = tag.innerText.split("");
|
||||
const result = chars.map((c, i) => `<span style="animation-delay: -${i * 100}ms;">${c}</span>`);
|
||||
tag.innerHTML = result.join("");
|
||||
}
|
||||
const upcoming_tags = document.querySelectorAll("#type.upcoming");
|
||||
for (var i = 0; i < upcoming_tags.length; i++) {
|
||||
const tag = upcoming_tags[i];
|
||||
const chars = tag.innerText.split("");
|
||||
const result = chars.map((c, i) => `<span style="animation-delay: -${i * 100}ms;">${c}</span>`);
|
||||
tag.innerHTML = result.join("");
|
||||
}
|
||||
}
|
||||
|
||||
function update_extras_buttons() {
|
||||
const extras_pairs = Array.from(document.querySelectorAll("div#info > div").values()).map(container => {
|
||||
return {
|
||||
container,
|
||||
button: document.getElementById("extras").querySelector(`ul li a[href="#${container.id}"]`)
|
||||
};
|
||||
});
|
||||
const info_container = document.getElementById("info")
|
||||
info_container.addEventListener("scroll", update_extras_buttons);
|
||||
const info_rect = info_container.getBoundingClientRect();
|
||||
const info_y = info_rect.y;
|
||||
const font_size = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
||||
let current = extras_pairs[0];
|
||||
extras_pairs.forEach(pair => {
|
||||
pair.button.classList.remove("active");
|
||||
const scroll_diff = pair.container.getBoundingClientRect().y -
|
||||
info_rect.y -
|
||||
info_rect.height / 2 +
|
||||
4 * font_size;
|
||||
if (scroll_diff <= 0) current = pair;
|
||||
})
|
||||
current.button.classList.add("active");
|
||||
const extras_pairs = Array.from(document.querySelectorAll("div#info > div").values()).map(container => {
|
||||
return {
|
||||
container,
|
||||
button: document.getElementById("extras").querySelector(`ul li a[href="#${container.id}"]`)
|
||||
};
|
||||
});
|
||||
const info_container = document.getElementById("info")
|
||||
info_container.addEventListener("scroll", update_extras_buttons);
|
||||
const info_rect = info_container.getBoundingClientRect();
|
||||
const info_y = info_rect.y;
|
||||
const font_size = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
||||
let current = extras_pairs[0];
|
||||
extras_pairs.forEach(pair => {
|
||||
pair.button.classList.remove("active");
|
||||
const scroll_diff = pair.container.getBoundingClientRect().y -
|
||||
info_rect.y -
|
||||
info_rect.height / 2 +
|
||||
4 * font_size;
|
||||
if (scroll_diff <= 0) current = pair;
|
||||
})
|
||||
current.button.classList.add("active");
|
||||
|
||||
document.querySelectorAll("div#extras ul li a[href]").forEach(link => {
|
||||
link.addEventListener("click", event => {
|
||||
event.preventDefault();
|
||||
location.replace(link.href);
|
||||
});
|
||||
document.querySelectorAll("div#extras ul li a[href]").forEach(link => {
|
||||
link.addEventListener("click", event => {
|
||||
event.preventDefault();
|
||||
const tag = link.href.split('#').slice(-1)[0];
|
||||
document.getElementById(tag).scrollIntoView();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function bind_go_back_btn() {
|
||||
const go_back_btn = document.getElementById("go-back")
|
||||
go_back_btn.innerText = "<";
|
||||
go_back_btn.addEventListener("click", () => {
|
||||
window.history.back();
|
||||
});
|
||||
const go_back_btn = document.getElementById("go-back")
|
||||
go_back_btn.innerText = "<";
|
||||
go_back_btn.addEventListener("click", () => {
|
||||
window.history.back();
|
||||
});
|
||||
}
|
||||
|
||||
function bind_share_btn() {
|
||||
const share_btn = document.getElementById("share");
|
||||
if (navigator.clipboard === undefined) {
|
||||
share_btn.onclick = event => {
|
||||
console.error("clipboard is not supported by this browser!");
|
||||
};
|
||||
return;
|
||||
}
|
||||
const share_btn = document.getElementById("share");
|
||||
if (navigator.clipboard === undefined) {
|
||||
share_btn.onclick = event => {
|
||||
event.preventDefault();
|
||||
navigator.clipboard.writeText(window.location.href);
|
||||
share_btn.classList.remove('active');
|
||||
void share_btn.offsetWidth;
|
||||
share_btn.classList.add('active');
|
||||
}
|
||||
console.error("clipboard is not supported by this browser!");
|
||||
};
|
||||
return;
|
||||
}
|
||||
share_btn.onclick = event => {
|
||||
event.preventDefault();
|
||||
navigator.clipboard.writeText(window.location.href);
|
||||
share_btn.classList.remove('active');
|
||||
void share_btn.offsetWidth;
|
||||
share_btn.classList.add('active');
|
||||
}
|
||||
}
|
||||
|
||||
function start() {
|
||||
bind_share_btn();
|
||||
bind_go_back_btn();
|
||||
apply_funny_bob_to_upcoming_tags();
|
||||
update_extras_buttons();
|
||||
}
|
||||
|
||||
document.addEventListener("swap", () => {
|
||||
if (!window.location.pathname.startsWith("/music/")) return;
|
||||
start();
|
||||
});
|
||||
bind_share_btn();
|
||||
bind_go_back_btn();
|
||||
apply_funny_bob_to_upcoming_tags();
|
||||
update_extras_buttons();
|
||||
|
|