minor Web tweaks

This commit is contained in:
Collin M. Barrett 2018-02-02 06:34:54 -06:00
parent 37a09c86da
commit 27c6abfa62
6 changed files with 14 additions and 43 deletions

View file

@ -44,8 +44,13 @@ export class Home extends React.Component<RouteComponentProps<{}>, IFilterListsS
<tr key={filterList.id}>
<td>{filterList.name}</td>
<td>{filterList.description}</td>
<td><a href={filterList.viewUrl}>View</a></td>
<td><a href={`abp:subscribe?location=${encodeURIComponent(filterList.viewUrl)}&amp;title=${encodeURIComponent(filterList.name)}`}>Subscribe</a></td>
<td>
<a href={filterList.viewUrl}>View</a>
</td>
<td>
<a href={`abp:subscribe?location=${encodeURIComponent(filterList.viewUrl)}&amp;title=${
encodeURIComponent(filterList.name)}`}>Subscribe</a>
</td>
</tr>
)}
</tbody>

View file

@ -12,7 +12,7 @@ export class NavMenu extends React.Component<{}, {}> {
<span className="icon-bar"></span>
<span className="icon-bar"></span>
</button>
<Link className="navbar-brand" to={ "/" }>FilterLists.Web</Link>
<Link className="navbar-brand" to={ "/" }>FilterLists</Link>
</div>
<div className="clearfix"></div>
<div className="navbar-collapse collapse">
@ -21,6 +21,9 @@ export class NavMenu extends React.Component<{}, {}> {
<NavLink to={ "/" } exact activeClassName="active">
<span className="glyphicon glyphicon-home"></span> Home
</NavLink>
<NavLink to="https://github.com/collinbarrett/FilterLists" exact activeClassName="active">
<span className="glyphicon glyphicon-github"></span> GitHub
</NavLink>
</li>
</ul>
</div>

View file

@ -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<WeatherForecast> 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);
}
}
}

View file

@ -1,5 +1,5 @@
@{
ViewData["Title"] = "Home Page";
ViewData["Title"] = "Home";
}
<div id="react-app">Loading...</div>

View file

@ -5,7 +5,7 @@
<h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2>
@if (!string.IsNullOrEmpty((string) ViewData["RequestId"]))
@if (!string.IsNullOrEmpty((string)ViewData["RequestId"]))
{
<p>
<strong>Request ID:</strong> <code>@ViewData["RequestId"]</code>

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>@ViewData["Title"] - FilterLists.Web</title>
<title>@ViewData["Title"] - FilterLists</title>
<base href="~/"/>
<link rel="stylesheet" href="~/dist/vendor.css" asp-append-version="true"/>