meta updates
This commit is contained in:
parent
128dc3841f
commit
a4002017b0
@ -115,6 +115,8 @@ function add_meta(array $data) {
|
||||
}
|
||||
};
|
||||
foreach ($data as $key => $value) {
|
||||
if (str_starts_with($value, '$'))
|
||||
$value = lang(substr($value, 1));
|
||||
switch ($key) {
|
||||
case '$url':
|
||||
case '$title':
|
||||
|
@ -8,6 +8,10 @@ class FilesHandler extends request_handler {
|
||||
const SEARCH_MIN_QUERY_LENGTH = 3;
|
||||
|
||||
function GET_files() {
|
||||
add_meta([
|
||||
'$title' => '$meta_files_title',
|
||||
'$description' => '$meta_files_description'
|
||||
]);
|
||||
set_title('$files');
|
||||
set_skin_opts(['head_section' => 'files']);
|
||||
$collections = array_map(fn(FilesCollection $c) => new CollectionItem($c), FilesCollection::cases());
|
||||
|
@ -21,6 +21,8 @@ class MainHandler extends request_handler {
|
||||
function GET_contacts() { redirect('/info/'); }
|
||||
|
||||
function GET_page() {
|
||||
global $config;
|
||||
|
||||
list($name) = input('name');
|
||||
|
||||
$page = pages::getByName($name);
|
||||
@ -39,6 +41,12 @@ class MainHandler extends request_handler {
|
||||
if ($page->shortName == 'info')
|
||||
set_skin_opts(['head_section' => 'about']);
|
||||
|
||||
if ($page) {
|
||||
add_meta([
|
||||
'$url' => 'https://'.$config['domain'].$page->getUrl(),
|
||||
'$title' => $page->title,
|
||||
]);
|
||||
}
|
||||
set_title($page ? $page->title : '???');
|
||||
render('main/page',
|
||||
unsafe_html: $page->getHtml(is_retina(), getUserTheme()),
|
||||
|
@ -24,6 +24,9 @@ lang_ru: "Русский"
|
||||
meta_index_title: "4in1. Mask of Shakespeare, mysteries of Bacon, book by Cartier, secrets of the NSA"
|
||||
meta_index_description: "This is the official web site of the book \"4in1\"."
|
||||
|
||||
meta_files_title: "4in1 - Files"
|
||||
meta_files_description: "Large archive of files and documents that provide the evidentiary basis for the \"4in1\" investigation."
|
||||
|
||||
# blog
|
||||
blog_new_post: "New post"
|
||||
blog_view_post: "View post"
|
||||
|
Loading…
x
Reference in New Issue
Block a user