summaryrefslogtreecommitdiff
path: root/Pages/Shared/_Products.cshtml
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2023-06-05 07:08:38 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2023-06-05 07:08:38 +0300
commitafb8a2358845aa2135177e75dfcb9348446e4d78 (patch)
tree47d1687ed900d7c51290cb73e4385badfd66f556 /Pages/Shared/_Products.cshtml
parent14312cb5c6f3f21742750e501adf0bb48522b1d7 (diff)
View thumbnail image on index page
Diffstat (limited to 'Pages/Shared/_Products.cshtml')
-rw-r--r--Pages/Shared/_Products.cshtml3
1 files changed, 2 insertions, 1 deletions
diff --git a/Pages/Shared/_Products.cshtml b/Pages/Shared/_Products.cshtml
index a82ac1c..eb38444 100644
--- a/Pages/Shared/_Products.cshtml
+++ b/Pages/Shared/_Products.cshtml
@@ -20,10 +20,11 @@
@{
var figure = product.Figures.First();
var filePath = $"/Content/{product.Id}/{figure.Id}.jpg";
+ var thumbnailPath = $"/Content/{product.Id}/{figure.Id}_thumb.jpg";
}
<a data-src="@filePath" data-fancybox="@product.Id"
data-caption="@figure.Description"><img class="card-img-top"
- src="@filePath" alt="@product.Name" /></a>
+ src="@thumbnailPath" alt="@product.Name" /></a>
@for (int i = 1; i < product.Figures.Count(); i++)
{
filePath = $"/Content/{product.Id}/{product.Figures[i].Id}.jpg";