daux.io/templates/layout/05_page.php

89 regels
3.9 KiB
PHP

2015-04-23 10:24:50 +02:00
<?php $this->layout('theme::layout/00_layout') ?>
2015-07-19 16:36:34 +02:00
<?php if ($params['html']['repo']) { ?>
2016-05-23 20:09:15 +02:00
<a href="https://github.com/<?= $params['html']['repo']; ?>" target="_blank" id="github-ribbon" class="Github hidden-print"><img src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
2015-04-23 10:24:50 +02:00
<?php } ?>
2016-05-23 20:09:15 +02:00
<div class="Navbar hidden-print">
<?php $this->insert('theme::partials/navbar_content', ['params' => $params]); ?>
</div>
<div class="Columns content">
<div class="Columns__left hidden-print Collapsible">
<div class="Collapsible__container">
<button type="button" class="Button Collapsible__trigger">
<span class="Collapsible__trigger--bar"></span>
<span class="Collapsible__trigger--bar"></span>
<span class="Collapsible__trigger--bar"></span>
</button>
2015-04-23 10:24:50 +02:00
</div>
2016-05-23 20:09:15 +02:00
<div class="Collapsible__content">
<!-- Navigation -->
<?php
$rendertree = $tree;
$path = '';
2016-05-23 20:09:15 +02:00
if ($page['language'] !== '') {
$rendertree = $tree->value[$page['language']];
$path = $page['language'];
}
2015-04-23 10:24:50 +02:00
2016-05-23 20:09:15 +02:00
echo $this->get_navigation($rendertree, $path, isset($params['request']) ? $params['request'] : '', $base_page, $params['mode']);
?>
2016-04-08 00:13:06 +02:00
2016-05-23 20:09:15 +02:00
<div class="Links">
<?php if (!empty($params['html']['links'])) { ?>
<hr/>
<?php foreach ($params['html']['links'] as $name => $url) { ?>
<a href="<?= $url ?>" target="_blank"><?= $name ?></a>
<br />
<?php } ?>
<?php } ?>
<?php if ($params['html']['toggle_code']) { ?>
<div class="CodeToggler">
<hr/>
<?php if ($params['html']['float']) { ?>
<span class="CodeToggler__text">Code blocks</span>
<div class="ButtonGroup" role="group">
<button class="Button Button--default Button--small CodeToggler__button CodeToggler__button--hide">No</button>
<button class="Button Button--default Button--small CodeToggler__button CodeToggler__button--below">Below</button>
<button class="Button Button--default Button--small CodeToggler__button CodeToggler__button--float">Inline</button>
2016-04-08 00:13:06 +02:00
</div>
2016-05-23 20:09:15 +02:00
<?php } else { ?>
<a class="CodeToggler__button CodeToggler__button--main" href="#">Show Code Blocks Inline</a><br>
2016-04-08 00:13:06 +02:00
<?php } ?>
2016-05-23 20:09:15 +02:00
</div>
<?php } ?>
2015-04-23 10:24:50 +02:00
2016-05-23 20:09:15 +02:00
<?php if (!empty($params['html']['twitter'])) { ?>
<hr/>
<div class="Twitter">
2015-07-19 16:36:34 +02:00
<?php foreach ($params['html']['twitter'] as $handle) { ?>
2016-05-23 20:09:15 +02:00
<iframe allowtransparency="true" frameborder="0" scrolling="no" style="width:162px; height:20px;" src="https://platform.twitter.com/widgets/follow_button.html?screen_name=<?= $handle; ?>&amp;show_count=false"></iframe>
<br />
<br />
2015-04-23 10:24:50 +02:00
<?php } ?>
2016-05-23 20:09:15 +02:00
</div>
<?php } ?>
2015-04-23 10:24:50 +02:00
</div>
</div>
2016-05-23 20:09:15 +02:00
<!-- For Mobile -->
2016-02-16 21:54:57 +01:00
2016-03-13 21:51:58 +01:00
2016-05-23 20:09:15 +02:00
</div>
<div class="Columns__right <?= $params['html']['float'] ? 'Columns__right--float' : ''; ?>">
<div class="Columns__right__content">
<?php if ($params['html']['search']) { ?>
<div id="tipue_search_content" style="display:none"></div>
<?php } ?>
<div class="doc_content">
<?= $this->section('content'); ?>
2015-04-23 10:24:50 +02:00
</div>
</div>
</div>
</div>