using pre-compiled handlebar templates

re-did static content from nancy
This commit is contained in:
kay.one 2013-03-29 16:00:38 -07:00
parent 3720afd30d
commit 375f887539
21 changed files with 367 additions and 124 deletions

View file

@ -1,30 +0,0 @@
using System;
using System.Linq;
using Nancy;
using Nancy.Responses.Negotiation;
namespace NzbDrone.Api.FrontendModule
{
public class IndexModule : NancyModule
{
public IndexModule()
{
//Serve anything that doesn't have an extension
Get[@"/(.*)"] = x => Index();
}
private object Index()
{
if(
Request.Path.Contains(".")
|| Request.Path.StartsWith("/static", StringComparison.CurrentCultureIgnoreCase)
|| Request.Path.StartsWith("/api", StringComparison.CurrentCultureIgnoreCase))
{
return new NotFoundResponse();
}
return View["UI/index.html"];
}
}
}