95 lines
3.4 KiB
PHP
95 lines
3.4 KiB
PHP
<?php
|
|
use Lycoreco\Includes\Routing\Router;
|
|
|
|
$sidebar_links = [
|
|
[
|
|
'name' => 'Dashboard',
|
|
'icon' => 'fa-solid fa-house',
|
|
'router_name' => 'admin:home',
|
|
],
|
|
[
|
|
'name' => 'Users',
|
|
'icon' => 'fa-solid fa-users',
|
|
'router_name' => 'admin:user-list',
|
|
],
|
|
[
|
|
'name' => 'Recipes',
|
|
'icon' => 'fa-solid fa-bowl-food',
|
|
'router_name' => 'admin:recipe-list'
|
|
],
|
|
[
|
|
'name' => 'Categories',
|
|
'icon' => 'fa-solid fa-tag',
|
|
'router_name' => 'admin:category-list'
|
|
],
|
|
[
|
|
'name' => 'Ingredients',
|
|
'icon' => 'fa-solid fa-carrot',
|
|
'router_name' => 'admin:ingredient-list'
|
|
]
|
|
];
|
|
?>
|
|
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title><?php echo get_title_website($title); ?></title>
|
|
<link rel="shortcut icon" type="image/x-icon" href="<?php echo ASSETS_PATH . '/images/favicon.ico' ?>">
|
|
|
|
<!-- Google fonts -->
|
|
<!-- Google fonts -->
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,100..900;1,100..900&family=Roboto+Slab:wght@100..900&display=swap"
|
|
rel="stylesheet">
|
|
<!-- Google fonts/ -->
|
|
<!-- Google fonts/ -->
|
|
|
|
<!-- Font Awesome -->
|
|
<link href="<?php echo ASSETS_PATH . '/fontawesome-free-6.6.0-web/css/fontawesome.min.css' ?>" rel="stylesheet" />
|
|
<link href="<?php echo ASSETS_PATH . '/fontawesome-free-6.6.0-web/css/brands.min.css' ?>" rel="stylesheet" />
|
|
<link href="<?php echo ASSETS_PATH . '/fontawesome-free-6.6.0-web/css/solid.min.css' ?>" rel="stylesheet" />
|
|
<!-- Font Awesome/ -->
|
|
|
|
<link rel="stylesheet" href="<?php echo ASSETS_PATH . '/css/reset.css' ?>">
|
|
<link rel="stylesheet" href="<?php echo ASSETS_PATH . '/css/style.css' ?>">
|
|
<link rel="stylesheet" href="<?php echo ASSETS_PATH . '/css/admin.css' ?>">
|
|
</head>
|
|
|
|
<body>
|
|
<header class="header-admin">
|
|
<div class="logo-admin">
|
|
FridgeBites Admin
|
|
</div>
|
|
<div class="header-admin__control">
|
|
<div class="username">
|
|
Hello, <span><?php echo CURRENT_USER->field_username ?></span>
|
|
</div>
|
|
<div class="links">
|
|
<a href="<?php the_permalink('index:home') ?>" class="hover-anim">View site</a>
|
|
|
|
|
<a href="<?php the_permalink('users:logout') ?>" class="hover-anim">Log Out</a>
|
|
</div>
|
|
</div>
|
|
</header>
|
|
|
|
<div class="wrapper-admin">
|
|
<aside class="admin-sidebar">
|
|
<a href="<?php the_permalink('admin:recipe-new') ?>" class="btn btn-primary"><i
|
|
class="fa-solid fa-plus"></i> New recipe</a>
|
|
<hr>
|
|
<ul class="admin-sidebar__list">
|
|
<?php foreach ($sidebar_links as $link): ?>
|
|
<li>
|
|
<a class="<?php echo Router::$current_router_name == $link['router_name'] ? "active" : "" ?>"
|
|
href="<?php the_permalink($link['router_name']) ?>">
|
|
<i class="<?= $link['icon'] ?>"></i> <?= $link['name'] ?>
|
|
</a>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</aside>
|
|
<div class="wrapper-admin__content">
|