mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-11-01 08:22:35 +01:00
62 lines
2.6 KiB
C#
62 lines
2.6 KiB
C#
|
using Cassette;
|
||
|
using Cassette.Scripts;
|
||
|
using Cassette.Stylesheets;
|
||
|
|
||
|
namespace NzbDrone.Web
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Configures the Cassette asset bundles for the web application.
|
||
|
/// </summary>
|
||
|
public class CassetteBundleConfiguration : IConfiguration<BundleCollection>
|
||
|
{
|
||
|
public const string JQUERY_BUNDLE = "jquery";
|
||
|
public const string BASE_STYLE = "BASE_STYLE";
|
||
|
public const string BASE_SCRIPT = "BASE_SCRIPT";
|
||
|
public const string FONTS = "FONTS";
|
||
|
public const string VALIDATION_SCRIPTS = "VALIDATION_SCRIPTS";
|
||
|
public const string FILEBROWSER_SCRIPT = "FILEBROWSER_SCRIPT";
|
||
|
public const string FILEBROWSER_STYLE = "FILEBROWSER_STYLE";
|
||
|
|
||
|
public void Configure(BundleCollection bundles)
|
||
|
{
|
||
|
bundles.AddUrlWithAlias<StylesheetBundle>("//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,400,600,300'", FONTS);
|
||
|
bundles.AddUrlWithAlias<ScriptBundle>("//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js", JQUERY_BUNDLE);
|
||
|
|
||
|
|
||
|
bundles.Add<StylesheetBundle>(BASE_STYLE, new[]{
|
||
|
"content2\\Bootstrap\\bootstrap.less",
|
||
|
"content2\\Bootstrap\\responsive.less",
|
||
|
"content2\\bootstrap-metro.css",
|
||
|
"content2\\base.css",
|
||
|
"content2\\bootstrap-overrides.css"},
|
||
|
bundle => bundle.AddReference("/" + FONTS));
|
||
|
|
||
|
bundles.Add<ScriptBundle>(BASE_SCRIPT, new[]{
|
||
|
"scripts2\\jquery.livequery.js",
|
||
|
"scripts2\\bootstrap-mvc.js",
|
||
|
"scripts2\\metro\\jquery.metro.js"},
|
||
|
bundle => bundle.AddReference("/" + JQUERY_BUNDLE));
|
||
|
|
||
|
|
||
|
bundles.Add<StylesheetBundle>(FILEBROWSER_STYLE, new[]{
|
||
|
"content2\\stats.css",
|
||
|
"content2\\file-browser.css",
|
||
|
"content2\\FancyBox\\jquery.fancybox.css"},
|
||
|
bundle => bundle.AddReference("/" + BASE_STYLE));
|
||
|
|
||
|
bundles.Add<ScriptBundle>(FILEBROWSER_SCRIPT, new[]{
|
||
|
"content2\\FancyBox\\jquery.fancybox.js"},
|
||
|
bundle => bundle.AddReference("/" + BASE_SCRIPT));
|
||
|
|
||
|
bundles.Add<ScriptBundle>(VALIDATION_SCRIPTS, new[]{
|
||
|
"scripts2\\jquery.livequery.js",
|
||
|
"scripts2\\jquery.validate.js",
|
||
|
"scripts2\\jquery.validate.unobtrusive.js",
|
||
|
"scripts2\\bootstrap-mvc.js"},
|
||
|
bundle => bundle.AddReference("/" + BASE_SCRIPT));
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|