diff --git a/libs/Format/HTMLFile/Book.php b/libs/Format/HTMLFile/Book.php
index 5023625e..5fea33a6 100644
--- a/libs/Format/HTMLFile/Book.php
+++ b/libs/Format/HTMLFile/Book.php
@@ -1,24 +1,29 @@
tree = $tree;
- $this->cover = $cover;
+ $this->config = $config;
}
protected function getStyles()
{
- // TODO :: un-hardcode that
- return '';
+ $styles = '';
+ foreach ($this->config->getTheme()->getCSS() as $css) {
+ $file = $this->config->getThemesPath() . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . $css;
+ $styles .= '';
+ }
+
+ return $styles;
}
protected function getPageUrl($page)
@@ -89,8 +94,8 @@ protected function generateTOC()
protected function generateCover()
{
return '
' .
- "
{$this->cover['title']}
" .
- "
{$this->cover['subject']} by {$this->cover['author']}
" .
+ "
{$this->config->getTitle()}
" .
+ "
{$this->config->getTagline()} by {$this->config->getAuthor()}
" .
'
';
}
@@ -115,9 +120,9 @@ public function addPage($page, $content)
public function generateHead()
{
$head = [
- "{$this->cover['title']}",
- "",
- "",
+ "{$this->config->getTitle()}",
+ "",
+ "",
"",
$this->getStyles(),
];
diff --git a/libs/Format/HTMLFile/Generator.php b/libs/Format/HTMLFile/Generator.php
index 672e509c..8b96d7eb 100644
--- a/libs/Format/HTMLFile/Generator.php
+++ b/libs/Format/HTMLFile/Generator.php
@@ -57,15 +57,13 @@ function () use ($destination) {
}
);
- DauxHelper::rebaseConfiguration($config, '');
+ // TODO :: make it possible to customize the single page theme
+ $config['html']['theme'] = 'daux_singlepage';
+ $config['html']['theme-variant'] = null;
- $data = [
- 'author' => $config->getAuthor(),
- 'title' => $config->getTitle(),
- 'subject' => $config->getTagline(),
- ];
+ DauxHelper::rebaseConfiguration($config, '');
- $book = new Book($this->daux->tree, $data);
+ $book = new Book($this->daux->tree, $config);
$current = $this->daux->tree->getIndexPage();
while ($current) {
diff --git a/libs/Tree/Content.php b/libs/Tree/Content.php
index df97a9d9..448b8022 100644
--- a/libs/Tree/Content.php
+++ b/libs/Tree/Content.php
@@ -150,6 +150,7 @@ public function dump()
$dump['prev'] = $this->getPrevious() ? $this->getPrevious()->getUrl() : '';
$dump['next'] = $this->getNext() ? $this->getNext()->getUrl() : '';
+ $dump['attributes'] = $this->getAttribute();
return $dump;
}