This commit is contained in:
Bruno Rybársky 2024-01-11 16:00:36 +01:00
parent 8835db09f6
commit 1b02f6eb44
2 changed files with 8 additions and 8 deletions

@ -7,7 +7,7 @@ $default_page = "domov";
$template_dir = "templates/"; $template_dir = "templates/";
$page_dir = "pages/"; $static_page_dir = "pages/";
$dynamic_page_dir = "dynamic/"; $dynamic_page_dir = "dynamic/";
@ -27,11 +27,11 @@ if (empty($page_name)){
} }
$dynamic_page_file = $page_dir . $subdomain . "/" . $page_name . ".php"; $dynamic_page_file = $static_page_dir . $subdomain . "/" . $page_name . ".php";
$page_file = $page_dir . $subdomain . "/" . $page_name . ".html"; $page_file = $static_page_dir . $subdomain . "/" . $page_name . ".html";
$dynamic_page_file_global = $page_dir . "global/" . $page_name . ".php"; $dynamic_page_file_global = $static_page_dir . "global/" . $page_name . ".php";
$page_file_global = $page_dir . "global/" . $page_name . ".html"; $page_file_global = $static_page_dir . "global/" . $page_name . ".html";
$skeleton = file_get_contents($template_dir . "skeleton.html"); $skeleton = file_get_contents($template_dir . "skeleton.html");
$nav = file_get_contents($template_dir . "nav.html"); $nav = file_get_contents($template_dir . "nav.html");

@ -5,11 +5,11 @@ $navsite_template = '<li><a href="__LOCATION__" __CLASS__>__NAME__</a><ul class=
$navpage_template = '<li><a class="navpage_link" href="__LOCATION__" __CLASS__>__NAME__</a></li>'; $navpage_template = '<li><a class="navpage_link" href="__LOCATION__" __CLASS__>__NAME__</a></li>';
$site_dirs = array_diff(scandir($page_dir), array('.', '..')); $site_dirs = array_diff(scandir($static_page_dir), array('.', '..'));
foreach($site_dirs as $site_dir){ foreach($site_dirs as $site_dir){
echo "trying $site_dir/$page_dir"; echo "trying $static_page_dir/$site_dir";
$pages_dir = array_diff(scandir("$site_dir/$page_dir"), array('.', '..')); $pages_dir = array_diff(scandir("$static_page_dir/$site_dir"), array('.', '..'));
$navsite = $navpage_template; $navsite = $navpage_template;
$site_location = "$site_dir.$domain.$tld/$default_page"; $site_location = "$site_dir.$domain.$tld/$default_page";