-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathservico.php
More file actions
58 lines (46 loc) · 2.05 KB
/
servico.php
File metadata and controls
58 lines (46 loc) · 2.05 KB
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
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<?php $pagina = 'SERVIÇOS' ?>
<title>Serviços - Code Forge</title>
<?php require_once('includes/head.php'); ?>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/js/all.min.js">
<link rel="stylesheet" href="assets/css/paginas.css">
</head>
<body data-spy="scroll" data-target="#navbar" class="static-layout">
<?php require_once('includes/top.php'); ?>
<main>
<?php require_once('includes/service.php'); ?>
</main>
<?php require_once('includes/footer.php'); ?>
<?php require_once('includes/script.php'); ?>
<script>
// JavaScript for accordion functionality
document.addEventListener('DOMContentLoaded', function() {
const accordions = document.querySelectorAll('.most-asked .accordion');
accordions.forEach(function(accordion, index) {
const accordionHead = accordion.querySelector('.accordion-head');
const accordionBody = accordion.querySelector('.accordion-body');
if (index === 0) {
accordionHead.classList.add('is-open');
accordionBody.style.height = accordionBody.scrollHeight + 'px';
}
accordionHead.addEventListener('click', function() {
const isOpen = accordionHead.classList.contains('is-open');
// Fecha todos os acordeões
accordions.forEach(function(acc) {
acc.querySelector('.accordion-head').classList.remove('is-open');
acc.querySelector('.accordion-body').style.height = 0;
});
// Abre ou fecha o acordeão clicado
if (!isOpen) {
accordionHead.classList.add('is-open');
accordionBody.style.height = accordionBody.scrollHeight + 'px';
}
});
});
});
</script>
</body>
</html>