2007-07-28 20:47:54 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class HomeTheme extends Themelet {
|
2012-01-20 03:29:29 +00:00
|
|
|
public function display_page(Page $page, $sitename, $base_href, $theme_name, $body) {
|
2007-07-28 20:47:54 +00:00
|
|
|
$page->set_mode("data");
|
2015-07-04 11:25:23 +00:00
|
|
|
$page->add_auto_html_headers();
|
2016-06-18 11:49:46 +00:00
|
|
|
$hh = $page->get_all_html_headers();
|
2007-07-28 20:47:54 +00:00
|
|
|
$page->set_data(<<<EOD
|
2016-09-03 17:48:20 +00:00
|
|
|
<!doctype html>
|
2007-07-28 20:47:54 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>$sitename</title>
|
2011-12-23 14:22:32 +00:00
|
|
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
2015-01-08 23:31:24 +00:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
2015-07-04 11:25:23 +00:00
|
|
|
$hh
|
2007-07-28 20:47:54 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
$body
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
EOD
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2017-09-19 17:55:43 +00:00
|
|
|
public function build_body(string $sitename, string $main_links, string $main_text, string $contact_link, $num_comma, string $counter_text) {
|
2009-08-24 01:15:08 +00:00
|
|
|
$main_links_html = empty($main_links) ? "" : "<div class='space' id='links'>$main_links</div>";
|
|
|
|
$message_html = empty($main_text) ? "" : "<div class='space' id='message'>$main_text</div>";
|
|
|
|
$counter_html = empty($counter_text) ? "" : "<div class='space' id='counter'>$counter_text</div>";
|
2016-06-06 11:12:25 +00:00
|
|
|
$contact_link = empty($contact_link) ? "" : "<br><a href='$contact_link'>Contact</a> –";
|
2009-08-24 01:15:08 +00:00
|
|
|
$search_html = "
|
|
|
|
<div class='space' id='search'>
|
2007-07-28 20:47:54 +00:00
|
|
|
<form action='".make_link("post/list")."' method='GET'>
|
2015-01-06 13:04:39 +00:00
|
|
|
<input name='search' size='30' type='search' value='' class='autocomplete_tags' autofocus='autofocus' autocomplete='off' />
|
2008-04-06 22:01:37 +00:00
|
|
|
<input type='hidden' name='q' value='/post/list'>
|
2007-07-28 20:47:54 +00:00
|
|
|
<input type='submit' value='Search'/>
|
|
|
|
</form>
|
|
|
|
</div>
|
2009-08-24 01:15:08 +00:00
|
|
|
";
|
|
|
|
return "
|
|
|
|
<div id='front-page'>
|
|
|
|
<h1><a style='text-decoration: none;' href='".make_link()."'><span>$sitename</span></a></h1>
|
|
|
|
$main_links_html
|
|
|
|
$search_html
|
|
|
|
$message_html
|
|
|
|
$counter_html
|
|
|
|
<div class='space' id='foot'>
|
|
|
|
<small><small>
|
2012-01-27 06:08:37 +00:00
|
|
|
$contact_link Serving $num_comma posts –
|
2009-08-24 01:15:08 +00:00
|
|
|
Running <a href='http://code.shishnet.org/shimmie2/'>Shimmie</a>
|
|
|
|
</small></small>
|
2007-07-28 20:47:54 +00:00
|
|
|
</div>
|
|
|
|
</div>";
|
|
|
|
}
|
|
|
|
}
|
2014-04-25 02:28:53 +00:00
|
|
|
|