Archived
1
0
Disbranĉigi 0

Add basic format

This commit is contained in:
Jenga Phoenix 2019-02-11 10:41:39 -06:00
parent f1c55c8da9
commit 8cef0bf544
4 changed files with 22 additions and 5 deletions

7
index.php Normal file
View File

@ -0,0 +1,7 @@
<?php
$depth = "";
include "res/lib/load.php";
echo $GLOBALS['twig']->render('index.twig.html', ['animal' => 'cat girl']);
?>

View File

@ -1,5 +0,0 @@
<?php
require_once 'vendor/autoload.php'
?>
Placeholder.

View File

@ -1,3 +1,17 @@
<?php
// PATH --> PATH
// Take a path from root and turn it into a relative path.
function root($path) {
return $GLOBALS['depth'] . $path;
}
// -------------------------------------
require_once root("vendor/autoload.php");
$loader= new Twig_Loader_Filesystem(root("res/themes/default/html"));
$twig = new Twig_Environment($loader, ['cache' =>
root('cache/')]);
?>

View File

@ -6,5 +6,6 @@
<title>Index</title>
</head>
<body>
<p>{{ animal }}s are SUPER RAD.</p>
</body>
</html