From 0d5109c48c63a8ea3e49461d35dac1346c98da9e Mon Sep 17 00:00:00 2001 From: Michael Gordeev Date: Mon, 16 Dec 2019 00:54:24 +0300 Subject: [PATCH] Cleanup 3 --- .../MyWebsite/Controllers/HomeController.cs | 4 +- MyWebsite/MyWebsite/Models/Project.cs | 2 - MyWebsite/MyWebsite/Program.cs | 6 - .../MyWebsite/Views/Gallery/Details.cshtml | 13 +- .../MyWebsite/Views/Gallery/Index.cshtml | 2 +- .../Views/Shared/ContactsBlock.cshtml | 32 ++- MyWebsite/MyWebsite/Views/Shared/Error.cshtml | 1 + .../MyWebsite/Views/Shared/Projects.cshtml | 9 +- .../MyWebsite/Views/Shared/_Layout.cshtml | 5 +- MyWebsite/MyWebsite/wwwroot/css/AboutMe.css | 37 --- .../MyWebsite/wwwroot/css/ContactsBlock.css | 68 +++-- MyWebsite/MyWebsite/wwwroot/css/Gallery.css | 76 +++--- MyWebsite/MyWebsite/wwwroot/css/Projects.css | 80 +++--- MyWebsite/MyWebsite/wwwroot/css/Style.css | 232 ++++++++++-------- MyWebsite/MyWebsite/wwwroot/favicon.ico | Bin 32038 -> 756 bytes .../wwwroot/images/Projects/2048.png | Bin 4442 -> 0 bytes .../wwwroot/images/Projects/Bonch.jpg | Bin 228362 -> 0 bytes .../wwwroot/images/Projects/FoxTube.png | Bin 2380590 -> 0 bytes .../wwwroot/images/Projects/MiSmartAlarm.png | Bin 15861 -> 0 bytes .../wwwroot/images/Projects/MotionDecoder.png | Bin 28744 -> 0 bytes MyWebsite/MyWebsite/wwwroot/images/cvbg.png | Bin 918102 -> 0 bytes .../MyWebsite/wwwroot/images/favicon.png | Bin 273532 -> 0 bytes MyWebsite/MyWebsite/wwwroot/images/sut.jpg | Bin 14595765 -> 0 bytes 23 files changed, 302 insertions(+), 265 deletions(-) delete mode 100644 MyWebsite/MyWebsite/wwwroot/css/AboutMe.css delete mode 100644 MyWebsite/MyWebsite/wwwroot/images/Projects/2048.png delete mode 100644 MyWebsite/MyWebsite/wwwroot/images/Projects/Bonch.jpg delete mode 100644 MyWebsite/MyWebsite/wwwroot/images/Projects/FoxTube.png delete mode 100644 MyWebsite/MyWebsite/wwwroot/images/Projects/MiSmartAlarm.png delete mode 100644 MyWebsite/MyWebsite/wwwroot/images/Projects/MotionDecoder.png delete mode 100644 MyWebsite/MyWebsite/wwwroot/images/cvbg.png delete mode 100644 MyWebsite/MyWebsite/wwwroot/images/favicon.png delete mode 100644 MyWebsite/MyWebsite/wwwroot/images/sut.jpg diff --git a/MyWebsite/MyWebsite/Controllers/HomeController.cs b/MyWebsite/MyWebsite/Controllers/HomeController.cs index fc1021d..78762ab 100644 --- a/MyWebsite/MyWebsite/Controllers/HomeController.cs +++ b/MyWebsite/MyWebsite/Controllers/HomeController.cs @@ -19,11 +19,11 @@ namespace MyWebsite.Controllers [Route("Projects")] public IActionResult Projects() => - View(); + View(Startup.Database.Projects.OrderByDescending(i => i.Id)); [Route("Error")] [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public IActionResult Error() => - View("Views/Shared/Error.cshtml", new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); + View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); } } \ No newline at end of file diff --git a/MyWebsite/MyWebsite/Models/Project.cs b/MyWebsite/MyWebsite/Models/Project.cs index a4d05ce..45dcc02 100644 --- a/MyWebsite/MyWebsite/Models/Project.cs +++ b/MyWebsite/MyWebsite/Models/Project.cs @@ -16,8 +16,6 @@ namespace MyWebsite.Models [Column(TypeName = "text")] public string Description { get; set; } - [Column(TypeName = "varchar(50)")] - public string ImageName { get; set; } [Column(TypeName = "varchar(50)")] public string Link { get; set; } [Column(TypeName = "varchar(50)")] diff --git a/MyWebsite/MyWebsite/Program.cs b/MyWebsite/MyWebsite/Program.cs index f74053d..71fb392 100644 --- a/MyWebsite/MyWebsite/Program.cs +++ b/MyWebsite/MyWebsite/Program.cs @@ -1,11 +1,5 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; using Microsoft.AspNetCore.Hosting; -using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Hosting; -using Microsoft.Extensions.Logging; namespace MyWebsite { diff --git a/MyWebsite/MyWebsite/Views/Gallery/Details.cshtml b/MyWebsite/MyWebsite/Views/Gallery/Details.cshtml index 7438a41..ab7ee1e 100644 --- a/MyWebsite/MyWebsite/Views/Gallery/Details.cshtml +++ b/MyWebsite/MyWebsite/Views/Gallery/Details.cshtml @@ -4,7 +4,9 @@ }
-

Back to gallery

+

+  Back to gallery +

@@ -20,17 +22,14 @@
+