-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
99 lines (84 loc) · 3.46 KB
/
index.php
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
<?php include 'config.php'; ?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Descrição do website">
<meta name="keywords" content="projeto, website, portfolio de teste">
<link rel="stylesheet" href="<?php echo INCLUDE_PATH; ?>estilo/style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap"
rel="stylesheet">
<link rel="stylesheet"
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200" />
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css">
<title>Projeto 01</title>
</head>
<body>
<base base="<?= INCLUDE_PATH ?>" />
<header>
<div class="center">
<div class="logo left">
<a href="/">Logomarca</a>
</div>
<nav class="desktop right">
<ul>
<li><a href="<?php echo INCLUDE_PATH; ?>">Home</a></li>
<li><a href="<?php echo INCLUDE_PATH; ?>#sobre">Sobre</a></li>
<li><a href="<?php echo INCLUDE_PATH; ?>#servicos">Serviços</a></li>
<li><a realtime="contato" href="<?php echo INCLUDE_PATH; ?>contato">Contato</a></li>
</ul>
</nav>
<nav class="mobile right">
<div class="botao-menu-mobile">
<i class="bi bi-list"></i>
</div>
<ul>
<li><a href="<?php echo INCLUDE_PATH; ?>">Home</a></li>
<li><a href="<?php echo INCLUDE_PATH; ?>sobre">Sobre</a></li>
<li><a href="<?php echo INCLUDE_PATH; ?>servicos">Serviços</a></li>
<li><a realtime="contato" href="<?php echo INCLUDE_PATH; ?>contato">Contato</a></li>
</ul>
</nav>
<div class="clear"></div>
</div>
</header>
<div class="container-principal">
<div>
<?php
$pagina = explode('/', $_SERVER['PHP_SELF']);
unset($pagina[0]);
unset($pagina[1]);
if (count($pagina) == 0) {
$pagina = 'home';
} else {
$pagina = implode('/', $pagina);
}
if (file_exists('pages/' . $pagina . '.php')) {
include ('pages/' . $pagina . '.php');
} else {
if ($pagina != 'sobre' && $pagina != 'servicos') {
$pagina404 = true;
include ('pages/404.php');
} else {
include ('pages/home.php');
}
}
?>
</div>
<div class="overlay-loading">
<img src="<?= INCLUDE_PATH; ?>img/ajax-loader.gif" alt="">
</div>
</div>
<footer <?php if (isset ($pagina404) && ($pagina404 == true))
echo "class='fixed'"; ?>>
<div class="center">
<p>Todos os direitos reservados</p>
</div>
</footer>
<script src="<?php echo INCLUDE_PATH; ?>js/jquery.js"></script>
<script src="<?php echo INCLUDE_PATH; ?>js/script.js"></script>
</body>
</html>