View thumbnail image on index page
This commit is contained in:
parent
14312cb5c6
commit
afb8a23588
@ -20,10 +20,11 @@
|
|||||||
@{
|
@{
|
||||||
var figure = product.Figures.First();
|
var figure = product.Figures.First();
|
||||||
var filePath = $"/Content/{product.Id}/{figure.Id}.jpg";
|
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"
|
<a data-src="@filePath" data-fancybox="@product.Id"
|
||||||
data-caption="@figure.Description"><img class="card-img-top"
|
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++)
|
@for (int i = 1; i < product.Figures.Count(); i++)
|
||||||
{
|
{
|
||||||
filePath = $"/Content/{product.Id}/{product.Figures[i].Id}.jpg";
|
filePath = $"/Content/{product.Id}/{product.Figures[i].Id}.jpg";
|
||||||
|
Loading…
Reference in New Issue
Block a user