-
+ @*
+
*@
+
+
+
+ @for (int i = 0; i < Model.GetAllMediaFilesByProduct(Model.productModel).Count; i++)
+ {
+
+ }
+
+
+
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