set content id to actual page name and a blank div
authorEduardo <[email protected]>
Sat, 25 Nov 2023 02:01:57 +0000 (03:01 +0100)
committerEduardo <[email protected]>
Sat, 25 Nov 2023 02:01:57 +0000 (03:01 +0100)
(to use it to space the content with css without disturbing the mobile version)

page-generator/index.php

index 5f059555e09e682b9d46f24ba1de4d8ec85961d4..e69c8c18ca16646e4eb8b75026f6c1fa79420a68 100644 (file)
@@ -122,6 +122,8 @@ $generator->writeToFile($header_path, '<section id="header">');
 $logo = $data['images'][array_search("logo", array_column($data['images'], "id"))];
 $generator->writeToFile($header_path, '<img src="' . $logo['path'] . '" alt="' . $logo['description'] . '" />');
 
+$generator->writeToFile($header_path, '<div></div>');
+
 $generator->writeToFile($header_path, '<nav id="menu">');
 
 $generator->writeToFile($header_path, '<ul>');
@@ -170,7 +172,7 @@ foreach ($data['pages'] as $page) {
     // put headers
     $generator->writeToFile($page_path, $formed_head);
     $generator->writeToFile($page_path, file_get_contents($header_path));
-    $generator->writeToFile($page_path, '<section id="content" class="' . implode(' ', $page['class']) . '">');
+    $generator->writeToFile($page_path, '<section id="' . $page['path'] . '" class="' . implode(' ', $page['class']) . '">');
 
     // add title if any
     if (!empty($path_title[$page['path']])) {