Skip to content

Commit

Permalink
Add core template
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiju committed Jul 28, 2017
1 parent 2ae2c9a commit 8fa32b8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 6 additions & 0 deletions templates/core.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php
echo $this->render('navheader');
echo $this->page->isIndex() ? $this->render('toc') : '';
echo $this->html;
echo $this->render('navfooter');
?>
5 changes: 1 addition & 4 deletions templates/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
// this file multiple times.
include_once __DIR__ . '/helper.php';

// default library templates
$library = (getenv('VENDOR_PATH') ?: dirname(dirname(dirname(__DIR__))).'/') . "bookdown/bookdown/templates";

// project-specific templates
$templatePath = __DIR__;

Expand All @@ -27,7 +24,7 @@
$templates->set("body", "{$templatePath}/body.php");
$templates->set("script", "{$templatePath}/script.php");
$templates->set("nav", "{$templatePath}/nav.php");
$templates->set("core", "{$library}/core.php");
$templates->set("core", "{$templatePath}/core.php");
$templates->set("navheader", "{$templatePath}/navheader.php");
$templates->set("navfooter", "{$templatePath}/navfooter.php");
$templates->set("toc", "{$templatePath}/toc.php");
Expand Down

0 comments on commit 8fa32b8

Please sign in to comment.