mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
using pre-compiled handlebar templates
re-did static content from nancy
This commit is contained in:
parent
3720afd30d
commit
375f887539
21 changed files with 367 additions and 124 deletions
21
NzbDrone.Api/Frontend/StaticResourceMapper.cs
Normal file
21
NzbDrone.Api/Frontend/StaticResourceMapper.cs
Normal file
|
@ -0,0 +1,21 @@
|
|||
using System.IO;
|
||||
|
||||
namespace NzbDrone.Api.Frontend
|
||||
{
|
||||
public interface IMapHttpRequestsToDisk
|
||||
{
|
||||
string Map(string resourceUrl);
|
||||
}
|
||||
|
||||
public class StaticResourceMapper : IMapHttpRequestsToDisk
|
||||
{
|
||||
public string Map(string resourceUrl)
|
||||
{
|
||||
var path = resourceUrl.Replace('/', Path.DirectorySeparatorChar);
|
||||
path = path.Trim(Path.DirectorySeparatorChar).ToLower();
|
||||
|
||||
|
||||
return Path.Combine("ui", path);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue