mirror of https://github.com/hrfee/jfa-go
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
56 lines
2.0 KiB
56 lines
2.0 KiB
import { Modal } from "../../ts/modules/modal.js";
|
|
import { whichAnimationEvent } from "../../ts/modules/common.js";
|
|
|
|
interface window extends Window {
|
|
animationEvent: string;
|
|
}
|
|
|
|
declare var window: window;
|
|
|
|
window.animationEvent = whichAnimationEvent();
|
|
|
|
const debModal = new Modal(document.getElementById("modal-deb"));
|
|
const debButton = document.getElementById("download-deb") as HTMLAnchorElement;
|
|
debButton.onclick = debModal.toggle;
|
|
|
|
const debUnstableModal = new Modal(document.getElementById("modal-deb-unstable"));
|
|
const debUnstableButton = document.getElementById("download-deb-unstable") as HTMLAnchorElement;
|
|
debUnstableButton.onclick = debUnstableModal.toggle;
|
|
|
|
const stableSect = document.getElementById("sect-stable");
|
|
const unstableSect = document.getElementById("sect-unstable");
|
|
|
|
const stableButton = document.getElementById("download-stable") as HTMLSpanElement;
|
|
const unstableButton = document.getElementById("download-unstable") as HTMLSpanElement;
|
|
|
|
const dockerStable = document.getElementById("docker-stable");
|
|
const dockerUnstable = document.getElementById("docker-unstable");
|
|
|
|
stableButton.onclick = () => {
|
|
dockerStable.classList.remove("unfocused");
|
|
dockerUnstable.classList.add("unfocused");
|
|
stableButton.classList.add("!high");
|
|
unstableButton.classList.remove("!high");
|
|
stableSect.classList.remove("unfocused");
|
|
unstableSect.classList.add("unfocused");
|
|
|
|
}
|
|
|
|
unstableButton.onclick = () => {
|
|
dockerUnstable.classList.remove("unfocused");
|
|
dockerStable.classList.add("unfocused");
|
|
unstableButton.classList.add("!high");
|
|
stableButton.classList.remove("!high");
|
|
stableSect.classList.add("unfocused");
|
|
unstableSect.classList.remove("unfocused");
|
|
}
|
|
|
|
const dockerModal = new Modal(document.getElementById("modal-docker"));
|
|
const dockerButton = document.getElementById("download-docker") as HTMLSpanElement;
|
|
const dockerUnstableButton = document.getElementById("download-docker-unstable") as HTMLSpanElement;
|
|
|
|
dockerButton.onclick = dockerModal.toggle;
|
|
dockerUnstableButton.onclick = dockerModal.toggle;
|
|
|
|
|