-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathindex.php
38 lines (28 loc) · 1.53 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
<?php
require_once "vendor/autoload.php";
global $DBA;
$DBA = new \Tina4\DataSQLite3("cms.db");
//$DBA = new \Tina4\DataFirebird("127.0.0.1:C:\\Users\\andre\\IdeaProjects\\tina4-cms\\TESTCMS.FDB", "SYSDBA", "masterkey");
$config = new \Tina4\Config(function(\Tina4\Config $config) {
(new Content())->addConfigMethods($config);
(new Content())->addCmsMenu("/backend/program", "Products");
//(new Content())->addCmsMenu("/backend/program", "Something Else");
//(new Content())->addCmsMenu("/backend/program", "Products");
//$config->addTwigGlobal("Menu", new Menu());
//(new Theme())->addTwigView("banner", "Banner 1", "examples/banner.twig");
});
//Hack to build css for documentation
$scss = new ScssPhp\ScssPhp\Compiler();
$scssDefault = $scss->compileString(file_get_contents("./src/templates/admin/page-builder.scss"))->getCss();
file_put_contents("./src/public/css/page-builder.css", $scssDefault);
/*$minifier = new \Bissolli\PhpMinifier\Minifier();
$minifier->addCssFile("./src/public/css/page-builder.css");
$minifier->minifyCss()->outputCss("./src/public/css/page-builder.css");
$minifier = new \Bissolli\PhpMinifier\Minifier();
$minifier->addCssFile("./src/public/css/bootstrap.min.css");
$minifier->minifyCss()->outputCss("./src/public/css/bootstrap.min.css");
$minifier = new \Bissolli\PhpMinifier\Minifier();
$minifier->addCssFile("./src/public/css/data-tables.css");
$minifier->minifyCss()->outputCss("./src/public/css/data-tables.css");*/
(new Theme(""))->deployThemes(__dir__, true);
echo new \Tina4\Tina4Php($config);