forked from sitegui/editorHP
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcss.php
More file actions
30 lines (27 loc) · 705 Bytes
/
Copy pathcss.php
File metadata and controls
30 lines (27 loc) · 705 Bytes
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
<?php
// Reúne todos os arquivo CSS para economizar requisições HTTP
$arquivos = array(
'botao.css',
'menu.css',
'janela.css',
'aba.css',
'paginas.css',
'indices.css',
'anexos.css',
'ferramentas.css',
'edicao.css',
'painel.css',
'layout.css'
);
$css = array();
foreach ($arquivos as $cada)
$css[] = getCabecalho($cada) . file_get_contents('css/' . $cada);
$css = implode("\n", $css);
header('Content-type: text/css');
echo $css;
// Gera um comentário de cabeçalho para cada arquivo
function getCabecalho($nome) {
$estrelas = str_repeat('*', strlen($nome)+4);
$espacos = str_repeat(' ', strlen($nome)+2);
return "/$estrelas\n *$espacos*\n * $nome *\n *$espacos*\n $estrelas/\n\n";
}