https://gablaxy.github.io/stellar_system/

Eingereichte URL:
https://gablaxy.github.io/stellar_system/
Bericht beendet:

JavaScript-Variablen · 4 gefunden

NameTyp
onbeforetoggleobject
documentPictureInPictureobject
onscrollendobject
removePAfunction

Konsolenprotokoll-Meldungen · 2 gefunden

TypKategorieProtokoll
warningother
Text
Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'.
errornetwork
URL
https://gablaxy.github.io/favicon.ico
Text
Failed to load resource: the server responded with a status of 404 ()

HTML

<!DOCTYPE html><html lang="en"><head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Stellar system</title>
        <link rel="stylesheet" href="./style/index.css">
        <link rel="stylesheet" href="./style/common.css">
    </head>
    <body>
        <div class="stars"></div>
        <div class="all">
                <div class="Soleil"></div>
                <div class="Mercure planete"></div>
                <div class="Venus planete"></div>
                <div class="Terre planete"></div>
                <div class="Mars planete"></div>
                <div class="Jupiter planete"></div>
                <div class="Saturne planete"></div>
                <div class="Uranus planete"></div>
                <div class="Neptune planete"></div>
        </div>
        <div class="menu">
            <h1>Menu</h1>
            <h3 id="nom_planete"></h3>
            <a href="" id="zoom_link"><button class="zoom">Zoom</button></a>
        </div>
        <script type="text/javascript">
            let planetes = document.querySelectorAll(".planete");
            let soleil = document.querySelector(".Soleil");
            let menu = document.querySelector(".menu");
            let zlink = document.getElementById("zoom_link");

            function removePA() {
                planetes.forEach(element => {
                    element.classList.remove("planete_active");
                });
            }

            // When the sun is clicked, the planets are no longer highlighted
            soleil.addEventListener("click", function(){
                removePA();
                menu.style.display = "block";
                document.getElementById("nom_planete").innerHTML = "Soleil";
            });

            planetes.forEach(element => {
                element.addEventListener("click", function(){
                    removePA();
                    menu.style.display = "block";
                    element.classList.add("planete_active");
                    document.getElementById("nom_planete").innerHTML = element.classList[0];
                    zlink.href = "./planetes/" + element.classList[0] + ".html";
                });
            });

            menu.addEventListener("click", function(){
                menu.style.display = "none";
                removePA();
            });

        

        </script>
    

</body></html>