Add basic format
This commit is contained in:
parent
f1c55c8da9
commit
8cef0bf544
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
$depth = "";
|
||||
include "res/lib/load.php";
|
||||
|
||||
echo $GLOBALS['twig']->render('index.twig.html', ['animal' => 'cat girl']);
|
||||
|
||||
?>
|
|
@ -1,5 +0,0 @@
|
|||
<?php
|
||||
require_once 'vendor/autoload.php'
|
||||
?>
|
||||
|
||||
Placeholder.
|
|
@ -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/')]);
|
||||
|
||||
?>
|
||||
|
|
|
@ -6,5 +6,6 @@
|
|||
<title>Index</title>
|
||||
</head>
|
||||
<body>
|
||||
<p>{{ animal }}s are SUPER RAD.</p>
|
||||
</body>
|
||||
</html
|
||||
|
|
Reference in New Issue