<!DOCTYPE html>
<html lang="fr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" type="text/css" href="../public/styles/styleProfil.css" media="screen">
    <title>Wiki Fantasy : Profil</title>
    <link id="favicon" rel="icon" href="../../images/iconeSombre.ico"> <!-- Par défaut sombre -->
    <link href="https://fonts.googleapis.com/css2?family=Lemon&display=swap" rel="stylesheet">
    <script defer src="../public/script/theme-toggle.js"></script>
    <script defer src="../public/script/changeData.js"></script>

</head>
<body>
    <div class="container">
        <div class="header">
            <div class="nav"> 
                <img src="../images/coeur.svg" alt="coeur" width="67px" height="67px" onmousedown="return false">
                <img id="theme-icon" src="../images/light.svg" alt="toggle theme" width="72px" height="37px" onmousedown="return false" onclick="toggleTheme()">
                <img src="../images/quizz.svg" alt="quizz" width="51px" height="82px" onmousedown="return false">
            </div>
            <div class="logo">
                <img src="../images/WIKIFANTASY.png" alt="Logo" width="227px" height="106px" onmousedown="return false" >
            </div>
        </div>
    </div>

    <div class="login">
        <h1>▶ Profil ◀</h1>

        <?php
            include ('../src/Entity/userEntity.php');
            
            echo "<img src='{$u->getImg()}' class='imageProfil' onmousedown='return false'/>";

            // Nom d'utilisateur
            echo "<p id='username' class='infoProfil'>
                    <strong>{$u->getUsername()} 
                    <img class='imgModify' src='../images/modify.svg' onclick='editFieldUsername(\"username\")'/>
                    </strong>
                </p>";

            // Email
            echo "<p id='email' class='infoProfil'>
                    <strong>{$u->getEmail()} 
                    <img class='imgModify' src='../images/modify.svg' onclick='editFieldEmail(\"email\")'/>
                    </strong>
                </p>";

            // Mot de passe
            echo "<p id='passwd' class='infoProfil'>
                    <strong>{$u->getHidenPasswd()} 
                    <img class='imgModify' src='../images/modify.svg' onclick='editFieldPassWd(\"passwd\")'/>
                    </strong>
                </p>";
        ?>

        <div class="languageDiv">
            <p class="languageTitle">Language :</p>
        </div>
        <img class="languageImage" src="../images/drapeauFrance.png" onmousedown="return false"/>
        
        <div class="createQuote">
            <a href="rien" class="createQuote">Ajouter une citation</a>
        </div>
        

        <div class="buttonSudmiteDiv">
            <button class="buttonSudmite">Se déconnecter</button>
        </div>
        
    </div>
</body>
</html>
