EC2 website & project proposal init

This commit is contained in:
MasterDefault committed 2026-10-05 12:06:04 -04:00
1 parent 8af93058df
commit 916ee92f90
17 files changed
+340 -14

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
class ColorButtonsApp {
constructor(backgroundElement, statusElement) {
this.backgroundElement = backgroundElement;
this.statusElement = statusElement;
}
setColor(color) {
this.backgroundElement.style.backgroundColor = color;
this.statusElement.textContent = `Current background: ${color}`;
}
connectButton(button, color) {
button.addEventListener("click", () => this.setColor(color));
}
initialize() {
this.connectButton(document.getElementById("blueBtn"), "blue");
this.connectButton(document.getElementById("redBtn"), "red");
}
}
const application = new ColorButtonsApp(
document.body,
document.getElementById("status"),
);
application.initialize();