Update image and stylesheet paths
authorEduardo <[email protected]>
Fri, 10 Nov 2023 02:25:42 +0000 (03:25 +0100)
committerEduardo <[email protected]>
Fri, 10 Nov 2023 02:25:42 +0000 (03:25 +0100)
page-generator/index.php

index 80b565f0863e379e56e8303165e16eef15766e1c..63fc190a9e9dbee6c55a6a7e55f3dbd3ddad04a4 100644 (file)
@@ -26,18 +26,21 @@ foreach ($image_list as $key => $image) {
     $new_path = BASE_PATH_TEMP . "/assets/img/" . $image['id'] . '.' . pathinfo($image['path'], PATHINFO_EXTENSION);
     copy($old_path, $new_path);
 
-    $image_list[$key]['path'] = "../assets/img/" . $image['id'] . '.' . pathinfo($image['path'], PATHINFO_EXTENSION);
+    $image_list[$key]['path'] = "../../assets/img/" . $image['id'] . '.' . pathinfo($image['path'], PATHINFO_EXTENSION);
 }
 
 // create partials:
 $partialsPath = BASE_PATH_TEMP . "/partials";
 mkdir($partialsPath);
 
-#region header
+#region head
 
 // TODO: get the header and idk
+
+$head_path = $partialsPath . "/head.html";
+
 // generate head
-$generator->writeToFile($partialsPath . "/head.html", '
+$generator->writeToFile($head_path, '
 <!DOCTYPE html>
 <html lang="' . $generator->templateVar("lang-code") . '">
 <head>
@@ -46,7 +49,7 @@ $generator->writeToFile($partialsPath . "/head.html", '
     <title>' . $generator->templateVar("page-title") . '</title>
     
     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css">
-    <link rel="stylesheet" href="../assets/css/style.css">
+    <link rel="stylesheet" href="../../assets/css/style.css">
 </head>
 <body>
 ');