szurubooru/src/Views/index-help.phtml
2013-11-30 00:05:03 +01:00

24 lines
675 B
PHTML

<?php
$tabs = $this->config->help->subTitles;
$firstTab = !empty($tabs) ? array_keys($tabs)[0] : null;
?>
<?php if (count($tabs) > 1): ?>
<nav class="tabs">
<ul>
<?php foreach ($tabs as $tab => $text): ?>
<?php if ($tab == $this->context->tab): ?>
<li class="selected <?php echo $tab ?>">
<?php else: ?>
<li class="<?php echo $tab ?>">
<?php endif ?>
<a href="<?php echo \Chibi\UrlHelper::route('index', 'help', $tab == $firstTab ? [] : ['tab' => $tab]) ?>">
<?php echo $text ?>
</a>
</li>
<?php endforeach ?>
</ul>
</nav>
<?php endif ?>
<?php echo TextHelper::parseMarkdown(file_get_contents($this->context->path)) ?>