mirror of
https://code.castopod.org/adaures/castopod.git
synced 2024-08-13 14:03:21 +02:00
9c224a8ac6
- add pages migration, model and entity - add page controllers - update routes config to input page forms and page view in public - fix markdow editor focus area - show pages links in public side footer closes #24
28 lines
595 B
PHP
28 lines
595 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
|
|
*
|
|
* @return string html pages navigation
|
|
*/
|
|
function render_page_links()
|
|
{
|
|
$pages = (new PageModel())->findAll();
|
|
$links = '';
|
|
foreach ($pages as $page) {
|
|
$links .= anchor($page->link, $page->title, [
|
|
'class' => 'px-2 underline hover:no-underline',
|
|
]);
|
|
}
|
|
|
|
return '<nav class="inline-flex">' . $links . '</nav>';
|
|
}
|