diff --git a/default.json b/default.json index 38973f0..af1d76a 100755 --- a/default.json +++ b/default.json @@ -1,18 +1,18 @@ { - "title": "DAUX.IO", - "tagline": "The Easiest Way To Document Your Project", - "author": "Justin Walsh", + "title": "My Project", + "tagline": "My Stylish Documentation", + "author": "I, Me & Myself", "image": "", "theme": "daux-blue", - "breadcrumbs": true, + "breadcrumbs": false, "template": "default", - "toggle_code": true, - "date_modified": true, + "toggle_code": false, + "date_modified": false, "float": false, "file_editor": false, - "repo": "justinwalsh/daux.io", - "twitter": ["justin_walsh", "todaymade"], - "google_analytics": "UA-12653604-10", + "repo": "", + "twitter": [], + "google_analytics": "", "timezone": "America/Los_Angeles", "piwik_analytics": false, "piwik_analytics_id": "0", @@ -22,9 +22,5 @@ "folders": [] }, "links": { - "Download": "https://github.com/justinwalsh/daux.io/archive/master.zip", - "GitHub Repo": "https://github.com/justinwalsh/daux.io", - "Help/Support/Bugs": "https://github.com/justinwalsh/daux.io/issues", - "Made by Todaymade": "http://todaymade.com" } } diff --git a/docs/config.json b/docs/config.json index 20ac898..95914e7 100644 --- a/docs/config.json +++ b/docs/config.json @@ -1,24 +1,27 @@ { - "title": "DAUX.IO", - "tagline": "The Easiest Way To Document Your Project", - "image": "img/app.png", - "theme": "daux-blue", - "toggle_code": true, - "breadcrumbs": true, - "breadcrumb_separator": "Chevrons", - "date_modified": true, - "file_editor": false, - "repo": "justinwalsh/daux.io", - "ignore": { - "files": ["Work_In_Progress.md"], - "folders": ["99_Not_Ready"] + "title": "DAUX.IO", + "tagline": "The Easiest Way To Document Your Project", + "author": "Justin Walsh", + "image": "img/app.png", + "theme": "daux-blue", + "template": "default", + "toggle_code": true, + "breadcrumbs": true, + "breadcrumb_separator": "Chevrons", + "date_modified": true, + "float": true, + "file_editor": false, + "repo": "justinwalsh/daux.io", + "ignore": { + "files": ["Work_In_Progress.md"], + "folders": ["99_Not_Ready"] }, - "twitter": ["justin_walsh", "todaymade"], - "google_analytics": "UA-12653604-10", - "links": { - "Download": "https://github.com/justinwalsh/daux.io/archive/master.zip", - "GitHub Repo": "https://github.com/justinwalsh/daux.io", - "Help/Support/Bugs": "https://github.com/justinwalsh/daux.io/issues", - "Made by Todaymade": "http://todaymade.com" - } + "twitter": ["justin_walsh", "todaymade"], + "google_analytics": "UA-12653604-10", + "links": { + "Download": "https://github.com/justinwalsh/daux.io/archive/master.zip", + "GitHub Repo": "https://github.com/justinwalsh/daux.io", + "Help/Support/Bugs": "https://github.com/justinwalsh/daux.io/issues", + "Made by Todaymade": "http://todaymade.com" + } } diff --git a/libs/daux_directory.php b/libs/daux_directory.php index a34875a..b39a2ef 100644 --- a/libs/daux_directory.php +++ b/libs/daux_directory.php @@ -96,13 +96,33 @@ $name_a = explode('_', $a->name); $name_b = explode('_', $b->name); if (is_numeric($name_a[0])) { - if (is_numeric($name_b[0])) return (intval($name_a[0]) > intval($name_b[0])); - return -1; + $a = intval($name_a[0]); + if (is_numeric($name_b[0])) { + $b = intval($name_b[0]); + if (($a >= 0) == ($b >= 0)) { + $a = abs($a); + $b = abs($b); + if ($a == $b) return (strcasecmp($name_a[1], $name_b[1])); + return ($a > $b) ? 1 : -1; + } + return ($a >= 0) ? -1 : 1; + } + $t = $name_b[0]; + if ($t && $t[0] === '-') return -1; + return ($a < 0) ? 1 : -1; } else { - if (is_numeric($name_b[0])) return 1; - return (strcasecmp($name_a[0], $name_b[0])); + if (is_numeric($name_b[0])) { + $b = intval($name_b[0]); + if ($b >= 0) return 1; + $t = $name_a[0]; + if ($t && $t[0] === '-') return 1; + return ($b >= 0) ? 1 : -1; + } + $p = $name_a[0]; + $q = $name_b[0]; + if (($p && $p[0] === '-') == ($q && $q[0] === '-')) return strcasecmp($p, $q); + else return ($p[0] === '-') ? 1 : -1; } } - } ?> \ No newline at end of file diff --git a/libs/daux_helper.php b/libs/daux_helper.php index c4dbb10..5cc5960 100644 --- a/libs/daux_helper.php +++ b/libs/daux_helper.php @@ -31,8 +31,11 @@ public static function get_title_from_filename($filename) { $filename = explode('_', $filename); if ($filename[0] == '' || is_numeric($filename[0])) unset($filename[0]); + else { + $t = $filename[0]; + if ($t[0] == '-') $filename[0] = substr($t, 1); + } $filename = implode(' ', $filename); - return $filename; } @@ -44,6 +47,10 @@ public static function get_url_from_filename($filename) { $filename = explode('_', $filename); if ($filename[0] == '' || is_numeric($filename[0])) unset($filename[0]); + else { + $t = $filename[0]; + if ($t[0] == '-') $filename[0] = substr($t, 1); + } $filename = implode('_', $filename); return $filename; }