Skip to content

Commit

Permalink
feat: adiciona página e lógica provisórias do usuário logado
Browse files Browse the repository at this point in the history
  • Loading branch information
nicegrrrl committed Jun 12, 2024
1 parent f90693b commit c9fa5d4
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 0 deletions.
80 changes: 80 additions & 0 deletions src/pages/account.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="../styles/index.css" />
<script src="../../src/scripts/account.js" defer></script>
<title>Contato - MyRep</title>
</head>
<body>
<div class="mainBox">
<header class="header">
<div class="container headerBox">
<a href="../../index.html"
><span class="my">My</span><span class="rep">Rep</span></a
>
<div class="searchBox">
<input
type="text"
class="input"
placeholder="Busque sua república aqui..."
/>
<img
src="../assets/img/icons/search.png"
alt="lupa"
class="searchIcon"
/>
</div>
<nav class="navBar">
<a href="../../index.html">Início</a>
<a href="./createNewRep.html">Anunciar</a>
<a href="./login.html">Minha Conta</a>
<a href="./contact.html">Contato</a>
</nav>
</div>
</header>
<main class="mainBox center">
<div class="container mediumBox">
<div class="contactBox">
<h1 class="title1 space">Perfil do Usuário</h1>
<h2>Olá,</h2>
<p id="userEmail">
<span id="email"></span>
</p>
</div>
</div>
</main>
<footer class="footer">
<div class="container footerContainer">
<div class="footerInfo">
<section class="footerLogo">
<div><span class="my">My</span><span class="rep">Rep</span></div>
<p>República de verdade e com pessoas que combinam com você!</p>
</section>
<section class="footerSection">
<h6 class="text1">Novo usuário?</h6>
<a href="./register.html">Criar conta</a>
<a href="./createNewRep.html">Divulgar uma Rep</a>
</section>
<section class="footerSection">
<h6 class="text1">Saiba mais</h6>
<a href="./aboutUs.html">Sobre nós</a>
<a href="./privacy.html">Privacidade</a>
<a href="./termsAndConditions.html">Termos e condições</a>
</section>
<section class="footerSection">
<h6 class="text1">Contatos</h6>
<a href="mailto:[email protected]?">[email protected]</a>
<a href="https://wa.me/5531000000000">(31) 00000-0000</a>
<p>Belo Horizonte, Minas Gerais</p>
</section>
</div>
<p class="footerCopyright">
MyRep 2024 - Todos os direitos reservados
</p>
</div>
</footer>
</div>
</body>
</html>
12 changes: 12 additions & 0 deletions src/scripts/account.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
document.addEventListener("DOMContentLoaded", function () {
const userEmailElement = document.getElementById("email");
const registeredUser = JSON.parse(
localStorage.getItem("@myRep:registeredUser")
);

if (registeredUser && registeredUser.email) {
userEmailElement.textContent = registeredUser.email;
} else {
userEmailElement.textContent = "Usuário não logado";
}
});

0 comments on commit c9fa5d4

Please sign in to comment.