Repair single page documentation generator
This commit is contained in:
parent
e12465b4de
commit
da522ba2d3
@ -95,7 +95,7 @@ class Book
|
||||
|
||||
protected function generateCover()
|
||||
{
|
||||
return "<div style='margin:4em 30% 4em 0;'>" .
|
||||
return "<div>" .
|
||||
"<h1 style='font-size:40pt; margin-bottom:0;'>{$this->cover['title']}</h1>" .
|
||||
"<p><strong>{$this->cover['subject']}</strong> by {$this->cover['author']}</p>" .
|
||||
'</div><div class="page-break"> </div>';
|
||||
|
@ -4,6 +4,7 @@ use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Todaymade\Daux\Console\RunAction;
|
||||
use Todaymade\Daux\Daux;
|
||||
use Todaymade\Daux\Format\HTML\Template;
|
||||
use Todaymade\Daux\Format\HTML\ContentTypes\Markdown\ContentType;
|
||||
|
||||
class Generator implements \Todaymade\Daux\Format\Base\Generator
|
||||
@ -18,7 +19,11 @@ class Generator implements \Todaymade\Daux\Format\Base\Generator
|
||||
*/
|
||||
public function __construct(Daux $daux)
|
||||
{
|
||||
$params = $daux->getParams();
|
||||
|
||||
$this->daux = $daux;
|
||||
$this->templateRenderer = new Template($params);
|
||||
$params->templateRenderer = $this->templateRenderer;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -89,7 +94,9 @@ class Generator implements \Todaymade\Daux\Format\Base\Generator
|
||||
$width,
|
||||
function () use ($book, $current, $params) {
|
||||
$contentType = $this->daux->getContentTypeHandler()->getType($current);
|
||||
$content = ContentPage::fromFile($current, $params, $contentType)->getContent();
|
||||
$content = ContentPage::fromFile($current, $params, $contentType);
|
||||
$content->templateRenderer = $this->templateRenderer;
|
||||
$content = $content->getContent();
|
||||
$book->addPage($current, $content);
|
||||
}
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user