daux.io/templates/home.php

71 lines
2.6 KiB
PHP
Raw Permalink Normal View History

2015-04-23 10:24:50 +02:00
<?php $this->layout('theme::layout/00_layout') ?>
2017-02-23 23:15:07 +01:00
<?php $this->start('classes') ?>homepage<?php $this->stop() ?>
<div class="Navbar NoPrint">
<div class="Container">
2015-04-27 23:18:00 +02:00
<?php $this->insert('theme::partials/navbar_content', ['params' => $params]); ?>
2015-04-23 10:24:50 +02:00
</div>
</div>
2016-05-23 20:09:15 +02:00
<div class="Homepage">
<div class="HomepageTitle Container">
<?= ($params['tagline'])? '<h2>' . $params['tagline'] . '</h2>' : '' ?>
2015-04-23 10:24:50 +02:00
</div>
<div class="HomepageImage Container">
<?= ($params['image'])? '<img class="homepage-image img-responsive" src="' . $params['image'] . '" alt="' . $params['title'] . '">' : '' ?>
2016-05-23 20:09:15 +02:00
</div>
<div class="HomepageButtons">
<div class="Container">
2016-05-23 20:09:15 +02:00
<?php
if ($params['html']['repo']) {
echo '<a href="https://github.com/' . $params['html']['repo'] . '" class="Button Button--secondary Button--hero">' . $this->translate("View_on_github") . '</a>';
2016-05-23 20:09:15 +02:00
}
$view_doc = $this->translate("View_documentation");
2016-05-23 20:09:15 +02:00
foreach ($page['entry_page'] as $key => $node) {
echo '<a href="' . $node . '" class="Button Button--primary Button--hero">' . str_replace("__VIEW_DOCUMENTATION__", $view_doc, $key) . '</a>';
2016-05-23 20:09:15 +02:00
}
if(isset($params['html']['buttons']) && is_array($params['html']['buttons'])) {
foreach ($params['html']['buttons'] as $name => $link ) {
echo '<a href="' . $link . '" class="Button Button--secondary Button--hero">' . $name . '</a>';
}
}
2016-05-23 20:09:15 +02:00
?>
</div>
2015-04-23 10:24:50 +02:00
</div>
</div>
2016-05-23 20:09:15 +02:00
<div class="HomepageContent">
<div class="Container">
<div class="Container--inner">
2016-05-23 20:09:15 +02:00
<div class="doc_content s-content">
<?= $page['content']; ?>
2015-04-23 10:24:50 +02:00
</div>
</div>
</div>
</div>
2016-05-23 20:09:15 +02:00
<div class="HomepageFooter">
<div class="Container">
<div class="Container--inner">
<?php if (!empty($params['html']['links'])) { ?>
2016-05-23 20:09:15 +02:00
<ul class="HomepageFooter__links">
<?php foreach ($params['html']['links'] as $name => $url) {
2016-07-27 21:32:51 +02:00
echo '<li><a href="' . $url . '" target="_blank">' . $name . '</a></li>';
} ?>
2016-05-23 20:09:15 +02:00
</ul>
<?php } ?>
2016-05-23 20:09:15 +02:00
<?php if (!empty($params['html']['twitter'])) { ?>
2016-05-23 20:09:15 +02:00
<div class="HomepageFooter__twitter">
<div class="Twitter">
<?php $this->insert('theme::partials/twitter_buttons', ['params' => $params]); ?>
2016-05-23 20:09:15 +02:00
</div>
2015-04-23 10:24:50 +02:00
</div>
<?php } ?>
2015-04-23 10:24:50 +02:00
</div>
</div>
</div>