$style = array();
foreach ($sheets as $sheet) {
- $style[] = '<link type="text/css" rel="stylesheet" href="' . $sheet . '">';
+ $style[] = '<link type="text/css" rel="stylesheet" media="screen" href="' . $sheet . '">';
}
+ $style[] = '<link type="text/css" rel="stylesheet" media="print" href="style/print.css">';
$style = implode("\n\t\t", $style);
$pagesContents = '';
$description = '<meta name="description" content="' . html::escapeHTML($this->book->parametres->seoDescription) . '">';
}
- $vars = array('titre', 'credits', 'ga', 'style', 'script', 'pagesContents', 'description');
+ $print = $this->writePrint();
+
+ $vars = array('titre', 'credits', 'ga', 'style', 'script', 'pagesContents', 'description', 'print');
foreach ($vars as $v) {
$html = str_replace('<!-- $' . $v . ' -->', $$v, $html);
}
$thtml = $uhtml;
- $vars = array('titre', 'credits', 'ga', 'style', 'script', 'pagesContents');
+ $vars = array('titre', 'credits', 'ga', 'style', 'script', 'pagesContents', 'print');
foreach ($vars as $v) {
$uhtml = str_replace('<!-- $' . $v . ' -->', $$v, $uhtml);
}
$script.="\n\t\t" . '<script type="text/javascript">window.tester = true;</script>';
- $vars = array('titre', 'credits', 'ga', 'style', 'script');
+ $vars = array('titre', 'credits', 'ga', 'style', 'script', 'print');
foreach ($vars as $v) {
$thtml = str_replace('<!-- $' . $v . ' -->', $$v, $thtml);
}
file_put_contents($this->vdir . '/widget.html', $whtml);
}
+ protected function writePrint() {
+ $res = '<div id="printpages">';
+ for ($i = 1; $i <= $this->book->parametres->pages; $i++) {
+ $res.='<div class="printpage"><img src="data/background/150/t' . $i . '.jpg" alt="" /></div>';
+ }
+ $res.='</div>';
+ return $res;
+ }
+
protected function writeLangs() {
global $core;
$daoLang = new wsDAOLang($core->con);