diff --git a/phpdotnet/phd/Package/PHP/CHM.php b/phpdotnet/phd/Package/PHP/CHM.php index 40562440..86d9c445 100644 --- a/phpdotnet/phd/Package/PHP/CHM.php +++ b/phpdotnet/phd/Package/PHP/CHM.php @@ -449,4 +449,14 @@ public function format_link($open, $name, $attrs, $props) { $link = preg_replace($search, $replacement, $link); return $link; } + + protected function headerNav($id): string + { + return ''; + } + + protected function footerSearch(): string + { + return ''; + } } diff --git a/phpdotnet/phd/Package/PHP/ChunkedXHTML.php b/phpdotnet/phd/Package/PHP/ChunkedXHTML.php index 0440afab..9c26c31b 100644 --- a/phpdotnet/phd/Package/PHP/ChunkedXHTML.php +++ b/phpdotnet/phd/Package/PHP/ChunkedXHTML.php @@ -2,6 +2,8 @@ namespace phpdotnet\phd; class Package_PHP_ChunkedXHTML extends Package_PHP_Web { + protected array $js = []; + public function __construct( Config $config, OutputHandler $outputHandler @@ -15,37 +17,69 @@ public function __destruct() { parent::__destruct(); } - public function header($id) { - $title = Format::getLongDescription($id); - static $cssLinks = null; - if ($cssLinks === null) { - $cssLinks = $this->createCSSLinks(); - } - $header = <<
- - - - $title -{$cssLinks} - - -HEADER; - $nextLink = $prevLink = $upLink = ''; + protected function headerNav($id): string + { + // https://feathericons.com search + $searchIcon = << + SVG; + + $nextLink = $prevLink = ''; if ($prevId = Format::getPrevious($id)) { $prev = array( "href" => $this->getFilename($prevId) . $this->getExt(), "desc" => $this->getShortDescription($prevId), ); - $prevLink = "
  • « {$prev["desc"]}
  • "; + $prevLink = "
  • « {$prev["desc"]}
  • "; } if ($nextId = Format::getNext($id)) { $next = array( "href" => $this->getFilename($nextId) . $this->getExt(), "desc" => $this->getShortDescription($nextId), ); - $nextLink = "
  • {$next["desc"]} »
  • "; + $nextLink = "
  • {$next["desc"]} »
  • "; } + + return << + + + HTML; + } + + protected function headerCrumbs($id): string + { + $title = Format::getLongDescription($id); + $upLink = ''; if ($parentId = Format::getParent($id)) { $up = array( "href" => $this->getFilename($parentId) . $this->getExt(), @@ -56,31 +90,196 @@ public function header($id) { } } - $nav = <<