İçeriğe geç
Tüm kodlar

ER3NSHOP

Kurulum sihirbazlı online mağaza sistemi

66 satır · 4 KBHamİndir
<!doctype html>
<html lang="tr">
<head>
    <?php tailwind_head() ?>
    <title><?= e(($title ? $title . ' · ' : '') . 'Yönetim · ' . store_name()) ?></title>
</head>
<body class="min-h-screen bg-zinc-50 font-sans text-zinc-900 antialiased">
<div id="admin-app">

<aside class="border-b border-zinc-200 bg-white lg:fixed lg:inset-y-0 lg:flex lg:w-64 lg:flex-col lg:border-r lg:border-b-0">
    <div class="flex h-16 shrink-0 items-center justify-between gap-3 px-5 lg:border-b lg:border-zinc-100">
        <a href="<?= admin_url() ?>" class="flex min-w-0 items-center gap-3">
            <span class="font-display flex size-8 shrink-0 items-center justify-center rounded-lg bg-ink text-sm font-bold text-white"><?= e(mb_strtoupper(mb_substr(store_name(), 0, 1))) ?></span>
            <span class="font-display truncate font-semibold tracking-tight"><?= e(store_name()) ?></span>
        </a>
        <a href="<?= url() ?>" target="_blank" class="btn-ghost btn-sm p-2 text-zinc-500" title="Mağazayı aç"><?= icon('external', 'size-4') ?></a>
    </div>

    <nav class="flex flex-wrap gap-1 px-3 pb-3 lg:flex-1 lg:flex-col lg:flex-nowrap lg:gap-4 lg:overflow-y-auto lg:py-4">
        <?php foreach (admin_menu() as $group => $links): ?>
            <?php $links = array_filter($links, fn($link) => admin_can($link[0])) ?>
            <?php if (!$links) continue ?>
            <div class="contents lg:block">
                <p class="hidden px-3 pb-1.5 text-[11px] font-semibold tracking-[.14em] text-zinc-400 uppercase lg:block"><?= $group ?></p>
                <?php foreach ($links as [$file, $label, $files, $name]): ?>
                    <?php $active = is_menu_active($files); $badge = admin_badge($file) ?>
                    <a href="<?= admin_url($file === 'index' ? '' : $file) ?>" class="flex items-center gap-3 rounded-lg px-3 py-1.5 text-[13px] font-medium transition <?= $active ? 'bg-zinc-100 text-ink' : 'text-zinc-600 hover:bg-zinc-50 hover:text-ink' ?>">
                        <?= icon($name, 'size-[18px] shrink-0 ' . ($active ? 'text-ink' : 'text-zinc-400')) ?>
                        <span class="flex-1"><?= $label ?></span>
                        <?php if ($badge): ?>
                            <span class="rounded-full bg-accent-600 px-1.5 py-0.5 text-[10px] leading-none font-bold text-white"><?= $badge ?></span>
                        <?php endif ?>
                    </a>
                <?php endforeach ?>
            </div>
        <?php endforeach ?>
    </nav>

    <div class="hidden border-t border-zinc-100 p-3 lg:block">
        <div class="flex items-center gap-3 rounded-lg px-2 py-2">
            <span class="flex size-8 shrink-0 items-center justify-center rounded-full bg-zinc-100 text-xs font-semibold text-zinc-600"><?= e(mb_strtoupper(mb_substr(current_admin()['name'], 0, 1))) ?></span>
            <div class="min-w-0 flex-1">
                <p class="truncate text-[13px] font-medium"><?= e(current_admin()['name']) ?></p>
                <p class="truncate text-[11px] text-zinc-500"><?= e(current_admin()['email']) ?></p>
            </div>
            <form method="post" action="<?= admin_url('cikis') ?>">
                <?= csrf_field() ?>
                <button class="rounded-md p-1.5 text-zinc-400 transition hover:bg-zinc-100 hover:text-ink" title="Çıkış yap"><?= icon('logout', 'size-4') ?></button>
            </form>
        </div>
    </div>
</aside>

<div class="lg:pl-64">
    <header class="sticky top-0 z-20 border-b border-zinc-200 bg-white/80 backdrop-blur-xl">
        <div class="flex min-h-16 flex-wrap items-center gap-3 px-4 py-3 sm:px-8">
            <h1 class="font-display mr-auto text-xl font-semibold tracking-tight"><?= e($title) ?></h1>
            <?= $actions ?>
        </div>
    </header>

    <main class="px-4 py-6 transition duration-200 in-data-busy:pointer-events-none in-data-busy:opacity-50 sm:px-8 sm:py-8">
        <?php if ($flashes = flashes()): ?>
            <?php include PARTS . '/flash.php' ?>
            <div class="h-3"></div>
        <?php endif ?>

Lisans bilgisi projenin LICENSE dosyasında.