diff --git a/src/Element/Book.php b/src/Element/Book.php index 03e2f98..8601f76 100644 --- a/src/Element/Book.php +++ b/src/Element/Book.php @@ -54,7 +54,7 @@ class Book { } public function getHtml (): string { - return "
  • $this->name
  • "; + return "
  • getId()==$this->id?"":" href='/$this->id'") . ">$this->name
  • "; } /** @@ -64,4 +64,4 @@ class Book { return BookContented::parseString(file_get_contents("./data/$this->id/book.xml")); } -} \ No newline at end of file +} diff --git a/src/Element/BookCollection.php b/src/Element/BookCollection.php index 9a424da..da071dd 100644 --- a/src/Element/BookCollection.php +++ b/src/Element/BookCollection.php @@ -72,7 +72,7 @@ class BookCollection { public function getHtml (): string { $str = ""; - if ($this->name != self::ROOT) $str .= "
  • $this->name
      "; + if ($this->name != self::ROOT) $str .= "
    • $this->name
        "; foreach ($this->array as $node) { $str .= $node->getHtml(); } diff --git a/src/Element/BookContent/Chapter.php b/src/Element/BookContent/Chapter.php index f48e262..b8abd8e 100644 --- a/src/Element/BookContent/Chapter.php +++ b/src/Element/BookContent/Chapter.php @@ -66,7 +66,7 @@ class Chapter { public function getSummaryHtml (): string { $str = ""; - if ($this->parent != null) $str .= "
      • $this->name
          "; + if ($this->parent != null) $str .= "
        • $this->name
            "; foreach ($this->childs as $node) { $str .= $node->getSummaryHtml(); } diff --git a/src/Element/BookContent/Page.php b/src/Element/BookContent/Page.php index bbe2cc3..a1ab0b8 100644 --- a/src/Element/BookContent/Page.php +++ b/src/Element/BookContent/Page.php @@ -72,7 +72,7 @@ class Page { } public function getSummaryHtml (): string { - $str = "
          • $this->name"; + $str = "
          • getId()==$this->id?"":(PageMeta::$book->getId()." href='/".$this->id."'")) . ">$this->name"; if (sizeof($this->segues) > 0) { $str .= "
              "; foreach ($this->segues as $node) { diff --git a/src/Element/BookContent/Segment.php b/src/Element/BookContent/Segment.php index 7423fc3..d8e40dd 100644 --- a/src/Element/BookContent/Segment.php +++ b/src/Element/BookContent/Segment.php @@ -50,7 +50,7 @@ class Segment { } public function getSummaryHtml (): string { - return "
            • $this->name
            • "; + return "
            • $this->name
            • "; } -} \ No newline at end of file +} diff --git a/src/Element/LinkCollection.php b/src/Element/LinkCollection.php index eb170fc..66ae1b8 100644 --- a/src/Element/LinkCollection.php +++ b/src/Element/LinkCollection.php @@ -72,7 +72,7 @@ class LinkCollection { public function getHtml (): string { $str = ""; - if ($this->name != self::ROOT) $str .= "