-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathteste.html
51 lines (49 loc) · 1.28 KB
/
teste.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
<h1>Projeto</h1>
<ul class="tree">
<li>
<span wm-folder>backend</span>
<ul>
<li>
<span wm-folder>app</span>
<ul>
<li>produto.js</li>
<li>usuario.js</li>
<li>venda.js</li>
</ul>
</li>
<li>
<span wm-folder>config</span>
<ul>
<li>banco.js</li>
<li>rotas.js</li>
<li></li>
</ul>
</li>
</ul>
</li>
<li>
<span wm-folder>frontend</span>
<ul>
<li>
<span wm-folder>public</span>
<ul>
<li>app.css</li>
<li>app.js</li>
<li>index.html</li>
</ul>
</li>
</ul>
</li>
</ul>
<form>
</form>
<link rel="stylesheet" href="http://files.cod3r.com.br/curso-web/tree.css">
<script>
document.querySelectorAll('[wm-folder]').forEach(folder => {
folder.onclick = function(e) {
const ul = folder.nextElementSibling
const d = ul.style.display
ul.style.display = d === "none" ? "block" : "none"
}
})
</script>