From 4c0b6d983d571b496e1e9ad2e70f37d31c7f7092 Mon Sep 17 00:00:00 2001 From: devil_1nc Date: Fri, 28 Jun 2024 00:43:29 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=BE=D0=BC=D0=B5=D0=B6=D1=83?= =?UTF-8?q?=D1=82=D0=BE=D1=87=D0=BD=D0=B0=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WebApp/Pages/ProductPage.cshtml | 62 ++++++++++++++++++++++- WebApp/Pages/ProductPage.cshtml.cs | 9 ++++ WebApp/Pages/Shared/_Layout.cshtml.css | 70 ++++++++++++++++++++++++++ 3 files changed, 140 insertions(+), 1 deletion(-) diff --git a/WebApp/Pages/ProductPage.cshtml b/WebApp/Pages/ProductPage.cshtml index 409322c..c4e93b8 100644 --- a/WebApp/Pages/ProductPage.cshtml +++ b/WebApp/Pages/ProductPage.cshtml @@ -15,9 +15,22 @@
-
+ @*
@Model.productModel.Name +
*@ +
+
+ +
+ PREV + NEXT
+

@Model.productModel.Name

@@ -67,3 +80,50 @@
+ + diff --git a/WebApp/Pages/ProductPage.cshtml.cs b/WebApp/Pages/ProductPage.cshtml.cs index 3a319f9..1096357 100644 --- a/WebApp/Pages/ProductPage.cshtml.cs +++ b/WebApp/Pages/ProductPage.cshtml.cs @@ -16,12 +16,21 @@ namespace WebApp.Pages { productModel = APIClient.GetRequest($"Product/GetProduct?id={id}"); } + public byte[] GetMediaByProduct(ProductViewModel productModel) { MediaByProductsModel = APIClient.GetRequest>>($"MediaFile/GetByProducts"); MediaByProductsModel.TryGetValue(productModel.Id, out List models); return models[0].Image; } + + public List GetAllMediaFilesByProduct(ProductViewModel productModel) + { + MediaByProductsModel = APIClient.GetRequest>>($"MediaFile/GetByProducts"); + MediaByProductsModel.TryGetValue(productModel.Id, out List models); + return models; + } + public IActionResult OnPostAsync(Guid id, int count) { Amount = count; diff --git a/WebApp/Pages/Shared/_Layout.cshtml.css b/WebApp/Pages/Shared/_Layout.cshtml.css index c187c02..ced1548 100644 --- a/WebApp/Pages/Shared/_Layout.cshtml.css +++ b/WebApp/Pages/Shared/_Layout.cshtml.css @@ -46,3 +46,73 @@ button.accept-policy { white-space: nowrap; line-height: 60px; } + +$carousel-width: 600px; +$carousel-height: 300px; + +body { + background: #333; + color: #fff; + font-size: 22pt; + text-align: center; + font-family: 'Teko'; + letter-spacing: 0.15em; +} + +body * { + -webkit-user-select: none +} + +.wrap { + position: relative; + width: $carousel-width; + height: 300px; + margin: 0 auto; + box-shadow: 7px 7px 5px 0px rgba(0, 0, 0, 0.25); +} + +.window { + overflow: hidden; + position: relative; + background: #222; +} + +#carousel { + width: 10000px; + position: relative; + top: 0; + left: -450px; +} + +.slide { + height: 300px; + width: 500px; + cursor: pointer; + float: left; + display: flex; + flex-direction: column; + justify-content: center; +} + +#prev { + left: 0 +} + +#next { + right: 0 +} + +.transition { + transition: .7s; +} +#prev { + left: 0 +} + +#next { + right: 0 +} + +.transition { + transition: .7s; +} \ No newline at end of file