2020-02-01 18:22:08 +00:00
|
|
|
<?php
|
|
|
|
|
2023-01-10 21:21:26 +00:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2023-01-10 22:44:09 +00:00
|
|
|
namespace Shimmie2;
|
|
|
|
|
2020-02-01 18:22:08 +00:00
|
|
|
class CustomHomeTheme extends HomeTheme
|
|
|
|
{
|
2021-03-14 23:43:50 +00:00
|
|
|
public function display_page(Page $page, string $sitename, string $base_href, string $theme_name, string $body): void
|
2020-02-01 18:22:08 +00:00
|
|
|
{
|
2023-01-10 21:21:26 +00:00
|
|
|
$page->set_mode(PageMode::DATA);
|
2020-02-01 18:22:08 +00:00
|
|
|
$page->add_auto_html_headers();
|
|
|
|
$hh = $page->get_all_html_headers();
|
|
|
|
$page->set_data(
|
|
|
|
<<<EOD
|
2020-03-13 09:23:54 +00:00
|
|
|
<html lang="en">
|
2020-03-08 15:10:06 +00:00
|
|
|
<head>
|
|
|
|
<title>$sitename</title>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
|
2020-02-24 22:46:51 +00:00
|
|
|
<meta name="theme-color" content="#7EB977">
|
2020-03-08 15:10:06 +00:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
|
|
$hh
|
|
|
|
<style>
|
2020-03-13 09:23:54 +00:00
|
|
|
div#front-page h1 {font-size: 4em; margin-top: 2em; margin-bottom: 0; text-align: center; border: none; background: none; box-shadow: none; -webkit-box-shadow: none; -moz-box-shadow: none;}
|
2020-03-08 15:10:06 +00:00
|
|
|
div#front-page {text-align:center;}
|
|
|
|
.space {margin-bottom: 1em;}
|
|
|
|
div#front-page div#links a {margin: 0 0.5em;}
|
|
|
|
div#front-page li {list-style-type: none; margin: 0;}
|
|
|
|
@media (max-width: 800px) {
|
|
|
|
div#front-page h1 {font-size: 3em; margin-top: 0.5em; margin-bottom: 0.5em;}
|
|
|
|
#counter {display: none;}
|
|
|
|
}
|
|
|
|
</style>
|
2023-01-11 18:37:02 +00:00
|
|
|
<meta name="juicyads-site-verification" content="20d309e193510e130c3f8a632f281335">
|
2020-03-08 15:10:06 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
2020-02-01 18:22:08 +00:00
|
|
|
$body
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
EOD
|
2020-02-01 21:20:32 +00:00
|
|
|
);
|
2020-02-01 18:22:08 +00:00
|
|
|
}
|
|
|
|
|
2021-03-14 23:43:50 +00:00
|
|
|
public function build_body(string $sitename, string $main_links, string $main_text, string $contact_link, $num_comma, string $counter_text): string
|
2020-02-01 18:22:08 +00:00
|
|
|
{
|
|
|
|
$main_links_html = empty($main_links) ? "" : "<div class='space' id='links'>$main_links</div>";
|
2021-12-14 18:32:47 +00:00
|
|
|
$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>";
|
2020-02-01 18:22:08 +00:00
|
|
|
$contact_link = empty($contact_link) ? "" : "<br><a href='$contact_link'>Contact</a> –";
|
2020-03-08 15:10:06 +00:00
|
|
|
$search_html = "
|
|
|
|
<div class='space' id='search'>
|
|
|
|
<form action='".make_link("post/list")."' method='GET'>
|
|
|
|
<input name='search' size='60' type='text' value='' class='autocomplete_tags' autofocus='autofocus'/>
|
|
|
|
<input type='hidden' name='q' value='/post/list'>
|
|
|
|
<input type='submit' value='Search' style=\"border: 1px solid #888; height: 30px; border-radius: 2px; background: #EEE;\"/>
|
|
|
|
</form>
|
|
|
|
</div>
|
2020-02-01 18:22:08 +00:00
|
|
|
";
|
2020-03-08 15:10:06 +00:00
|
|
|
return "
|
|
|
|
<div id='front-page'>
|
2022-10-28 00:45:35 +00:00
|
|
|
<h1><a style='text-decoration: none;' href='".make_link(). "'><span>$sitename</span></a></h1>
|
2020-03-08 15:10:06 +00:00
|
|
|
$main_links_html
|
|
|
|
$search_html
|
|
|
|
$message_html
|
|
|
|
$counter_html
|
2020-02-23 11:22:06 +00:00
|
|
|
<div class='space' id='foot'>
|
|
|
|
|
|
|
|
<!-- JuicyAds v3.1 -->
|
|
|
|
<script type='text/javascript' data-cfasync='false' async src='https://poweredby.jads.co/js/jads.js'></script>
|
|
|
|
<ins id='825625' data-width='908' data-height='270'></ins>
|
|
|
|
<script type='text/javascript' data-cfasync='false' async>(adsbyjuicy = window.adsbyjuicy || []).push({'adzone':825625});</script>
|
|
|
|
<!--JuicyAds END-->
|
2020-03-08 15:10:06 +00:00
|
|
|
|
2023-01-11 18:37:02 +00:00
|
|
|
<script type='application/javascript' src='https://a.realsrv.com/video-slider.js'></script>
|
|
|
|
<script type='application/javascript'>
|
|
|
|
var adConfig = {
|
|
|
|
'idzone': 3465907,
|
|
|
|
'frequency_period': 720,
|
|
|
|
'close_after': 0,
|
|
|
|
'on_complete': 'hide',
|
|
|
|
'branding_enabled': 1,
|
|
|
|
'screen_density': 25,
|
|
|
|
'cta_enabled': 0
|
|
|
|
};
|
|
|
|
ExoVideoSlider.init(adConfig);
|
|
|
|
</script>
|
|
|
|
|
2020-03-08 15:10:06 +00:00
|
|
|
<small><small>
|
|
|
|
$contact_link Serving $num_comma posts –
|
2022-10-28 00:45:35 +00:00
|
|
|
Running <a href='https://code.shishnet.org/shimmie2/'>Shimmie2</a>
|
2020-03-08 15:10:06 +00:00
|
|
|
</small></small>
|
|
|
|
</div>
|
2020-02-01 18:22:08 +00:00
|
|
|
</div>";
|
|
|
|
}
|
|
|
|
}
|