mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
minor Web tweaks
This commit is contained in:
parent
37a09c86da
commit
27c6abfa62
6 changed files with 14 additions and 43 deletions
|
|
@ -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)}&title=${encodeURIComponent(filterList.name)}`}>Subscribe</a></td>
|
||||
<td>
|
||||
<a href={filterList.viewUrl}>View</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href={`abp:subscribe?location=${encodeURIComponent(filterList.viewUrl)}&title=${
|
||||
encodeURIComponent(filterList.name)}`}>Subscribe</a>
|
||||
</td>
|
||||
</tr>
|
||||
)}
|
||||
</tbody>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
@{
|
||||
ViewData["Title"] = "Home Page";
|
||||
ViewData["Title"] = "Home";
|
||||
}
|
||||
|
||||
<div id="react-app">Loading...</div>
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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"/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue