matched template pathing to fipamo structure

This commit is contained in:
Are0h 2021-04-21 18:48:53 -07:00
parent d92d888fca
commit 6e5ea1fc9f
5 changed files with 11 additions and 9 deletions

View file

@ -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",

View file

@ -1,4 +1,4 @@
{% extends "theme-fipamo-default/fipamo-default/frame.twig" %}
{% extends "fipamo-default/frame.twig" %}
{% block title %}
{{ title }}

View file

@ -1,4 +1,4 @@
{% extends "theme-fipamo-default/fipamo-default/frame.twig" %}
{% extends "fipamo-default/frame.twig" %}
{% block title %}
{{ title }}

View file

@ -1,4 +1,4 @@
{% extends "theme-fipamo-default/fipamo-default/frame.twig" %}
{% extends "fipamo-default/frame.twig" %}
{% block title %}
{{ title }}

View file

@ -1,4 +1,4 @@
{% extends "theme-fipamo-default/fipamo-default/frame.twig" %}
{% extends "fipamo-default/frame.twig" %}
{% block title %}
{{ title }}