mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-01-19 00:57:53 +00:00
var/www/pages/index.php : whitespaces
This commit is contained in:
parent
03508f2470
commit
b7cbd00f1d
1 changed files with 17 additions and 17 deletions
|
@ -12,19 +12,19 @@ if ($request_url === "/") {
|
|||
send_response(200, "
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
|
||||
<html>
|
||||
<head>
|
||||
<title>Codeberg Pages</title>
|
||||
</head>
|
||||
<body>
|
||||
<div style='height: 100%; display: flex; align-items: center; justify-content: center;'>
|
||||
<center>
|
||||
<h1>Codeberg Pages. Static Pages for your Projects.</h1>
|
||||
<p>Create a repo named 'pages' in your user account or org, push static content, HTML, style, fonts, images.</p>
|
||||
<p>Share your rendered content via: <pre>https://" . $_SERVER["HTTP_HOST"] . "/<username>/</pre></p>
|
||||
<p>Welcome to <a href='https://codeberg.org'>Codeberg.org</a>!</p>
|
||||
</center>
|
||||
</div>
|
||||
</body>
|
||||
<head>
|
||||
<title>Codeberg Pages</title>
|
||||
</head>
|
||||
<body>
|
||||
<div style='height: 100%; display: flex; align-items: center; justify-content: center;'>
|
||||
<center>
|
||||
<h1>Codeberg Pages. Static Pages for your Projects.</h1>
|
||||
<p>Create a repo named 'pages' in your user account or org, push static content, HTML, style, fonts, images.</p>
|
||||
<p>Share your rendered content via: <pre>https://" . $_SERVER["HTTP_HOST"] . "/<username>/</pre></p>
|
||||
<p>Welcome to <a href='https://codeberg.org'>Codeberg.org</a>!</p>
|
||||
</center>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
");
|
||||
}
|
||||
|
@ -51,14 +51,14 @@ $command = "sh -c \"cd '$git_root' && /usr/bin/git ls-tree 'master:$file_url' >
|
|||
exec($command, $output, $retval);
|
||||
if ($retval === 0) {
|
||||
if (substr($request_url, -1) !== "/") {
|
||||
$h = "Location: $request_url/";
|
||||
if ($_SERVER['QUERY_STRING'] !== "")
|
||||
$h .= "?" . $_SERVER['QUERY_STRING'];
|
||||
$h = "Location: " . $request_url . "/";
|
||||
if ($_SERVER['QUERY_STRING'] !== "")
|
||||
$h .= "?" . $_SERVER['QUERY_STRING'];
|
||||
header($h);
|
||||
exit();
|
||||
}
|
||||
if ($file_url !== "")
|
||||
$file_url .= "/";
|
||||
$file_url .= "/";
|
||||
$file_url .= "index.html";
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue