-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
96 lines (82 loc) · 3.8 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
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta property="og:title" content="Catálogo">
<meta property="og:description" content="Bem vindo ao nosso catálogo interativo!">
<meta property="og:image" content="https://fvandrad.github.io/catalogo/images/catalogo-interativo.png">
<meta property="og:url" content="https://fvandrad.github.io/catalogo">
<meta property="og:type" content="website">
<title>Catálogo Interativo</title>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@700&family=Open+Sans&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="style.css">
<script src="script.js" defer></script>
</head>
<body>
<!-- HTML -->
<header class="header">
<h1 class="logo">Catálogo</h1>
<div>
<!-- Add this after the categories nav and before the main catalog -->
<div class="filter-container" style="padding: 1rem; display: flex; justify-content: center;">
<input type="text" id="filterText" placeholder="Pesquisar..." style="padding: 0.5rem;
border-radius: var(--border-radius);
border: 1px solid var(--color-secondary);
width: 200px;
font-size: 1rem;">
</div>
<!-- Add this script before the closing body tag -->
<script>
const filterInput = document.getElementById('filterText');
filterInput.addEventListener('input', function () {
const searchText = this.value.toLowerCase();
itenss.forEach(itens => {
const itensText = itens.textContent.toLowerCase();
if (!activeFilters.includes('all') &&
!activeFilters.some(filter => itens.classList.contains(filter))) {
itens.style.display = 'none';
return;
}
if (itensText.includes(searchText)) {
itens.style.display = 'block';
} else {
itens.style.display = 'none';
}
});
});
</script>
</div>
</header>
<nav class="categories">
<button class="btn active" data-filter="all">Todos</button>
<button class="btn" data-filter="cat1">Categoria 1</button>
<button class="btn" data-filter="cat2">Categoria 2</button>
<button class="btn" data-filter="cat3">Categoria 3</button>
<button class="btn" data-filter="cat4">Categoria 4</button>
<button class="btn" data-filter="cat5">Categoria 5</button>
</nav>
<!-- Área Principal -->
<main class="catalog">
<div class="itens cat1 show">Item 1 - cat1</div>
<div class="itens cat2 show">Item 2 - cat2</div>
<div class="itens cat3 show">Item 3 - cat3</div>
<div class="itens cat1 show">Item 4 - cat1</div>
<div class="itens cat2 show">Item 5 - cat2</div>
<div class="itens cat3 show">Item 6 - cat3</div>
<div class="itens cat4 show">Item 7 - cat4</div>
<div class="itens cat5 show">Item 8 - cat5</div>
</main>
<header class="footer">
<h1 class="logo">
</h1>
<div class="icons">
<iframe src="https://github.com/sponsors/fvandrad/button" title="Sponsor fvandrad" height="32" width="114" style="border: 0; border-radius: 6px;"></iframe>
<button class="icon" aria-label="Instagran">📸</button>
<button class="icon" aria-label="Whatsapp">💬 Whatsapp</button>
</div>
</header>
</script>
</body>
</html>