forked from maelgruand1/AltOS
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
42 lines (33 loc) · 1.44 KB
/
script.js
File metadata and controls
42 lines (33 loc) · 1.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
document.addEventListener("DOMContentLoaded", () => { // Assurer que le DOM est complètement chargé
// Récupérer les éléments du DOM
const launcherBtn = document.getElementById("launcher-btn");
const launcherModal = document.getElementById("launcher-modal");
const closeLauncher = document.getElementById("close-launcher");
// Ouvrir le launcher
launcherBtn.addEventListener("click", () => {
launcherModal.classList.add("show");
});
// Fermer le launcher
closeLauncher.addEventListener("click", () => {
launcherModal.classList.remove("show");
});
// Fermer en cliquant en dehors du contenu
launcherModal.addEventListener("click", (event) => {
if (event.target === launcherModal) {
launcherModal.classList.remove("show");
}
});
const terminalBtn = document.getElementById("terminal-btn");
const terminal = document.getElementById("terminal");
const closeTerminal = document.getElementById("close-terminal");
// Assurer que le terminal est caché au départ
terminal.style.display = "none"; // Ce style assure que le terminal est caché au départ
// Ouvrir le terminal
terminalBtn.addEventListener("click", () => {
terminal.style.display = "flex"; // Affiche le terminal
});
// Fermer le terminal
closeTerminal.addEventListener("click", () => {
terminal.style.display = "none"; // Cache le terminal
});
});