Files
administration/Views/HelloFresh/Ingredients.cshtml
2025-09-16 22:20:21 +02:00

54 lines
1.9 KiB
Plaintext

@{
ViewData["Title"] = "Home Page";
}
<head>
<title>@ViewData["Title"]</title>
<link rel="stylesheet" href="~/css/HelloFresh/ingredients.css" asp-append-version="true" />
<link rel="stylesheet" href="https://unpkg.com/tippy.js@6/dist/tippy.css" />
<!-- Custom fonts for this template-->
<link href="~/lib/fontawesome-free/css/all.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
</head>
<section id="recipesAll" class="recipes-section">
<div id="recipeStrip" class="hscroll grid"></div>
</section>
<section id="ingredientsBoard" class="hf-ingredients">
<div id="titleAndSearch">
<div class="hf-head">
<h2>Ingrédients</h2>
</div>
<div class="hf-search">
<input id="hfSearch" type="search" class="form-control" placeholder="Rechercher un ingrédient..." />
</div>
</div>
<!-- liste principale -->
<ul id="ingredientsList" class="hf-grid"></ul>
<!-- séparation -->
<hr class="hf-sep" />
<!-- “à avoir chez soi” -->
<h3 class="hf-subtitle">Ingrédients à avoir chez soi</h3>
<ul id="neededIngredients" class="hf-grid"></ul>
</section>
@{
var currentUser = Context.Session.GetString("UserName") ?? "";
bool isCore = currentUser.Equals("Mae", StringComparison.OrdinalIgnoreCase)
|| currentUser.Equals("Byakuya", StringComparison.OrdinalIgnoreCase);
}
<script>
window.CURRENT_USER = @Html.Raw(System.Text.Json.JsonSerializer.Serialize(currentUser));
window.IS_CORE_USER = @Html.Raw(isCore.ToString().ToLower());
// 👉 liste blanche pour la vue "partagée"
window.CORE_USERS = ["Mae","Byakuya"];
</script>
<script src="~/js/HelloFresh/ingredients.js" asp-append-version="true"></script>