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

View file

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

View file

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

View file

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

View file

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