WowPress-Tailwind/theme/pages/sks.php

70 lines
1.7 KiB
PHP

<?php
use Wenprise\Eloquent\Database;
use Wenprise\Eloquent\Facades\DB;
use WoWPress\Models\SKS;
set_sidebar_status('top', false);
$liste = $GLOBALS['wowpress']['liste'];
if(!$liste){
$listen = SKS::getLists();
get_header();
?>
<div class="top-title flex flex-row gap-2" style="margin-top:calc(-1 * var(--wowp-gap))">
<div class="text-3xl font-bold bg-glass shadow p-3 text-center w-full">
<?= $GLOBALS['wowpress']['page_title']?>n
</div>
</div>
<section id="primary">
<main id="main">
<div class="bg-glass shadow p-auto">
<?php foreach($listen as $list): ?>
<a class="btn btn-outline" href="/sks/<?=$list->ID?>"><?=$list->list_name?></a>
<?php endforeach; ?>
</div>
</main>
</section>
<?php
get_footer();
exit;
}else{
$liste = SKS::find($liste);
get_header();
?>
<div class="top-title flex flex-row gap-2" style="margin-top:calc(-1 * var(--wowp-gap))">
<div class="text-3xl font-bold bg-glass shadow p-3 text-center w-full">
<?= $GLOBALS['wowpress']['page_title'] ?> "<?=$liste->list_name?>"
</div>
</div>
<section id="primary">
<main id="main">
<div class="bg-glass shadow p-auto">
<?php
foreach(SKS::getList($liste->list_name) as $sk):
?>
<div class="flex flex-row">
<button class="btn btn-outline"><?=$sk->char_name?></button>
<div class="border p-auto"><?=$sk->rank?></div>
<div class="border p-auto"><?=$sk->active?"Aktiv":"Inaktiv"?></div>
</div>
<?php
endforeach;
?>
</div>
</main>
</section>
<?php
get_footer();
}
?>