Client-side navigation. For example, click Counter then Back to return here.
-
Webpack dev middleware. In development mode, there's no need to run the webpack build tool. Your client-side resources are dynamically built on demand. Updates are available as soon as you modify any file.
-
Hot module replacement. In development mode, you don't even need to reload the page after making most changes. Within seconds of saving changes to files, rebuilt React components will be injected directly into your running application, preserving its live state.
-
Efficient production builds. In production mode, development-time features are disabled, and the webpack build tool produces minified static CSS and JavaScript files.
-
-
Going further
-
- For larger applications, or for server-side prerendering (i.e., for isomorphic or universal applications), you should consider using a Flux/Redux-like architecture.
- You can generate an ASP.NET Core application with React and Redux using dotnet new reactredux instead of using this template.
-
-
;
- }
+
Hello, world!
+
Welcome to your new single-page application, built with:
Client-side navigation. For example, click Counter then Back to return here.
+
Webpack dev middleware. In development mode, there's no need to run the webpack build tool. Your client-side resources are dynamically built on demand. Updates are available as soon as you modify any file.
+
Hot module replacement. In development mode, you don't even need to reload the page after making most changes. Within seconds of saving changes to files, rebuilt React components will be injected directly into your running application, preserving its live state.
+
Efficient production builds. In production mode, development-time features are disabled, and the webpack build tool produces minified static CSS and JavaScript files.
+
+
Going further
+
+ For larger applications, or for server-side prerendering (i.e., for isomorphic or universal applications), you should consider using a Flux/Redux-like architecture.
+ You can generate an ASP.NET Core application with React and Redux using dotnet new reactredux instead of using this template.
+
+ ;
}
+};
\ No newline at end of file
diff --git a/src/FilterLists.Web/ClientApp/components/Layout.tsx b/src/FilterLists.Web/ClientApp/components/Layout.tsx
index 8c8870e2a..727d732d7 100644
--- a/src/FilterLists.Web/ClientApp/components/Layout.tsx
+++ b/src/FilterLists.Web/ClientApp/components/Layout.tsx
@@ -1,21 +1,21 @@
-import * as React from 'react';
-import { NavMenu } from './NavMenu';
+import * as React from "react";
+import { NavMenu } from "./NavMenu";
export interface LayoutProps {
children?: React.ReactNode;
}
export class Layout extends React.Component {
- public render() {
- return
-
-
-
-
-
- { this.props.children }
-
-
-
;
+ render() {
+ return
+
+
+
+
+
+ { this.props.children }
+
+
+
;
}
-}
+}
\ No newline at end of file
diff --git a/src/FilterLists.Web/ClientApp/components/NavMenu.tsx b/src/FilterLists.Web/ClientApp/components/NavMenu.tsx
index 1c39133c5..c8ab26d62 100644
--- a/src/FilterLists.Web/ClientApp/components/NavMenu.tsx
+++ b/src/FilterLists.Web/ClientApp/components/NavMenu.tsx
@@ -1,40 +1,40 @@
-import * as React from 'react';
-import { Link, NavLink } from 'react-router-dom';
+import * as React from "react";
+import { Link, NavLink } from "react-router-dom";
export class NavMenu extends React.Component<{}, {}> {
- public render() {
- return
-
-
-
- FilterLists.Web
-
-
-
-
-
-
- Home
-
-
-
-
- Counter
-
-
-
-
- Fetch data
-
-
-
-
-
-
;
+ render() {
+ return
+
+
+
+ FilterLists.Web
+
+
+
+
+
+
+ Home
+
+
+
+
+ Counter
+
+
+
+
+ Fetch data
+
+
+
+
+
+
;
}
-}
+}
\ No newline at end of file
diff --git a/src/FilterLists.Web/ClientApp/css/site.css b/src/FilterLists.Web/ClientApp/css/site.css
index 3058af680..56d56353f 100644
--- a/src/FilterLists.Web/ClientApp/css/site.css
+++ b/src/FilterLists.Web/ClientApp/css/site.css
@@ -1,8 +1,7 @@
-.main-nav li .glyphicon {
- margin-right: 10px;
-}
+.main-nav li .glyphicon { margin-right: 10px; }
/* Highlighting rules for nav menu items */
+
.main-nav li a.active,
.main-nav li a.active:hover,
.main-nav li a.active:focus {
@@ -11,19 +10,18 @@
}
/* Keep the nav menu independent of scrolling and on top of other items */
+
.main-nav {
- position: fixed;
- top: 0;
left: 0;
+ position: fixed;
right: 0;
+ top: 0;
z-index: 1;
}
@media (max-width: 767px) {
/* On small screens, the nav menu spans the full width of the screen. Leave a space for it. */
- body {
- padding-top: 50px;
- }
+ body { padding-top: 50px; }
}
@media (min-width: 768px) {
@@ -32,35 +30,40 @@
height: 100%;
width: calc(25% - 20px);
}
+
.main-nav .navbar {
- border-radius: 0px;
- border-width: 0px;
+ -ms-border-radius: 0;
+ border-radius: 0;
+ border-width: 0;
height: 100%;
}
- .main-nav .navbar-header {
- float: none;
- }
+
+ .main-nav .navbar-header { float: none; }
+
.main-nav .navbar-collapse {
border-top: 1px solid #444;
- padding: 0px;
- }
- .main-nav .navbar ul {
- float: none;
+ padding: 0;
}
+
+ .main-nav .navbar ul { float: none; }
+
.main-nav .navbar li {
float: none;
font-size: 15px;
margin: 6px;
}
+
.main-nav .navbar li a {
- padding: 10px 16px;
+ -ms-border-radius: 4px;
border-radius: 4px;
+ padding: 10px 16px;
}
+
.main-nav .navbar a {
- /* If a menu item's text is too long, truncate it */
- width: 100%;
- white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
+ white-space: nowrap;
+ /* If a menu item's text is too long, truncate it */
+ width: 100%;
}
-}
+}
\ No newline at end of file
diff --git a/src/FilterLists.Web/ClientApp/routes.tsx b/src/FilterLists.Web/ClientApp/routes.tsx
index 22fd32e6b..7c4e9e1e4 100644
--- a/src/FilterLists.Web/ClientApp/routes.tsx
+++ b/src/FilterLists.Web/ClientApp/routes.tsx
@@ -1,12 +1,12 @@
-import * as React from 'react';
-import { Route } from 'react-router-dom';
-import { Layout } from './components/Layout';
-import { Home } from './components/Home';
-import { FetchData } from './components/FetchData';
-import { Counter } from './components/Counter';
+import * as React from "react";
+import { Route } from "react-router-dom";
+import { Layout } from "./components/Layout";
+import { Home } from "./components/Home";
+import { FetchData } from "./components/FetchData";
+import { Counter } from "./components/Counter";
export const routes =
-
-
-
-;
+
+
+
+ ;
\ No newline at end of file
diff --git a/src/FilterLists.Web/Controllers/HomeController.cs b/src/FilterLists.Web/Controllers/HomeController.cs
index 07722ef21..24b36aff6 100644
--- a/src/FilterLists.Web/Controllers/HomeController.cs
+++ b/src/FilterLists.Web/Controllers/HomeController.cs
@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
using System.Diagnostics;
-using System.Linq;
-using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace FilterLists.Web.Controllers
@@ -20,4 +16,4 @@ public IActionResult Error()
return View();
}
}
-}
+}
\ No newline at end of file
diff --git a/src/FilterLists.Web/Controllers/SampleDataController.cs b/src/FilterLists.Web/Controllers/SampleDataController.cs
index 615d544ea..24b6de753 100644
--- a/src/FilterLists.Web/Controllers/SampleDataController.cs
+++ b/src/FilterLists.Web/Controllers/SampleDataController.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace FilterLists.Web.Controllers
@@ -9,7 +8,7 @@ namespace FilterLists.Web.Controllers
[Route("api/[controller]")]
public class SampleDataController : Controller
{
- private static string[] Summaries = new[]
+ private static readonly string[] Summaries =
{
"Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
};
@@ -32,13 +31,7 @@ public class WeatherForecast
public int TemperatureC { get; set; }
public string Summary { get; set; }
- public int TemperatureF
- {
- get
- {
- return 32 + (int)(TemperatureC / 0.5556);
- }
- }
+ 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 139ed8ac3..507f3cfa0 100644
--- a/src/FilterLists.Web/Views/Home/Index.cshtml
+++ b/src/FilterLists.Web/Views/Home/Index.cshtml
@@ -6,4 +6,4 @@
@section scripts {
-}
+}
\ No newline at end of file
diff --git a/src/FilterLists.Web/Views/Shared/Error.cshtml b/src/FilterLists.Web/Views/Shared/Error.cshtml
index 78e35d5d3..6c38a0b5a 100644
--- a/src/FilterLists.Web/Views/Shared/Error.cshtml
+++ b/src/FilterLists.Web/Views/Shared/Error.cshtml
@@ -5,7 +5,7 @@
Development environment should not be enabled in deployed applications, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development, and restarting the application.
-
+
\ No newline at end of file
diff --git a/src/FilterLists.Web/Views/Shared/_Layout.cshtml b/src/FilterLists.Web/Views/Shared/_Layout.cshtml
index 26d7cd66f..dd28063af 100644
--- a/src/FilterLists.Web/Views/Shared/_Layout.cshtml
+++ b/src/FilterLists.Web/Views/Shared/_Layout.cshtml
@@ -1,20 +1,20 @@
-
+
-
-
+
+
@ViewData["Title"] - FilterLists.Web
-
+
-
+
-
+
- @RenderBody()
+@RenderBody()
-
- @RenderSection("scripts", required: false)
+
+@RenderSection("scripts", false)
-
+