From 56336ee3d5ec32647f6dbf35cf09f94a13795b60 Mon Sep 17 00:00:00 2001 From: Connor Thomson Date: Sat, 19 Sep 2026 10:51:36 -0700 Subject: Random fixes and updates --- php/templates.php | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 php/templates.php (limited to 'php/templates.php') diff --git a/php/templates.php b/php/templates.php deleted file mode 100644 index dfd4063..0000000 --- a/php/templates.php +++ /dev/null @@ -1,37 +0,0 @@ -. - */ - -function render_component(string $componentPath): string { - ob_start(); - include($componentPath); - return ob_get_clean(); -} - -function template_process(string $template, array $components = []): string { - $html = file_get_contents($template); - - foreach ($components as $placeholder => $componentPath) { - $injectedContent = render_component($componentPath); - $html = str_replace($placeholder, $injectedContent, $html); - } - - return $html; -} - -?> -- cgit v1.2.3