add robots.txt
This commit is contained in:
parent
dfc762912a
commit
65b8f9342f
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
const ROUTER_VERSION = 3;
|
const ROUTER_VERSION = 4;
|
||||||
const ROUTER_MC_KEY = '4in1/routes';
|
const ROUTER_MC_KEY = '4in1/routes';
|
||||||
|
|
||||||
$RouterInput = [];
|
$RouterInput = [];
|
||||||
|
16
handler/ServicesHandler.php
Normal file
16
handler/ServicesHandler.php
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
class ServicesHandler extends request_handler {
|
||||||
|
|
||||||
|
function GET_robots_txt() {
|
||||||
|
$txt = <<<TXT
|
||||||
|
User-agent: *
|
||||||
|
Disallow: /admin
|
||||||
|
TXT;
|
||||||
|
|
||||||
|
header('Content-Type: text/plain');
|
||||||
|
echo $txt;
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -31,6 +31,10 @@
|
|||||||
//&-label {
|
//&-label {
|
||||||
// margin-right: 4px;
|
// margin-right: 4px;
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
//.is-author, .is-title {
|
||||||
|
// color: $fg;
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
&-subtitle {
|
&-subtitle {
|
||||||
|
@ -232,10 +232,10 @@ class BookItem extends model implements FilesItemInterface {
|
|||||||
public function getTitleHtml(): ?string {
|
public function getTitleHtml(): ?string {
|
||||||
if ($this->isFolder() || !$this->author)
|
if ($this->isFolder() || !$this->author)
|
||||||
return null;
|
return null;
|
||||||
$buf = '<b>'.htmlescape($this->author).'</b>';
|
$buf = '<b class="is-author">'.htmlescape($this->author).'</b><span class="is-title">';
|
||||||
if (!str_ends_with($this->author, '.'))
|
if (!str_ends_with($this->author, '.'))
|
||||||
$buf .= '.';
|
$buf .= '.';
|
||||||
$buf .= ' '.htmlescape($this->title);
|
$buf .= ' '.htmlescape($this->title).'</span>';
|
||||||
return $buf;
|
return $buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,6 +21,9 @@ return (function() {
|
|||||||
'files/{'.implode(',', $files_collections).'}/' => 'collection collection=${1}',
|
'files/{'.implode(',', $files_collections).'}/' => 'collection collection=${1}',
|
||||||
'files/'.$wff.'/(\d+)/' => 'collection collection='.$wff.' folder_id=$(1)',
|
'files/'.$wff.'/(\d+)/' => 'collection collection='.$wff.' folder_id=$(1)',
|
||||||
],
|
],
|
||||||
|
'Services' => [
|
||||||
|
'robots.txt' => 'robots_txt',
|
||||||
|
],
|
||||||
'Admin' => [
|
'Admin' => [
|
||||||
'admin/' => 'index',
|
'admin/' => 'index',
|
||||||
'admin/{login,logout,log}/' => '${1}',
|
'admin/{login,logout,log}/' => '${1}',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user