From 184d7f43cb87aa1d3b94ae3f5b5b86f6077d5fff Mon Sep 17 00:00:00 2001 From: David Katrinka Date: Sat, 28 Jun 2025 17:33:22 +0200 Subject: [PATCH 1/2] TIST-20: Fixed small issues on admin page --- apps/Admin/Templates/home.php | 2 +- apps/Admin/Templates/list-view.php | 2 +- .../widgets/ingredients_in_recipe.php | 4 +- .../Admin/Templates/widgets/recipe_author.php | 2 +- assets/css/admin.css | 53 ++++++++++++++++++- 5 files changed, 56 insertions(+), 7 deletions(-) diff --git a/apps/Admin/Templates/home.php b/apps/Admin/Templates/home.php index 57b303b..d3fd980 100644 --- a/apps/Admin/Templates/home.php +++ b/apps/Admin/Templates/home.php @@ -57,7 +57,7 @@
- +
diff --git a/apps/Admin/Templates/list-view.php b/apps/Admin/Templates/list-view.php index d04bb24..d797f56 100644 --- a/apps/Admin/Templates/list-view.php +++ b/apps/Admin/Templates/list-view.php @@ -15,7 +15,7 @@
- +
diff --git a/apps/Admin/Templates/widgets/ingredients_in_recipe.php b/apps/Admin/Templates/widgets/ingredients_in_recipe.php index 69eebf2..8a6c078 100644 --- a/apps/Admin/Templates/widgets/ingredients_in_recipe.php +++ b/apps/Admin/Templates/widgets/ingredients_in_recipe.php @@ -15,8 +15,8 @@
- Show all - Add ingredient + Show all + Add ingredient
\ No newline at end of file diff --git a/apps/Admin/Templates/widgets/recipe_author.php b/apps/Admin/Templates/widgets/recipe_author.php index 1e02c74..df6280f 100644 --- a/apps/Admin/Templates/widgets/recipe_author.php +++ b/apps/Admin/Templates/widgets/recipe_author.php @@ -1,6 +1,6 @@
Author
\ No newline at end of file diff --git a/assets/css/admin.css b/assets/css/admin.css index a70c87b..688bdca 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -22,6 +22,9 @@ } body { min-height: 100vh; + font-family: var(--common-font); + font-size: 14px; + color: var(--common-text); } .wrapper-admin { display: flex; @@ -220,6 +223,11 @@ body { .admin-block__table .row { padding: 10px; } + +.admin-block__table a{ + color: var(--title-color); +} + .admin-container.delete { text-align: center; } @@ -289,7 +297,48 @@ body { .admin-block__content .btn-control { display: flex; - justify-content: space-between; - + justify-content: space-between; } +input:disabled{ + background-color: #e9ecef; + color: #6c757d; +} + +.admin-single__form select{ + padding: 6px; + border-radius: 10px; + + margin-bottom: 20px; +} + +.admin-single__form img{ + height: 260px; + width: 350; + border-radius: 10px; + margin-bottom: 20px; +} + +.admin-single__form #instruction{ + width: 400px; + padding: 5px; + +} + +.admin-single__form input[type="file"]{ + margin-bottom: 20px; + +} + +.recipe-author{ + color: var(--title-color); +} + +.admin-single__form label{ + display: inline-block; + margin-bottom: 5px; +} + +.admin-single__form .input-checkbox{ + accent-color: #0DBB99; +} \ No newline at end of file -- 2.34.1 From f556d9948cf4a7c086d0d66ca913447b06c30215 Mon Sep 17 00:00:00 2001 From: David Katrinka Date: Sun, 29 Jun 2025 13:23:34 +0200 Subject: [PATCH 2/2] fixed more small issues on admin page --- .../Templates/components/admin-header.php | 53 ++++----- assets/css/admin.css | 104 ++++++++++++------ assets/css/style.css | 49 +++++++-- components/templates/layout/header.php | 2 +- 4 files changed, 138 insertions(+), 70 deletions(-) diff --git a/apps/Admin/Templates/components/admin-header.php b/apps/Admin/Templates/components/admin-header.php index 82ce87d..de94a83 100644 --- a/apps/Admin/Templates/components/admin-header.php +++ b/apps/Admin/Templates/components/admin-header.php @@ -3,28 +3,28 @@ use Lycoreco\Includes\Routing\Router; $sidebar_links = [ [ - 'name' => 'Dashboard', - 'icon' => 'fa-solid fa-house', + 'name' => 'Dashboard', + 'icon' => 'fa-solid fa-house', 'router_name' => 'admin:home', ], [ - 'name' => 'Users', - 'icon' => 'fa-solid fa-users', + 'name' => 'Users', + 'icon' => 'fa-solid fa-users', 'router_name' => 'admin:user-list', ], [ - 'name' => 'Recipes', - 'icon' => 'fa-solid fa-bowl-food', + 'name' => 'Recipes', + 'icon' => 'fa-solid fa-bowl-food', 'router_name' => 'admin:recipe-list' ], [ - 'name' => 'Categories', - 'icon' => 'fa-solid fa-tag', + 'name' => 'Categories', + 'icon' => 'fa-solid fa-tag', 'router_name' => 'admin:category-list' ], [ - 'name' => 'Ingredients', - 'icon' => 'fa-solid fa-carrot', + 'name' => 'Ingredients', + 'icon' => 'fa-solid fa-carrot', 'router_name' => 'admin:ingredient-list' ] ]; @@ -32,20 +32,24 @@ $sidebar_links = [ + <?php echo get_title_website($title); ?> + - + + - - + + @@ -54,6 +58,7 @@ $sidebar_links = [ +
@@ -65,7 +70,7 @@ $sidebar_links = [
@@ -73,20 +78,18 @@ $sidebar_links = [
-
- - - - \ No newline at end of file +
\ No newline at end of file diff --git a/assets/css/admin.css b/assets/css/admin.css index 688bdca..f6b0704 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -20,22 +20,26 @@ * { box-sizing: border-box; } + body { min-height: 100vh; font-family: var(--common-font); font-size: 14px; color: var(--common-text); } + .wrapper-admin { display: flex; min-height: calc(100vh - 64px); } + .wrapper-admin__content { width: 100%; } + .header-admin { - + height: 80px; display: flex; @@ -44,9 +48,11 @@ body { padding: 15px 10px; } + .header-admin__control { display: flex; } + .header-admin__control .username { color: var(--common-text); font-size: 16px; @@ -54,30 +60,36 @@ body { font-family: var(--common-font); margin-right: 10px; } + .header-admin__control .username span { color: var(--title-color); } + .header-admin__control .links a { - + text-decoration: none; font-size: 16px; font-weight: 500; font-family: var(--common-font); color: var(--common-text); } + .admin-sidebar { width: 100%; max-width: 314px; flex-shrink: 0; background: var(--panel-background); } + .admin-sidebar .btn { display: block; margin: 20px 20px 20px 20px; } + .admin-sidebar__list { list-style: none; } + .admin-sidebar__list a { display: block; padding: 10px 20px; @@ -85,37 +97,45 @@ body { font-size: 20px; text-decoration: none; } + .admin-sidebar__list a:hover, .admin-sidebar__list a.active { color: #000; } + .admin-sidebar__list a i { width: 34px; } + .admin-sidebar__list a span { background: #f00; padding: 2px 7px; font-size: 15px; border-radius: 100%; } + .admin-container { margin: 0 auto; width: 100%; max-width: 1100px; padding: 22px 30px; } + .admin-container h2 { font-size: 24px; margin-bottom: 20px; } + .admin-container section { margin-bottom: 25px; } + #dashboard-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; } + .dashboard-stats__item { display: flex; align-items: center; @@ -125,24 +145,30 @@ body { border-radius: 5px; padding: 12px 20px; } + .dashboard-stats__item .icon { font-size: 36px; margin-right: 20px; flex-shrink: 0; } + .dashboard-stats__item .value { font-size: 24px; font-weight: 700; } + .dashboard-stats__item.top-sales .icon { color: #FF7B00; } + .dashboard-stats__item.new-users .icon { color: #00A3E8; } + .dashboard-stats__item.orders .icon { color: #BA00E8; } + .dashboard-stats__item.profit .icon { color: #00E842; } @@ -156,6 +182,7 @@ body { background: var(--panel-background); border-radius: 10px; } + .admin-table { color: var(--common-text); @@ -166,43 +193,52 @@ body { border-radius: 5px; overflow: hidden; } + .admin-table thead { background: #0DBB99; color: #eaf8eb; } + .admin-table td, .admin-table th { padding: 15px 10px; } -.admin-table a{ +.admin-table a { color: var(--title-color); } + .admin-block__content .admin-block__table { border-radius: 5px; overflow: hidden; margin-bottom: 10px; } + .admin-table tbody tr:nth-child(odd), .admin-block__table .row:nth-child(odd) { background: #eaf8eb; } + .admin-table tbody tr:nth-child(even), .admin-block__table .row:nth-child(even) { background: #b6f1ba; } + .admin-block__table { color: var(--common-text); } + .admin-block__table .row { display: flex; justify-content: space-between; } + .admin-single { display: grid; grid-template-columns: 1fr 320px; gap: 20px; } + .admin-block { overflow: hidden; border-radius: 5px; @@ -210,9 +246,11 @@ body { margin-bottom: 20px; background: #f1fff2 } + .admin-block__content { padding: 10px; } + .admin-block__title { font-size: 18px; font-family: var(--common-font); @@ -220,24 +258,28 @@ body { padding: 10px 10px; color: #eaf8eb; } + .admin-block__table .row { padding: 10px; } -.admin-block__table a{ +.admin-block__table a { color: var(--title-color); } .admin-container.delete { text-align: center; } + .admin-container.delete .meta-text { font-size: 18px; margin-bottom: 15px; } + .admin-container.delete .btn-control { justify-content: space-around; } + .order-stat { display: flex; align-items: center; @@ -245,18 +287,22 @@ body { font-size: 18px; justify-content: space-between; } + .order-content .admin-block__table { margin-top: 15px; } + .order-stat span:first-child { color: var(--common-text); font-weight: 400; font-family: var(--common-font); } + .order-stat span:last-child { color: var(--title-color); } -.header-admin{ + +.header-admin { position: fixed; top: 0; left: 0; @@ -265,7 +311,7 @@ body { background-color: var(--panel-background); } -.logo-admin{ +.logo-admin { color: var(--title-color); font-family: var(--title-font); font-size: 20px; @@ -273,7 +319,7 @@ body { } -.input-admin input{ +.input-admin input { background: var(--input-background); border: 1px solid var(--input-border); color: var(--input-text-color); @@ -283,62 +329,48 @@ body { box-sizing: border-box; } -.input-admin button{ +.input-admin button { border: 1px solid var(--input-border); } -.admin-container .title{ + +.admin-container .title { text-align: start; - + } -.input-admin button{ + +.input-admin button { padding: 10px; border-radius: 10px; } .admin-block__content .btn-control { display: flex; - justify-content: space-between; + justify-content: space-between; } -input:disabled{ - background-color: #e9ecef; - color: #6c757d; -} -.admin-single__form select{ - padding: 6px; - border-radius: 10px; - - margin-bottom: 20px; -} -.admin-single__form img{ + + +.admin-single__form img { height: 260px; width: 350; border-radius: 10px; margin-bottom: 20px; } -.admin-single__form #instruction{ - width: 400px; - padding: 5px; - -} -.admin-single__form input[type="file"]{ + +.admin-single__form input[type="file"] { margin-bottom: 20px; - + } -.recipe-author{ +.recipe-author { color: var(--title-color); } -.admin-single__form label{ - display: inline-block; - margin-bottom: 5px; -} -.admin-single__form .input-checkbox{ +.admin-single__form .input-checkbox { accent-color: #0DBB99; } \ No newline at end of file diff --git a/assets/css/style.css b/assets/css/style.css index 8188af4..3078f67 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -155,26 +155,31 @@ body { color: var(--panel-text); text-align: center; } + .quote h2 { margin-right: 10px; margin-bottom: 5px; } + .welcome { background: var(--panel-background); margin-bottom: 30px; font-size: 24px; line-height: 32px; } + .welcome__inner { display: flex; justify-content: space-between; align-items: center; } + .welcome__inner .quote { font-size: 38px; text-align: left; margin-bottom: 20px; } + .welcome .text-container { padding: 50px 0; } @@ -992,16 +997,16 @@ label span { /* flex-wrap: wrap; */ } -.single-instructions{ +.single-instructions { width: 50%; font-size: 16px; } -.single-ingredients{ +.single-ingredients { width: 50%; } -.ingredients-table{ +.ingredients-table { width: 400px; border-radius: 10px; overflow: hidden; @@ -1009,17 +1014,43 @@ label span { border-collapse: separate; } -.ingredients-table th{ +.ingredients-table th { background-color: #008B70; color: #fff; padding: 10px 20px; text-align: start; } -.ingredients-table td{ +.ingredients-table td { padding: 10px 20px; border-top: 2px solid #b3b3b3; } + +input:disabled { + background-color: #e9ecef; + color: #6c757d; +} + +select { + padding: 6px; + border-radius: 10px; + + margin-bottom: 20px; +} + +textarea{ + width: 400px; + padding: 10px; + background-color: var(--input-background); + border: 1px solid var(--input-border); + border-radius: 10px; +} + +label { + display: inline-block; + margin-bottom: 5px; +} + @media (max-width: 768px) { .catalog-items { @@ -1027,10 +1058,11 @@ label span { grid-template-columns: repeat(2, 1fr); margin-right: 0; } + .welcome__inner { flex-direction: column; } - + .single-recipe-content { flex-wrap: wrap; @@ -1101,7 +1133,7 @@ label span { gap: 12px; } - .small-btns{ + .small-btns { display: flex; justify-content: center; gap: 10px; @@ -1113,7 +1145,7 @@ label span { width: auto; } - .btn-small{ + .btn-small { width: 35px; } @@ -1235,6 +1267,7 @@ label span { justify-content: center; width: 200px; } + #food-3d { display: none; } diff --git a/components/templates/layout/header.php b/components/templates/layout/header.php index a3bd22a..61845a7 100644 --- a/components/templates/layout/header.php +++ b/components/templates/layout/header.php @@ -64,7 +64,7 @@ -- 2.34.1