Tabs to spaces

This commit is contained in:
Khaled Hammouda 2014-04-09 17:23:23 -04:00
parent 2bcd8cb688
commit 5afd394ac9
2 changed files with 13 additions and 13 deletions

View File

@ -115,12 +115,12 @@
$return .= "<li"; $return .= "<li";
if (!(strpos($url, $key) === FALSE)) $return .= " class=\"open\""; if (!(strpos($url, $key) === FALSE)) $return .= " class=\"open\"";
$return .= ">"; $return .= ">";
$link = "#"; $link = "#";
$nav_class = "aj-nav "; $nav_class = "aj-nav ";
if(in_array("index.md", $node)) { if(in_array("index.md", $node)) {
$link = $t . clean_url($key, $mode); $link = $t . clean_url($key, $mode);
$nav_class = ""; $nav_class = "";
} }
$return .= "<a href=\"" . $link . "\" class=\"" . $nav_class . "folder\">"; $return .= "<a href=\"" . $link . "\" class=\"" . $nav_class . "folder\">";
$return .= clean_url($key, "Title"); $return .= clean_url($key, "Title");
$return .= "</a>"; $return .= "</a>";
@ -145,7 +145,7 @@
function generate_page($file) { function generate_page($file) {
global $base, $base_doc, $base_path, $docs_path, $options, $mode, $relative_base; global $base, $base_doc, $base_path, $docs_path, $options, $mode, $relative_base;
$template = $options['template']; $template = $options['template'];
$file_relative_path = str_replace($docs_path . '/', "", $file); $file_relative_path = str_replace($docs_path . '/', "", $file);
if ($file_relative_path === 'index.md') $homepage = TRUE; if ($file_relative_path === 'index.md') $homepage = TRUE;
else $homepage = FALSE; else $homepage = FALSE;
if (!$file) { if (!$file) {
@ -190,11 +190,11 @@
return $url; return $url;
case 'Title': case 'Title':
case 'Filename': case 'Filename':
$parts = array_reverse(explode('/', $url)); $parts = array_reverse(explode('/', $url));
if (isset($parts[0])) { if (isset($parts[0])) {
if ($parts[0] === "index.md" && isset($parts[1])) $url = $parts[1]; if ($parts[0] === "index.md" && isset($parts[1])) $url = $parts[1];
else $url = $parts[0]; else $url = $parts[0];
} }
$url = explode('_', $url); $url = explode('_', $url);
if (isset($url[0]) && is_numeric($url[0])) unset($url[0]); if (isset($url[0]) && is_numeric($url[0])) unset($url[0]);
if ($mode === 'Filename') $url = implode('_', $url); if ($mode === 'Filename') $url = implode('_', $url);

View File

@ -51,7 +51,7 @@
$file .= '/' . $dirs[$key]; $file .= '/' . $dirs[$key];
$tree = $tree[$dirs[$key]]; $tree = $tree[$dirs[$key]];
} }
if (is_file($file . "/index.md")) $file = $file . "/index.md"; if (is_file($file . "/index.md")) $file = $file . "/index.md";
return $file; return $file;
} }
} }