diff --git a/lib/Manual.php b/lib/Manual.php new file mode 100644 index 00000000..a7676f4a --- /dev/null +++ b/lib/Manual.php @@ -0,0 +1,23 @@ + + + + diff --git a/www/css/manual.css b/www/css/manual.css index 87c21697..f02d341a 100644 --- a/www/css/manual.css +++ b/www/css/manual.css @@ -643,6 +643,10 @@ figure code.css{ overflow-x: auto; } +main.manual aside.alert p{ + text-align: center; +} + @media(max-width: 1700px){ main.manual > article{ margin-left: 10rem; diff --git a/www/manual/index.php b/www/manual/index.php index 565e6d1b..9e2fb942 100644 --- a/www/manual/index.php +++ b/www/manual/index.php @@ -6,10 +6,7 @@ use function Safe\sort; // Redirect to the latest version of the manual -$dirs = glob(MANUAL_PATH . '/*', GLOB_ONLYDIR); -sort($dirs); - -$currentManual = str_replace(WEB_ROOT, '', $dirs[sizeof($dirs) - 1]); +$currentManual = Manual::GetLatestVersion(); $url = HttpInput::GetString('url', true, ''); $url = preg_replace('|^/|ius', '', $url); @@ -21,4 +18,4 @@ if($url != ''){ } http_response_code(302); -header('Location: ' . $currentManual . $url); +header('Location: /manual/' . $currentManual . $url);