|
|
|
@ -10,7 +10,9 @@ class ThemeEngine
|
|
|
|
|
public function __construct()
|
|
|
|
|
{
|
|
|
|
|
$this->data = json_decode(file_get_contents("./config.json"), true);
|
|
|
|
|
$this->loader = new \Twig\Loader\FilesystemLoader("src/themes/");
|
|
|
|
|
$this->loader = new \Twig\Loader\FilesystemLoader(
|
|
|
|
|
"src/themes/theme-fipamo-default/"
|
|
|
|
|
);
|
|
|
|
|
$this->twig = new \Twig\Environment($this->loader, []);
|
|
|
|
|
$this->router($_SERVER["REQUEST_URI"]);
|
|
|
|
|
}
|
|
|
|
@ -29,7 +31,7 @@ class ThemeEngine
|
|
|
|
|
case "/":
|
|
|
|
|
$recent = $this->data["recent_posts"];
|
|
|
|
|
$featured = $this->data["featured_posts"];
|
|
|
|
|
$template = "theme-fipamo-default/fipamo-default/index.twig";
|
|
|
|
|
$template = "fipamo-default/index.twig";
|
|
|
|
|
|
|
|
|
|
$pageOptions = [
|
|
|
|
|
"debug" => true,
|
|
|
|
@ -45,7 +47,7 @@ class ThemeEngine
|
|
|
|
|
case "/page":
|
|
|
|
|
$content = $this->data["content"];
|
|
|
|
|
$meta = $this->data["meta"];
|
|
|
|
|
$template = "theme-fipamo-default/fipamo-default/page.twig";
|
|
|
|
|
$template = "fipamo-default/page.twig";
|
|
|
|
|
$pageOptions = [
|
|
|
|
|
"debug" => true,
|
|
|
|
|
"title" => "Page Title",
|
|
|
|
@ -59,7 +61,7 @@ class ThemeEngine
|
|
|
|
|
break;
|
|
|
|
|
case "/tags":
|
|
|
|
|
$tags = $this->data["tag_list"];
|
|
|
|
|
$template = "theme-fipamo-default/fipamo-default/tags.twig";
|
|
|
|
|
$template = "fipamo-default/tags.twig";
|
|
|
|
|
$pageOptions = [
|
|
|
|
|
"debug" => true,
|
|
|
|
|
"title" => "Pages Tagged as Tag",
|
|
|
|
@ -72,7 +74,7 @@ class ThemeEngine
|
|
|
|
|
break;
|
|
|
|
|
case "/archive":
|
|
|
|
|
$archive = $this->data["archives"];
|
|
|
|
|
$template = "theme-fipamo-default/fipamo-default/archive.twig";
|
|
|
|
|
$template = "fipamo-default/archive.twig";
|
|
|
|
|
$pageOptions = [
|
|
|
|
|
"debug" => true,
|
|
|
|
|
"title" => "Archive",
|
|
|
|
|