From 29478524c7aa12b0d95ebbc4b8b168119c9557c4 Mon Sep 17 00:00:00 2001 From: Sergey Chebotar Date: Mon, 6 Feb 2023 21:32:40 +0300 Subject: [PATCH] Add base carousel --- Controllers/BundleController.cs | 5 +- Views/Bundle/Show.cshtml | 76 ++++++-- Views/Home/Index.cshtml | 324 +++++++++++++++----------------- Views/Shared/_Layout.cshtml | 26 +++ libman.json | 7 +- 5 files changed, 242 insertions(+), 196 deletions(-) create mode 100644 Views/Shared/_Layout.cshtml diff --git a/Controllers/BundleController.cs b/Controllers/BundleController.cs index 8ec1030..d8d2512 100644 --- a/Controllers/BundleController.cs +++ b/Controllers/BundleController.cs @@ -1,4 +1,5 @@ using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; using MyDarling.Models; namespace MyDarling.Controllers @@ -10,9 +11,9 @@ namespace MyDarling.Controllers { this.context = context; } - public async Task Show(int id) + public IActionResult Show(int id) { - return View(await context.UnderwearBundles.FindAsync(id)); + return View(context.UnderwearBundles.Include(x => x.Figures).Where(x => x.Id == id).FirstOrDefault()); } } } \ No newline at end of file diff --git a/Views/Bundle/Show.cshtml b/Views/Bundle/Show.cshtml index 8d3e055..fe6ce88 100644 --- a/Views/Bundle/Show.cshtml +++ b/Views/Bundle/Show.cshtml @@ -1,14 +1,62 @@ - - - - - - @Model?.Name - - - -

@Model?.Name

-

@Model?.Description

- - - +@model MyDarling.Models.UnderwearBundle; +@{ + Layout = "_Layout"; +} + +
+
+
+
+ +
+
+

@Model?.Name

+

@Model?.Description

+
+
+
+
\ No newline at end of file diff --git a/Views/Home/Index.cshtml b/Views/Home/Index.cshtml index 5a368de..5cc07f3 100644 --- a/Views/Home/Index.cshtml +++ b/Views/Home/Index.cshtml @@ -1,192 +1,168 @@ @model IQueryable; - - - - - - - - - - Grayscale - Start Bootstrap Theme - - - - - - - - - -
-
-
-
-

Grayscale

-

A free, responsive, one page Bootstrap theme created by - Start Bootstrap.

- Get Started -
+
+ + +
+
+
+
+

Built with Bootstrap 5

+

+ Grayscale is a free Bootstrap theme created by Start Bootstrap. It can be yours right now, + simply download the template on + the preview page. + The theme is open source, and you can use it for any purpose, personal or commercial. +

-
- -
-
-
-
-

Built with Bootstrap 5

-

- Grayscale is a free Bootstrap theme created by Start Bootstrap. It can be yours right now, - simply download the template on - the preview page. - The theme is open source, and you can use it for any purpose, personal or commercial. -

-
-
- ... -
-
- -
-
-
- @foreach (var bundle in @Model) - { -
-
- ... -
-
-
@bundle.Name
- @bundle.Price.ToString("c0") -
+ ... +
+
+ +
+
+
+ @foreach (var bundle in @Model) + { +
+
+ ... +
+
+
@bundle.Name
+ @bundle.Price.ToString("c0")
- } -
-
-
- - - -
-
-
-
-
-
- -

Address

-
-
4923 Market Street, Orlando FL
+
+
+ + + +
+
+
+
+
+
+ +

Address

+
+
4923 Market Street, Orlando FL
- -
- -
-
Copyright © Your Website 2022
-
- - - - - - - \ No newline at end of file + + + \ No newline at end of file diff --git a/Views/Shared/_Layout.cshtml b/Views/Shared/_Layout.cshtml new file mode 100644 index 0000000..e685f8d --- /dev/null +++ b/Views/Shared/_Layout.cshtml @@ -0,0 +1,26 @@ + + + + + + + + + Grayscale - Start Bootstrap Theme + + + + + + + @RenderBody() +
+
© My Darling underwear 2023
+
+ + + + + + + \ No newline at end of file diff --git a/libman.json b/libman.json index c15368e..ceee271 100644 --- a/libman.json +++ b/libman.json @@ -1,10 +1,5 @@ { "version": "1.0", "defaultProvider": "cdnjs", - "libraries": [ - { - "library": "bootstrap@5.2.3", - "destination": "wwwroot/lib/bootstrap" - } - ] + "libraries": [] } \ No newline at end of file