show all html headers on the front page, so autocomplete can work

This commit is contained in:
Shish 2015-07-04 12:25:23 +01:00
parent 9a28f0f51a
commit cabc600207
2 changed files with 5 additions and 2 deletions

View File

@ -274,7 +274,7 @@ class Page {
*
* TODO: This should really be configurable somehow...
*/
protected function add_auto_html_headers() {
public function add_auto_html_headers() {
global $config;
$data_href = get_base_href();

View File

@ -3,13 +3,16 @@
class HomeTheme extends Themelet {
public function display_page(Page $page, $sitename, $base_href, $theme_name, $body) {
$page->set_mode("data");
$hh = "";
$page->add_auto_html_headers();
foreach($page->html_headers as $h) {$hh .= $h;}
$page->set_data(<<<EOD
<html>
<head>
<title>$sitename</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel='stylesheet' href='$base_href/themes/$theme_name/style.css' type='text/css'>
$hh
</head>
<style>
div#front-page h1 {font-size: 4em; margin-top: 2em; margin-bottom: 0px; text-align: center; border: none; background: none; box-shadow: none; -webkit-box-shadow: none; -moz-box-shadow: none;}