-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
121 lines (117 loc) · 3.6 KB
/
index.html
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<!--<title> Responsivo Sidebar Menu | Gabriel Carneiro</title>-->
<link rel="stylesheet" href="style.css">
<!-- Boxicons Link dos Icones -->
<link href='https://unpkg.com/[email protected]/css/boxicons.min.css' rel='stylesheet'>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<div class="sidebar">
<div class="logo-details">
<i class='bx bxl-c-plus-plus icon'></i>
<div class="logo_name">Painel de Controle</div>
<i class='bx bx-menu' id="btn" ></i>
</div>
<ul class="nav-list">
<li>
<i class='bx bx-search' ></i>
<input type="text" placeholder="Pesquisar ...">
<span class="tooltip">Pesquisa</span>
</li>
<li>
<a href="#">
<i class='bx bx-grid-alt'></i>
<span class="links_name">Controle</span>
</a>
<span class="tooltip">Controle</span>
</li>
<li>
<a href="#">
<i class='bx bx-user' ></i>
<span class="links_name">Usuario</span>
</a>
<span class="tooltip">Usuario</span>
</li>
<li>
<a href="#">
<i class='bx bx-chat' ></i>
<span class="links_name">Messagens</span>
</a>
<span class="tooltip">Messagens</span>
</li>
<li>
<a href="#">
<i class='bx bx-pie-chart-alt-2' ></i>
<span class="links_name">Relatorio</span>
</a>
<span class="tooltip">Relatorio</span>
</li>
<li>
<a href="#">
<i class='bx bx-folder' ></i>
<span class="links_name">Arquivos</span>
</a>
<span class="tooltip">Arquivos</span>
</li>
<li>
<a href="#">
<i class='bx bx-cart-alt' ></i>
<span class="links_name">Pedidos</span>
</a>
<span class="tooltip">Pedidos</span>
</li>
<li>
<a href="#">
<i class='bx bx-heart' ></i>
<span class="links_name">Salvos</span>
</a>
<span class="tooltip">Salvos</span>
</li>
<li>
<a href="#">
<i class='bx bx-cog' ></i>
<span class="links_name">Configuracao</span>
</a>
<span class="tooltip">Configuracaospan>
</li>
<li class="profile">
<div class="profile-details">
<img src="profile.jpg" alt="profileImg">
<div class="name_job">
<div class="name">Gabriel Carneiro</div>
<div class="job">Dev junior ;) </div>
</div>
</div>
<i class='bx bx-log-out' id="log_out" ></i>
</li>
</ul>
</div>
<section class="home-section">
<div class="text">Painel de Controle</div>
</section>
<script>
let sidebar = document.querySelector(".sidebar");
let closeBtn = document.querySelector("#btn");
let searchBtn = document.querySelector(".bx-search");
closeBtn.addEventListener("click", ()=>{
sidebar.classList.toggle("open");
menuBtnChange();//Chamando a funcao (opcional)
});
searchBtn.addEventListener("click", ()=>{ // Barra lateral aberta quando você clica no icone de pesquisa
sidebar.classList.toggle("open");
menuBtnChange(); //Chamando a funcao (opcional)
});
// a seguir estão o código para alterar o botão da barra lateral (opcional)
function menuBtnChange() {
if(sidebar.classList.contains("open")){
closeBtn.classList.replace("bx-menu", "bx-menu-alt-right");//substituindo a classe
}else {
closeBtn.classList.replace("bx-menu-alt-right","bx-menu");//substituindo a classe
}
}
</script>
</body>
</html>