summaryrefslogtreecommitdiff
path: root/Views/Home/_Projects.cshtml
diff options
context:
space:
mode:
authorSergey Chebotar <s.chebotar@gmail.com>2023-02-14 07:04:29 +0300
committerSergey Chebotar <s.chebotar@gmail.com>2023-02-14 07:04:29 +0300
commit69deeefae835fa48b677297217bb622e0460401c (patch)
tree6ad630c6b94ef5ebdf287f455851734e5f7ae018 /Views/Home/_Projects.cshtml
parente922edc785a34f219ded4d2a3e5538235f7ae182 (diff)
Split Index into partials
Diffstat (limited to 'Views/Home/_Projects.cshtml')
-rw-r--r--Views/Home/_Projects.cshtml29
1 files changed, 29 insertions, 0 deletions
diff --git a/Views/Home/_Projects.cshtml b/Views/Home/_Projects.cshtml
new file mode 100644
index 0000000..d35fc11
--- /dev/null
+++ b/Views/Home/_Projects.cshtml
@@ -0,0 +1,29 @@
+@model IQueryable<MyDarling.Models.UnderwearBundle>;
+@using System.Globalization;
+
+<section class="projects-section bg-light" id="projects">
+ <div class="container px-3 px-lg-4 mt-4">
+ <div class="row gx-4 gx-lg-5 row-cols-2 row-cols-md-3 row-cols-xl-4 justify-content-center">
+ @foreach (var bundle in @Model)
+ {
+ <div class="col mb-5">
+ <div class="card h-100">
+ <a data-src="@bundle.Figures.FirstOrDefault()?.FilePath" data-fancybox="@bundle.Id"
+ data-caption="@bundle.Description"><img class="card-img-top"
+ src="@bundle.Figures.FirstOrDefault()?.FilePath" alt="@bundle.Name" /></a>
+ @for (int i = 1; i < @bundle.Figures.Count(); i++)
+ {
+ <a data-src="@bundle.Figures[i].FilePath" data-fancybox="@bundle.Id"></a>
+ }
+ <div class="card-body p-4">
+ <div class="text-center">
+ <h5 class="fw-bolder">@bundle.Name</h5>
+ @String.Format(new CultureInfo("ru-RU"), "{0:C0}", @bundle.Price)
+ </div>
+ </div>
+ </div>
+ </div>
+ }
+ </div>
+ </div>
+</section> \ No newline at end of file