Fix header homepage in generated mode

This commit is contained in:
Stéphane Goetz 2015-04-27 11:57:31 +02:00
parent b6c8b567fc
commit 976db8925d
4 changed files with 4 additions and 5 deletions

View File

@ -22,7 +22,6 @@ class Template
public function render($name, array $data = array()) public function render($name, array $data = array())
{ {
$this->engine->addData([ $this->engine->addData([
'index' => utf8_encode($data['params']['base_page'] . $data['params']['index']->value),
'base_url' => $data['params']['base_url'], 'base_url' => $data['params']['base_url'],
'base_page' => $data['params']['base_page'], 'base_page' => $data['params']['base_page'],
'page' => $data['page'], 'page' => $data['page'],

View File

@ -1,8 +1,7 @@
<?php $this->layout('theme::layout/00_layout') ?> <?php $this->layout('theme::layout/00_layout') ?>
<div class="navbar navbar-fixed-top hidden-print"> <div class="navbar navbar-fixed-top hidden-print">
<div class="container"> <div class="container">
<a class="brand navbar-brand pull-left" href="<?php echo $index; ?>"><?php echo $params['title']; ?></a> <?php $this->insert('partials/navbar_content', ['params' => $params]); ?>
<p class="navbar-text pull-right">Generated by <a href="http://daux.io">Daux.io</a></p>
</div> </div>
</div> </div>
<?php if ($params['repo']) { ?> <?php if ($params['repo']) { ?>

View File

@ -6,8 +6,7 @@
<div class="container-fluid fluid-height wrapper"> <div class="container-fluid fluid-height wrapper">
<div class="navbar navbar-fixed-top hidden-print"> <div class="navbar navbar-fixed-top hidden-print">
<div class="container-fluid"> <div class="container-fluid">
<a class="brand navbar-brand pull-left" href="<?php echo $index;?>"><?php echo $params['title']; ?></a> <?php $this->insert('partials/navbar_content', ['params' => $params]); ?>
<p class="navbar-text pull-right">Generated by <a href="http://daux.io">Daux.io</a></p>
</div> </div>
</div> </div>
<div class="row columns content"> <div class="row columns content">

View File

@ -0,0 +1,2 @@
<a class="brand navbar-brand pull-left" href="<?= $params['base_page'] . $params['index']->getUri(); ?>"><?php echo $params['title']; ?></a>
<p class="navbar-text pull-right">Generated by <a href="http://daux.io">Daux.io</a></p>