From 27c6abfa62a3e0704466f2f9d4ec6f15e7f5d50d Mon Sep 17 00:00:00 2001 From: "Collin M. Barrett" Date: Fri, 2 Feb 2018 06:34:54 -0600 Subject: [PATCH] minor Web tweaks --- .../ClientApp/components/Home.tsx | 9 ++++- .../ClientApp/components/NavMenu.tsx | 5 ++- .../Controllers/SampleDataController.cs | 37 ------------------- src/FilterLists.Web/Views/Home/Index.cshtml | 2 +- src/FilterLists.Web/Views/Shared/Error.cshtml | 2 +- .../Views/Shared/_Layout.cshtml | 2 +- 6 files changed, 14 insertions(+), 43 deletions(-) delete mode 100644 src/FilterLists.Web/Controllers/SampleDataController.cs diff --git a/src/FilterLists.Web/ClientApp/components/Home.tsx b/src/FilterLists.Web/ClientApp/components/Home.tsx index 1537cad04..5d218c1ff 100644 --- a/src/FilterLists.Web/ClientApp/components/Home.tsx +++ b/src/FilterLists.Web/ClientApp/components/Home.tsx @@ -44,8 +44,13 @@ export class Home extends React.Component, IFilterListsS {filterList.name} {filterList.description} - View - Subscribe + + View + + + Subscribe + )} diff --git a/src/FilterLists.Web/ClientApp/components/NavMenu.tsx b/src/FilterLists.Web/ClientApp/components/NavMenu.tsx index 9c5433002..db2094fac 100644 --- a/src/FilterLists.Web/ClientApp/components/NavMenu.tsx +++ b/src/FilterLists.Web/ClientApp/components/NavMenu.tsx @@ -12,7 +12,7 @@ export class NavMenu extends React.Component<{}, {}> { - FilterLists.Web + FilterLists
@@ -21,6 +21,9 @@ export class NavMenu extends React.Component<{}, {}> { Home + + GitHub +
diff --git a/src/FilterLists.Web/Controllers/SampleDataController.cs b/src/FilterLists.Web/Controllers/SampleDataController.cs deleted file mode 100644 index 24b6de753..000000000 --- a/src/FilterLists.Web/Controllers/SampleDataController.cs +++ /dev/null @@ -1,37 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Microsoft.AspNetCore.Mvc; - -namespace FilterLists.Web.Controllers -{ - [Route("api/[controller]")] - public class SampleDataController : Controller - { - private static readonly string[] Summaries = - { - "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" - }; - - [HttpGet("[action]")] - public IEnumerable WeatherForecasts() - { - var rng = new Random(); - return Enumerable.Range(1, 5).Select(index => new WeatherForecast - { - DateFormatted = DateTime.Now.AddDays(index).ToString("d"), - TemperatureC = rng.Next(-20, 55), - Summary = Summaries[rng.Next(Summaries.Length)] - }); - } - - public class WeatherForecast - { - public string DateFormatted { get; set; } - public int TemperatureC { get; set; } - public string Summary { get; set; } - - public int TemperatureF => 32 + (int) (TemperatureC / 0.5556); - } - } -} \ No newline at end of file diff --git a/src/FilterLists.Web/Views/Home/Index.cshtml b/src/FilterLists.Web/Views/Home/Index.cshtml index 507f3cfa0..076eae0d2 100644 --- a/src/FilterLists.Web/Views/Home/Index.cshtml +++ b/src/FilterLists.Web/Views/Home/Index.cshtml @@ -1,5 +1,5 @@ @{ - ViewData["Title"] = "Home Page"; + ViewData["Title"] = "Home"; }
Loading...
diff --git a/src/FilterLists.Web/Views/Shared/Error.cshtml b/src/FilterLists.Web/Views/Shared/Error.cshtml index 6c38a0b5a..243844945 100644 --- a/src/FilterLists.Web/Views/Shared/Error.cshtml +++ b/src/FilterLists.Web/Views/Shared/Error.cshtml @@ -5,7 +5,7 @@

Error.

An error occurred while processing your request.

-@if (!string.IsNullOrEmpty((string) ViewData["RequestId"])) +@if (!string.IsNullOrEmpty((string)ViewData["RequestId"])) {

Request ID: @ViewData["RequestId"] diff --git a/src/FilterLists.Web/Views/Shared/_Layout.cshtml b/src/FilterLists.Web/Views/Shared/_Layout.cshtml index dd28063af..9c7aa56a3 100644 --- a/src/FilterLists.Web/Views/Shared/_Layout.cshtml +++ b/src/FilterLists.Web/Views/Shared/_Layout.cshtml @@ -3,7 +3,7 @@ - @ViewData["Title"] - FilterLists.Web + @ViewData["Title"] - FilterLists