mirror of
https://code.castopod.org/adaures/castopod
synced 2025-04-23 01:01:20 +00:00

- adapt wireframes with responsive design - refactor models methods to cache requests for faster queries - update public controllers to cache pages while retaining analytics hits - add platform links to podcast page - add previous / next episodes in episode page - update npm packages to latest versions closes #30, #13
31 lines
743 B
PHP
31 lines
743 B
PHP
<?php
|
|
|
|
/**
|
|
* @copyright 2020 Podlibre
|
|
* @license https://www.gnu.org/licenses/agpl-3.0.en.html AGPL3
|
|
* @link https://castopod.org/
|
|
*/
|
|
|
|
use App\Models\PageModel;
|
|
|
|
/**
|
|
* Returns instance pages as links inside nav tag
|
|
*
|
|
* @param string $class
|
|
* @return string html pages navigation
|
|
*/
|
|
function render_page_links($class = null)
|
|
{
|
|
$pages = (new PageModel())->findAll();
|
|
$links = anchor(route_to('home'), lang('Common.home'), [
|
|
'class' => 'px-2 underline hover:no-underline',
|
|
]);
|
|
foreach ($pages as $page) {
|
|
$links .= anchor($page->link, $page->title, [
|
|
'class' => 'px-2 underline hover:no-underline',
|
|
]);
|
|
}
|
|
|
|
return '<nav class="' . $class . '">' . $links . '</nav>';
|
|
}
|