-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
85 lines (79 loc) · 1.82 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
<?php
// Lista de arquivos globais `global/styles/{nome-do-arquivo}.css`
$styles = [
"fonts",
"styles",
];
// Lista de arquivos globais `global/scripts/{nome-do-arquivo}.js`
$scripts = [
"scripts",
];
// Lista de módulos em `{nome-do-modulo}/`
$modules = [
"jumbotron",
"menu",
"quem-somos",
//"equipe",
//"projetos",
"contatos",
"parceiros",
"footer"
];
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>Avante | Estúdio de Tecnologia</title>
<link rel="apple-touch-icon" href="global/images/apple-touch-icon.png" />
<link rel="icon" href="global/images/favicon.png" />
<style>
<?php
// Inclui os CSSs Globais
foreach ($styles as $key => $value) {
$stylePath = 'global/styles/' . $value . '.css';
if (file_exists($stylePath)) {
include $stylePath;
}
}
// Inclui os CSSs dos módulos
foreach ($modules as $key => $value) {
$stylePath = $value . '/styles.css';
if (file_exists($stylePath)) {
include $stylePath;
}
}
?>
</style>
</head>
<body>
<?php
// Inclui os HTMLs dos módulos
foreach ($modules as $key => $value) {
$modulePath = $value . '/index.html';
if (file_exists($modulePath)) {
include $modulePath;
}
}
?>
<script>
<?php
// Inclui os JSs Globais
foreach ($scripts as $key => $value) {
$scriptPath = 'global/scripts/' . $value . '.js';
if (file_exists($scriptPath)) {
include $scriptPath;
}
}
// Inclui os JSs dos módulos
foreach ($modules as $key => $value) {
$modulePath = $value . '/scripts.js';
if (file_exists($modulePath)) {
include $modulePath;
}
}
?>
</script>
</body>
</html>