Changed method of routing so that on dev, you use the sub param instead of an additional directory.tags/2.0.3
@@ -1,4 +1,5 @@ | |||
using System.IO; | |||
using System.Collections.Generic; | |||
using System.IO; | |||
using System.Linq; | |||
using System.Web; | |||
using System.Web.Mvc; | |||
@@ -8,29 +9,29 @@ namespace Teknik | |||
{ | |||
public class SubdomainRoute : Route | |||
{ | |||
public string Subdomain { get; set; } | |||
public List<string> Subdomains { get; set; } | |||
public SubdomainRoute(string subdomain, string url, IRouteHandler handler) | |||
public SubdomainRoute(List<string> subdomains, string url, IRouteHandler handler) | |||
: base(url, handler) | |||
{ | |||
this.Subdomain = subdomain; | |||
this.Subdomains = subdomains; | |||
} | |||
public SubdomainRoute(string subdomain, string url, RouteValueDictionary defaults, IRouteHandler handler) | |||
public SubdomainRoute(List<string> subdomains, string url, RouteValueDictionary defaults, IRouteHandler handler) | |||
: base(url, defaults, handler) | |||
{ | |||
this.Subdomain = subdomain; | |||
this.Subdomains = subdomains; | |||
} | |||
public SubdomainRoute(string subdomain, string url, RouteValueDictionary defaults, RouteValueDictionary constraints, IRouteHandler handler) | |||
public SubdomainRoute(List<string> subdomains, string url, RouteValueDictionary defaults, RouteValueDictionary constraints, IRouteHandler handler) | |||
: base(url, defaults, constraints, handler) | |||
{ | |||
this.Subdomain = subdomain; | |||
this.Subdomains = subdomains; | |||
} | |||
public SubdomainRoute(string subdomain, string url, RouteValueDictionary defaults, RouteValueDictionary constraints, RouteValueDictionary dataTokens, IRouteHandler handler) | |||
public SubdomainRoute(List<string> subdomains, string url, RouteValueDictionary defaults, RouteValueDictionary constraints, RouteValueDictionary dataTokens, IRouteHandler handler) | |||
: base(url, defaults, constraints, dataTokens, handler) | |||
{ | |||
this.Subdomain = subdomain; | |||
this.Subdomains = subdomains; | |||
} | |||
public override RouteData GetRouteData(HttpContextBase httpContext) | |||
@@ -38,10 +39,22 @@ namespace Teknik | |||
var routeData = base.GetRouteData(httpContext); | |||
if (routeData == null) return null; // Only look at the subdomain if this route matches in the first place. | |||
string subdomain = httpContext.Request.QueryString["sub"]; // A subdomain specified as a query parameter takes precedence over the hostname. | |||
string host = httpContext.Request.Headers["Host"]; | |||
string curSub = host.GetSubdomain(); | |||
// special consideration for 'dev' subdomain | |||
if (subdomain == null || subdomain == "dev") | |||
{ | |||
if (!string.IsNullOrEmpty(curSub) && curSub == "dev") | |||
{ | |||
// if we are on dev, and the param is dev or empty, we need to initialize it to 'www' | |||
subdomain = "www"; | |||
} | |||
} | |||
if (subdomain == null) | |||
{ | |||
string host = httpContext.Request.Headers["Host"]; | |||
subdomain = host.GetSubdomain(); | |||
subdomain = curSub; | |||
} | |||
else | |||
{ | |||
@@ -56,7 +69,7 @@ namespace Teknik | |||
} | |||
//routeData.Values["sub"] = subdomain; | |||
if (Subdomain == "*" || Subdomain == subdomain) | |||
if (Subdomains.Contains("*") || Subdomains.Contains(subdomain)) | |||
{ | |||
return routeData; | |||
} |
@@ -1,140 +1,130 @@ | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Web.Mvc; | |||
using System.Web.Routing; | |||
namespace Teknik | |||
{ | |||
public static class SubdomainRouteExtension | |||
{ | |||
public static SubdomainRoute MapSubdomainRoute(this RouteCollection routes, string name, string subDomain, string url, object defaults) | |||
public static SubdomainRoute MapSubdomainRoute(this RouteCollection routes, string name, List<string> subDomains, string url, object defaults) | |||
{ | |||
SubdomainRoute route = new SubdomainRoute( | |||
subDomain, | |||
subDomains, | |||
url, | |||
new RouteValueDictionary(defaults), | |||
new MvcRouteHandler()); | |||
routes.Add(AddSubToName(subDomain, name), route); | |||
routes.Add(name, route); | |||
return route; | |||
} | |||
public static SubdomainRoute MapSubdomainRoute(this RouteCollection routes, string name, string subDomain, string url, object defaults, object constraints) | |||
public static SubdomainRoute MapSubdomainRoute(this RouteCollection routes, string name, List<string> subDomains, string url, object defaults, object constraints) | |||
{ | |||
SubdomainRoute route = new SubdomainRoute( | |||
subDomain, | |||
subDomains, | |||
url, | |||
new RouteValueDictionary(defaults), | |||
new RouteValueDictionary(constraints), | |||
new MvcRouteHandler()); | |||
routes.Add(AddSubToName(subDomain, name), route); | |||
routes.Add(name, route); | |||
return route; | |||
} | |||
public static SubdomainRoute MapSubdomainRoute(this RouteCollection routes, string name, string subDomain, string area, string url, object defaults, string[] namespaces) | |||
public static SubdomainRoute MapSubdomainRoute(this RouteCollection routes, string name, List<string> subDomains, string area, string url, object defaults, string[] namespaces) | |||
{ | |||
SubdomainRoute route = new SubdomainRoute( | |||
subDomain, | |||
subDomains, | |||
url, | |||
new RouteValueDictionary(defaults), | |||
new RouteValueDictionary(new { }), | |||
new RouteValueDictionary(new { Area = area, Namespaces = namespaces }), | |||
new MvcRouteHandler()); | |||
routes.Add(AddSubToName(subDomain, name), route); | |||
routes.Add(name, route); | |||
return route; | |||
} | |||
public static SubdomainRoute MapSubdomainRoute(this AreaRegistrationContext context, string name, string subDomain, string url, object defaults) | |||
public static SubdomainRoute MapSubdomainRoute(this AreaRegistrationContext context, string name, List<string> subDomains, string url, object defaults) | |||
{ | |||
SubdomainRoute route = new SubdomainRoute( | |||
subDomain, | |||
subDomains, | |||
url, | |||
new RouteValueDictionary(defaults), | |||
new RouteValueDictionary(new {}), | |||
new RouteValueDictionary(new {Area = context.AreaName}), | |||
new MvcRouteHandler()); | |||
context.Routes.Add(AddSubToName(subDomain, name), route); | |||
context.Routes.Add(name, route); | |||
return route; | |||
} | |||
public static SubdomainRoute MapSubdomainRoute(this AreaRegistrationContext context, string name, string subDomain, string url, object defaults, object constraints) | |||
public static SubdomainRoute MapSubdomainRoute(this AreaRegistrationContext context, string name, List<string> subDomains, string url, object defaults, object constraints) | |||
{ | |||
SubdomainRoute route = new SubdomainRoute( | |||
subDomain, | |||
subDomains, | |||
url, | |||
new RouteValueDictionary(defaults), | |||
new RouteValueDictionary(constraints), | |||
new RouteValueDictionary(new {Area = context.AreaName}), | |||
new MvcRouteHandler()); | |||
context.Routes.Add(AddSubToName(subDomain, name), route); | |||
context.Routes.Add(name, route); | |||
return route; | |||
} | |||
public static SubdomainRoute MapSubdomainRoute(this AreaRegistrationContext context, string name, string subDomain, string url, object defaults, string[] namespaces) | |||
public static SubdomainRoute MapSubdomainRoute(this AreaRegistrationContext context, string name, List<string> subDomains, string url, object defaults, string[] namespaces) | |||
{ | |||
SubdomainRoute route = new SubdomainRoute( | |||
subDomain, | |||
subDomains, | |||
url, | |||
new RouteValueDictionary(defaults), | |||
new RouteValueDictionary(new {}), | |||
new RouteValueDictionary(new { Area = context.AreaName, Namespaces = namespaces }), | |||
new MvcRouteHandler()); | |||
context.Routes.Add(AddSubToName(subDomain, name), route); | |||
context.Routes.Add(name, route); | |||
return route; | |||
} | |||
public static SubdomainRoute MapSubdomainRoute(this AreaRegistrationContext context, string name, string subDomain, string url, string area, object defaults) | |||
public static SubdomainRoute MapSubdomainRoute(this AreaRegistrationContext context, string name, List<string> subDomains, string url, string area, object defaults) | |||
{ | |||
SubdomainRoute route = new SubdomainRoute( | |||
subDomain, | |||
subDomains, | |||
url, | |||
new RouteValueDictionary(defaults), | |||
new RouteValueDictionary(new { }), | |||
new RouteValueDictionary(new { Area = area }), | |||
new MvcRouteHandler()); | |||
context.Routes.Add(AddSubToName(subDomain, name), route); | |||
context.Routes.Add(name, route); | |||
return route; | |||
} | |||
public static SubdomainRoute MapSubdomainRoute(this AreaRegistrationContext context, string name, string subDomain, string url, string area, object defaults, object constraints) | |||
public static SubdomainRoute MapSubdomainRoute(this AreaRegistrationContext context, string name, List<string> subDomains, string url, string area, object defaults, object constraints) | |||
{ | |||
SubdomainRoute route = new SubdomainRoute( | |||
subDomain, | |||
subDomains, | |||
url, | |||
new RouteValueDictionary(defaults), | |||
new RouteValueDictionary(constraints), | |||
new RouteValueDictionary(new { Area = area }), | |||
new MvcRouteHandler()); | |||
context.Routes.Add(AddSubToName(subDomain, name), route); | |||
context.Routes.Add(name, route); | |||
return route; | |||
} | |||
public static SubdomainRoute MapSubdomainRoute(this AreaRegistrationContext context, string name, string subDomain, string url, string area, object defaults, string[] namespaces) | |||
public static SubdomainRoute MapSubdomainRoute(this AreaRegistrationContext context, string name, List<string> subDomains, string url, string area, object defaults, string[] namespaces) | |||
{ | |||
SubdomainRoute route = new SubdomainRoute( | |||
subDomain, | |||
subDomains, | |||
url, | |||
new RouteValueDictionary(defaults), | |||
new RouteValueDictionary(new { }), | |||
new RouteValueDictionary(new { Area = area, Namespaces = namespaces }), | |||
new MvcRouteHandler()); | |||
context.Routes.Add(AddSubToName(subDomain, name), route); | |||
context.Routes.Add(name, route); | |||
return route; | |||
} | |||
private static string AddSubToName(string sub, string name) | |||
{ | |||
string newName = name; | |||
if (!string.IsNullOrEmpty(sub)) | |||
{ | |||
newName = sub + "." + name; | |||
} | |||
return newName; | |||
} | |||
} | |||
} |
@@ -1,4 +1,5 @@ | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Web.Mvc; | |||
namespace Teknik.Areas.API | |||
{ | |||
@@ -17,30 +18,16 @@ namespace Teknik.Areas.API | |||
#region API v1 | |||
// Base Routing | |||
context.MapSubdomainRoute( | |||
"APIv1.Index", // Route name | |||
"dev", | |||
"API/v1", // URL with parameters | |||
new { controller = "APIv1", action = "Index" }, // Parameter defaults | |||
new[] { typeof(Controllers.APIv1Controller).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"APIv1.Index", // Route name | |||
"api", | |||
"API.v1.Index", // Route name | |||
new List<string>() { "dev", "api" }, | |||
"v1", // URL with parameters | |||
new { controller = "APIv1", action = "Index" }, // Parameter defaults | |||
new[] { typeof(Controllers.APIv1Controller).Namespace } | |||
); | |||
// Uploads | |||
context.MapSubdomainRoute( | |||
"APIv1.Upload", // Route name | |||
"dev", | |||
"API/v1/Upload", // URL with parameters | |||
new { controller = "APIv1", action = "Upload" }, // Parameter defaults | |||
new[] { typeof(Controllers.APIv1Controller).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"APIv1.Upload", // Route name | |||
"api", | |||
"API.v1.Upload", // Route name | |||
new List<string>() { "dev", "api" }, | |||
"v1/Upload", // URL with parameters | |||
new { controller = "APIv1", action = "Upload" }, // Parameter defaults | |||
new[] { typeof(Controllers.APIv1Controller).Namespace } | |||
@@ -50,14 +37,7 @@ namespace Teknik.Areas.API | |||
// Default Routing | |||
context.MapSubdomainRoute( | |||
"API.Index", // Route name | |||
"dev", | |||
"API", // URL with parameters | |||
new { controller = "API", action = "Index" }, // Parameter defaults | |||
new[] { typeof(Controllers.APIController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"API.Index", // Route name | |||
"api", | |||
new List<string>() { "dev", "" }, | |||
"", // URL with parameters | |||
new { controller = "API", action = "Index" }, // Parameter defaults | |||
new[] { typeof(Controllers.APIController).Namespace } |
@@ -1,4 +1,5 @@ | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Web.Mvc; | |||
namespace Teknik.Areas.About | |||
{ | |||
@@ -16,14 +17,7 @@ namespace Teknik.Areas.About | |||
{ | |||
context.MapSubdomainRoute( | |||
"About.Index", // Route name | |||
"dev", | |||
"About", // URL with parameters | |||
new { controller = "About", action = "Index" }, // Parameter defaults | |||
new[] { typeof(Controllers.AboutController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"About.Index", // Route name | |||
"about", | |||
new List<string>() { "dev", "about" }, | |||
"", // URL with parameters | |||
new { controller = "About", action = "Index" }, // Parameter defaults | |||
new[] { typeof(Controllers.AboutController).Namespace } |
@@ -1,4 +1,5 @@ | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Web.Mvc; | |||
using System.Web.Optimization; | |||
namespace Teknik.Areas.Blog | |||
@@ -17,42 +18,21 @@ namespace Teknik.Areas.Blog | |||
{ | |||
context.MapSubdomainRoute( | |||
"Blog.Blog", // Route name | |||
"dev", | |||
"Blog/{username}", // URL with parameters | |||
new { controller = "Blog", action = "Blog", username = string.Empty }, // Parameter defaults | |||
new[] { typeof(Controllers.BlogController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Blog.Post", // Route name | |||
"dev", | |||
"Blog/{username}/{id}", // URL with parameters | |||
new { controller = "Blog", action = "Post", username = "", id = 0 }, // Parameter defaults | |||
new[] { typeof(Controllers.BlogController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Blog.Action", // Route name | |||
"dev", | |||
"Blog/Action/{controller}/{action}", // URL with parameters | |||
new { controller = "Blog", action = "Blog" }, // Parameter defaults | |||
new[] { typeof(Controllers.BlogController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Blog.Blog", // Route name | |||
"blog", | |||
new List<string>() { "dev", "blog" }, // Subdomains | |||
"{username}", // URL with parameters | |||
new { controller = "Blog", action = "Blog", username = string.Empty }, // Parameter defaults | |||
new[] { typeof(Controllers.BlogController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Blog.Post", // Route name | |||
"blog", | |||
new List<string>() { "dev", "blog" }, // Subdomains | |||
"{username}/{id}", // URL with parameters | |||
new { controller = "Blog", action = "Post", username = "", id = 0 }, // Parameter defaults | |||
new[] { typeof(Controllers.BlogController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Blog.Action", // Route name | |||
"blog", | |||
new List<string>() { "dev", "blog" }, // Subdomains | |||
"Action/{controller}/{action}", // URL with parameters | |||
new { controller = "Blog", action = "Blog" }, // Parameter defaults | |||
new[] { typeof(Controllers.BlogController).Namespace } |
@@ -1,4 +1,5 @@ | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Web.Mvc; | |||
using System.Web.Optimization; | |||
namespace Teknik.Areas.Contact | |||
@@ -17,28 +18,14 @@ namespace Teknik.Areas.Contact | |||
{ | |||
context.MapSubdomainRoute( | |||
"Contact.Index", // Route name | |||
"dev", | |||
"Contact/", // URL with parameters | |||
new { controller = "Contact", action = "Index" }, // Parameter defaults | |||
new[] { typeof(Controllers.ContactController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Contact.Action", // Route name | |||
"dev", | |||
"Contact/{action}", // URL with parameters | |||
new { controller = "Contact", action = "Index" }, // Parameter defaults | |||
new[] { typeof(Controllers.ContactController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Contact.Index", // Route name | |||
"contact", | |||
new List<string>() { "dev", "contact" }, // Subdomains | |||
"", // URL with parameters | |||
new { controller = "Contact", action = "Index" }, // Parameter defaults | |||
new[] { typeof(Controllers.ContactController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Contact.Action", // Route name | |||
"contact", | |||
new List<string>() { "dev", "contact" }, // Subdomains | |||
"{action}", // URL with parameters | |||
new { controller = "Contact", action = "Index" }, // Parameter defaults | |||
new[] { typeof(Controllers.ContactController).Namespace } |
@@ -13,8 +13,7 @@ namespace Teknik.Areas.Dev.Controllers | |||
// GET: Dev | |||
public ActionResult Index() | |||
{ | |||
ViewBag.Title = Config.Title + " - Development"; | |||
return View("~/Areas/Dev/Views/Dev/Index.cshtml"); | |||
return Redirect(Url.SubRouteUrl("www", "Home.Index")); | |||
} | |||
} | |||
} |
@@ -1,4 +1,5 @@ | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Web.Mvc; | |||
using Teknik.Areas.Home.Controllers; | |||
namespace Teknik.Areas.Dev | |||
@@ -17,8 +18,8 @@ namespace Teknik.Areas.Dev | |||
{ | |||
context.MapSubdomainRoute( | |||
"Dev.Index", // Route name | |||
"dev", | |||
"Dev/{controller}/{action}", // URL with parameters | |||
new List<string>() { "dev" }, // Subdomains | |||
"", // URL with parameters | |||
new { controller = "Dev", action = "Index" }, // Parameter defaults | |||
new[] { typeof(Controllers.DevController).Namespace } | |||
); |
@@ -1,4 +1,5 @@ | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Web.Mvc; | |||
namespace Teknik.Areas.Error | |||
{ | |||
@@ -16,7 +17,7 @@ namespace Teknik.Areas.Error | |||
{ | |||
context.MapSubdomainRoute( | |||
"Error.Http404", // Route name | |||
"*", | |||
new List<string>() { "*" }, // Subdomains | |||
"Error/404", // URL with parameters | |||
new { controller = "Error", action = "Http404" }, // Parameter defaults | |||
new[] { typeof(Controllers.ErrorController).Namespace } |
@@ -1,4 +1,5 @@ | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Web.Mvc; | |||
using System.Web.Optimization; | |||
namespace Teknik.Areas.Help | |||
@@ -17,112 +18,56 @@ namespace Teknik.Areas.Help | |||
{ | |||
context.MapSubdomainRoute( | |||
"Help.Index", // Route name | |||
"dev", | |||
"Help", // URL with parameters | |||
new { controller = "Help", action = "Index" }, // Parameter defaults | |||
new[] { typeof(Controllers.HelpController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Help.API", // Route name | |||
"dev", | |||
"Help/API/{version}/{service}", // URL with parameters | |||
new { controller = "Help", action = "API", version = UrlParameter.Optional, service = UrlParameter.Optional }, // Parameter defaults | |||
new[] { typeof(Controllers.HelpController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Help.Blog", // Route name | |||
"dev", | |||
"Help/Blog", // URL with parameters | |||
new { controller = "Help", action = "Blog" }, // Parameter defaults | |||
new[] { typeof(Controllers.HelpController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Help.Git", // Route name | |||
"dev", | |||
"Help/Git", // URL with parameters | |||
new { controller = "Help", action = "Git" }, // Parameter defaults | |||
new[] { typeof(Controllers.HelpController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Help.IRC", // Route name | |||
"dev", | |||
"Help/IRC", // URL with parameters | |||
new { controller = "Help", action = "IRC" }, // Parameter defaults | |||
new[] { typeof(Controllers.HelpController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Help.Mail", // Route name | |||
"dev", | |||
"Help/Mail", // URL with parameters | |||
new { controller = "Help", action = "Mail" }, // Parameter defaults | |||
new[] { typeof(Controllers.HelpController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Help.Mumble", // Route name | |||
"dev", | |||
"Help/Mumble", // URL with parameters | |||
new { controller = "Help", action = "Mumble" }, // Parameter defaults | |||
new[] { typeof(Controllers.HelpController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Help.Upload", // Route name | |||
"dev", | |||
"Help/Upload", // URL with parameters | |||
new { controller = "Help", action = "Upload" }, // Parameter defaults | |||
new[] { typeof(Controllers.HelpController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Help.Index", // Route name | |||
"help", | |||
new List<string>() { "dev", "help" }, // Subdomains | |||
"", // URL with parameters | |||
new { controller = "Help", action = "Index" }, // Parameter defaults | |||
new[] { typeof(Controllers.HelpController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Help.API", // Route name | |||
"help", | |||
new List<string>() { "dev", "help" }, // Subdomains | |||
"API/{version}/{service}", // URL with parameters | |||
new { controller = "Help", action = "API", version = UrlParameter.Optional, service = UrlParameter.Optional }, // Parameter defaults | |||
new[] { typeof(Controllers.HelpController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Help.Blog", // Route name | |||
"help", | |||
new List<string>() { "dev", "help" }, // Subdomains | |||
"Blog", // URL with parameters | |||
new { controller = "Help", action = "Blog" }, // Parameter defaults | |||
new[] { typeof(Controllers.HelpController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Help.Git", // Route name | |||
"help", | |||
new List<string>() { "dev", "help" }, // Subdomains | |||
"Git", // URL with parameters | |||
new { controller = "Help", action = "Git" }, // Parameter defaults | |||
new[] { typeof(Controllers.HelpController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Help.IRC", // Route name | |||
"help", | |||
new List<string>() { "dev", "help" }, // Subdomains | |||
"IRC", // URL with parameters | |||
new { controller = "Help", action = "IRC" }, // Parameter defaults | |||
new[] { typeof(Controllers.HelpController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Help.Mail", // Route name | |||
"help", | |||
new List<string>() { "dev", "help" }, // Subdomains | |||
"Mail", // URL with parameters | |||
new { controller = "Help", action = "Mail" }, // Parameter defaults | |||
new[] { typeof(Controllers.HelpController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Help.Mumble", // Route name | |||
"help", | |||
new List<string>() { "dev", "help" }, // Subdomains | |||
"Mumble", // URL with parameters | |||
new { controller = "Help", action = "Mumble" }, // Parameter defaults | |||
new[] { typeof(Controllers.HelpController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Help.Upload", // Route name | |||
"help", | |||
new List<string>() { "dev", "help" }, // Subdomains | |||
"Upload", // URL with parameters | |||
new { controller = "Help", action = "Upload" }, // Parameter defaults | |||
new[] { typeof(Controllers.HelpController).Namespace } |
@@ -8,7 +8,7 @@ | |||
<hr> | |||
<p>This is a description of the API commands available for the Upload service.</p> | |||
<h3>Upload a File</h3> | |||
<pre><code>POST @Url.SubRouteUrl("api", "APIv1.Upload")</code></pre> | |||
<pre><code>POST @Url.SubRouteUrl("api", "API.v1.Upload")</code></pre> | |||
<h4>Parameters</h4> | |||
<table> | |||
<thead> | |||
@@ -265,7 +265,7 @@ | |||
</tbody> | |||
</table> | |||
<h4>Example</h4> | |||
<pre><code>$ curl -F "genDeletionKey=true" -F "encrypt=true" -F "file=@("@")image.png" @Url.SubRouteUrl("api", "APIv1.Upload")</code></pre> | |||
<pre><code>$ curl -F "genDeletionKey=true" -F "encrypt=true" -F "file=@("@")image.png" @Url.SubRouteUrl("api", "API.v1.Upload")</code></pre> | |||
<p> | |||
This will upload the file <var>image.png</var>, encrypt it, and then generate a deletion key. | |||
</p> |
@@ -1,4 +1,5 @@ | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Web.Mvc; | |||
using System.Web.Optimization; | |||
using Teknik; | |||
@@ -18,28 +19,7 @@ namespace Teknik.Areas.Home | |||
{ | |||
context.MapSubdomainRoute( | |||
"Home.Index", // Route name | |||
"dev", | |||
"Home", // URL with parameters | |||
new { controller = "Home", action = "Index" }, // Parameter defaults | |||
new[] { typeof(Controllers.HomeController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Home.Default", // Route name | |||
"dev", | |||
"", // URL with parameters | |||
new { controller = "Home", action = "Index" }, // Parameter defaults | |||
new[] { typeof(Controllers.HomeController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Home.Index", // Route name | |||
"www", | |||
"", // URL with parameters | |||
new { controller = "Home", action = "Index" }, // Parameter defaults | |||
new[] { typeof(Controllers.HomeController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Home.Index", // Route name | |||
string.Empty, | |||
new List<string>() { "dev", "www", string.Empty }, // Subdomains | |||
"", // URL with parameters | |||
new { controller = "Home", action = "Index" }, // Parameter defaults | |||
new[] { typeof(Controllers.HomeController).Namespace } |
@@ -0,0 +1,18 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Web; | |||
using System.Web.Mvc; | |||
using Teknik.Controllers; | |||
namespace Teknik.Areas.Paste.Controllers | |||
{ | |||
public class PasteController : DefaultController | |||
{ | |||
// GET: Paste/Paste | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
} | |||
} |
@@ -0,0 +1,13 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
namespace Teknik.Areas.Paste.Models | |||
{ | |||
public class Paste | |||
{ | |||
} | |||
} |
@@ -0,0 +1,56 @@ | |||
using System.Collections.Generic; | |||
using System.Web.Mvc; | |||
using System.Web.Optimization; | |||
namespace Teknik.Areas.Paste | |||
{ | |||
public class PasteAreaRegistration : AreaRegistration | |||
{ | |||
public override string AreaName | |||
{ | |||
get | |||
{ | |||
return "Paste"; | |||
} | |||
} | |||
public override void RegisterArea(AreaRegistrationContext context) | |||
{ | |||
context.MapSubdomainRoute( | |||
"Paste.Index", // Route name | |||
new List<string>() { "dev", "paste", "p" }, | |||
"", // URL with parameters | |||
new { controller = "Paste", action = "Index" }, // Parameter defaults | |||
new[] { typeof(Controllers.PasteController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Paste.View", // Route name | |||
new List<string>() { "dev", "paste", "p" }, | |||
"{id}", // URL with parameters | |||
new { controller = "Paste", action = "View" }, // Parameter defaults | |||
new[] { typeof(Controllers.PasteController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Paste.Simple", // Route name | |||
new List<string>() { "dev", "paste", "p" }, | |||
"Simple/{id}", // URL with parameters | |||
new { controller = "Paste", action = "Simple" }, // Parameter defaults | |||
new[] { typeof(Controllers.PasteController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Paste.Raw", // Route name | |||
new List<string>() { "dev", "paste", "p" }, | |||
"Raw/{id}", // URL with parameters | |||
new { controller = "Paste", action = "Raw" }, // Parameter defaults | |||
new[] { typeof(Controllers.PasteController).Namespace } | |||
); | |||
// Register Script Bundles | |||
BundleTable.Bundles.Add(new ScriptBundle("~/bundles/paste").Include( | |||
"~/Scripts/Highlight/highlight.pack.js")); | |||
// Register Style Bundles | |||
BundleTable.Bundles.Add(new StyleBundle("~/Content/paste").Include( | |||
"~/Content/Highlight/default.css")); | |||
} | |||
} | |||
} |
@@ -0,0 +1,13 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using Teknik.ViewModels; | |||
namespace Teknik.Areas.Paste.ViewModels | |||
{ | |||
public class PasteViewModel : ViewModelBase | |||
{ | |||
} | |||
} |
@@ -0,0 +1,4 @@ | |||
@model Teknik.Areas.Paste.ViewModels.PasteViewModel | |||
@Styles.Render("~/Content/paste"); | |||
@Scripts.Render("~/bundles/paste"); |
@@ -0,0 +1,3 @@ | |||
@{ | |||
Layout = "~/Views/Shared/_Layout.cshtml"; | |||
} |
@@ -0,0 +1,36 @@ | |||
<?xml version="1.0"?> | |||
<configuration> | |||
<configSections> | |||
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> | |||
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> | |||
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" /> | |||
</sectionGroup> | |||
</configSections> | |||
<system.web.webPages.razor> | |||
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | |||
<pages pageBaseType="System.Web.Mvc.WebViewPage"> | |||
<namespaces> | |||
<add namespace="System.Web.Mvc" /> | |||
<add namespace="System.Web.Mvc.Ajax" /> | |||
<add namespace="System.Web.Mvc.Html" /> | |||
<add namespace="System.Web.Routing" /> | |||
<add namespace="System.Web.Optimization" /> | |||
<add namespace="Teknik" /> | |||
</namespaces> | |||
</pages> | |||
</system.web.webPages.razor> | |||
<appSettings> | |||
<add key="webpages:Enabled" value="false" /> | |||
</appSettings> | |||
<system.webServer> | |||
<handlers> | |||
<remove name="BlockViewHandler"/> | |||
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" /> | |||
</handlers> | |||
</system.webServer> | |||
</configuration> |
@@ -1,4 +1,5 @@ | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Web.Mvc; | |||
namespace Teknik.Areas.Privacy | |||
{ | |||
@@ -16,14 +17,7 @@ namespace Teknik.Areas.Privacy | |||
{ | |||
context.MapSubdomainRoute( | |||
"Privacy.Index", // Route name | |||
"dev", | |||
"Privacy", // URL with parameters | |||
new { controller = "Privacy", action = "Index" }, // Parameter defaults | |||
new[] { typeof(Controllers.PrivacyController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Privacy.Index", // Route name | |||
"privacy", | |||
new List<string>() { "dev", "privacy" }, // Subdomains | |||
"", // URL with parameters | |||
new { controller = "Privacy", action = "Index" }, // Parameter defaults | |||
new[] { typeof(Controllers.PrivacyController).Namespace } |
@@ -1,4 +1,5 @@ | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Web.Mvc; | |||
using System.Web.Optimization; | |||
namespace Teknik.Areas.Profile | |||
@@ -17,70 +18,35 @@ namespace Teknik.Areas.Profile | |||
{ | |||
context.MapSubdomainRoute( | |||
"Profile.Login", // Route name | |||
"dev", | |||
"Profile/Login", // URL with parameters | |||
new { controller = "Profile", action = "Login" }, // Parameter defaults | |||
new[] { typeof(Controllers.ProfileController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Profile.Logout", // Route name | |||
"dev", | |||
"Profile/Logout", // URL with parameters | |||
new { controller = "Profile", action = "Logout" }, // Parameter defaults | |||
new[] { typeof(Controllers.ProfileController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Profile.Register", // Route name | |||
"dev", | |||
"Profile/Register", // URL with parameters | |||
new { controller = "Profile", action = "Register" }, // Parameter defaults | |||
new[] { typeof(Controllers.ProfileController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Profile.Index", // Route name | |||
"dev", | |||
"Profile/{username}", // URL with parameters | |||
new { controller = "Profile", action = "Index", username = UrlParameter.Optional }, // Parameter defaults | |||
new[] { typeof(Controllers.ProfileController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Profile.Action", // Route name | |||
"dev", | |||
"Profile/Action/{action}", // URL with parameters | |||
new { controller = "Profile", action = "Index" }, // Parameter defaults | |||
new[] { typeof(Controllers.ProfileController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Profile.Login", // Route name | |||
"profile", | |||
new List<string>() { "dev", "profile" }, // Subdomains | |||
"Login", // URL with parameters | |||
new { controller = "Profile", action = "Login" }, // Parameter defaults | |||
new[] { typeof(Controllers.ProfileController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Profile.Logout", // Route name | |||
"profile", | |||
new List<string>() { "dev", "profile" }, // Subdomains | |||
"Logout", // URL with parameters | |||
new { controller = "Profile", action = "Logout" }, // Parameter defaults | |||
new[] { typeof(Controllers.ProfileController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Profile.Register", // Route name | |||
"profile", | |||
new List<string>() { "dev", "profile" }, // Subdomains | |||
"Register", // URL with parameters | |||
new { controller = "Profile", action = "Register" }, // Parameter defaults | |||
new[] { typeof(Controllers.ProfileController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Profile.Index", // Route name | |||
"profile", | |||
new List<string>() { "dev", "profile" }, // Subdomains | |||
"{username}", // URL with parameters | |||
new { controller = "Profile", action = "Index", username = UrlParameter.Optional }, // Parameter defaults | |||
new[] { typeof(Controllers.ProfileController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Profile.Action", // Route name | |||
"profile", | |||
new List<string>() { "dev", "profile" }, // Subdomains | |||
"Action/{action}", // URL with parameters | |||
new { controller = "Profile", action = "Index" }, // Parameter defaults | |||
new[] { typeof(Controllers.ProfileController).Namespace } |
@@ -1,4 +1,5 @@ | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using System.Web.Mvc; | |||
using System.Web.Optimization; | |||
namespace Teknik.Areas.Upload | |||
@@ -17,84 +18,28 @@ namespace Teknik.Areas.Upload | |||
{ | |||
context.MapSubdomainRoute( | |||
"Upload.Index", | |||
"dev", | |||
"Upload", | |||
new { controller = "Upload", action = "Index" }, | |||
new[] { typeof(Controllers.UploadController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Upload.Download", | |||
"dev", | |||
"Upload/{file}", | |||
new { controller = "Upload", action = "Download", file = string.Empty }, | |||
new[] { typeof(Controllers.UploadController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Upload.Delete", | |||
"dev", | |||
"Upload/{file}/{key}", | |||
new { controller = "Upload", action = "Delete", file = string.Empty, key = string.Empty }, | |||
new[] { typeof(Controllers.UploadController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Upload.Action", | |||
"dev", | |||
"Upload/Action/{controller}/{action}", | |||
new { controller = "Upload", action = "Index" }, | |||
new[] { typeof(Controllers.UploadController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Upload.Index", | |||
"u", | |||
"", | |||
new { controller = "Upload", action = "Index" }, | |||
new[] { typeof(Controllers.UploadController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Upload.Download", | |||
"u", | |||
"{file}", | |||
new { controller = "Upload", action = "Download", file = string.Empty }, | |||
new[] { typeof(Controllers.UploadController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Upload.Delete", | |||
"u", | |||
"{file}/{key}", | |||
new { controller = "Upload", action = "Delete", file = string.Empty, key = string.Empty }, | |||
new[] { typeof(Controllers.UploadController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Upload.Action", | |||
"u", | |||
"Action/{controller}/{action}", | |||
new { controller = "Upload", action = "Index" }, | |||
new[] { typeof(Controllers.UploadController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Upload.Index", | |||
"upload", | |||
new List<string>() { "dev", "upload", "u" }, // Subdomains | |||
"", | |||
new { controller = "Upload", action = "Index" }, | |||
new[] { typeof(Controllers.UploadController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Upload.Download", | |||
"upload", | |||
new List<string>() { "dev", "upload", "u" }, // Subdomains | |||
"{file}", | |||
new { controller = "Upload", action = "Download", file = string.Empty }, | |||
new[] { typeof(Controllers.UploadController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Upload.Delete", | |||
"upload", | |||
new List<string>() { "dev", "upload", "u" }, // Subdomains | |||
"{file}/{key}", | |||
new { controller = "Upload", action = "Delete", file = string.Empty, key = string.Empty }, | |||
new[] { typeof(Controllers.UploadController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Upload.Action", | |||
"upload", | |||
new List<string>() { "dev", "upload", "u" }, // Subdomains | |||
"Action/{controller}/{action}", | |||
new { controller = "Upload", action = "Index" }, | |||
new[] { typeof(Controllers.UploadController).Namespace } |
@@ -0,0 +1,108 @@ | |||
/*! | |||
* Agate by Taufik Nurrohman <https://github.com/tovic> | |||
* ---------------------------------------------------- | |||
* | |||
* #ade5fc | |||
* #a2fca2 | |||
* #c6b4f0 | |||
* #d36363 | |||
* #fcc28c | |||
* #fc9b9b | |||
* #ffa | |||
* #fff | |||
* #333 | |||
* #62c8f3 | |||
* #888 | |||
* | |||
*/ | |||
.hljs { | |||
display: block; | |||
overflow-x: auto; | |||
padding: 0.5em; | |||
background: #333; | |||
color: white; | |||
} | |||
.hljs-name, | |||
.hljs-strong { | |||
font-weight: bold; | |||
} | |||
.hljs-code, | |||
.hljs-emphasis { | |||
font-style: italic; | |||
} | |||
.hljs-tag { | |||
color: #62c8f3; | |||
} | |||
.hljs-variable, | |||
.hljs-template-variable, | |||
.hljs-selector-id, | |||
.hljs-selector-class { | |||
color: #ade5fc; | |||
} | |||
.hljs-string, | |||
.hljs-bullet { | |||
color: #a2fca2; | |||
} | |||
.hljs-type, | |||
.hljs-title, | |||
.hljs-section, | |||
.hljs-attribute, | |||
.hljs-quote, | |||
.hljs-built_in, | |||
.hljs-builtin-name { | |||
color: #ffa; | |||
} | |||
.hljs-number, | |||
.hljs-symbol, | |||
.hljs-bullet { | |||
color: #d36363; | |||
} | |||
.hljs-keyword, | |||
.hljs-selector-tag, | |||
.hljs-literal { | |||
color: #fcc28c; | |||
} | |||
.hljs-comment, | |||
.hljs-deletion, | |||
.hljs-code { | |||
color: #888; | |||
} | |||
.hljs-regexp, | |||
.hljs-link { | |||
color: #c6b4f0; | |||
} | |||
.hljs-meta { | |||
color: #fc9b9b; | |||
} | |||
.hljs-deletion { | |||
background-color: #fc9b9b; | |||
color: #333; | |||
} | |||
.hljs-addition { | |||
background-color: #a2fca2; | |||
color: #333; | |||
} | |||
.hljs a { | |||
color: inherit; | |||
} | |||
.hljs a:focus, | |||
.hljs a:hover { | |||
color: inherit; | |||
text-decoration: underline; | |||
} |
@@ -0,0 +1,66 @@ | |||
/* | |||
Date: 24 Fev 2015 | |||
Author: Pedro Oliveira <kanytu@gmail . com> | |||
*/ | |||
.hljs { | |||
color: #a9b7c6; | |||
background: #282b2e; | |||
display: block; | |||
overflow-x: auto; | |||
padding: 0.5em; | |||
} | |||
.hljs-number, | |||
.hljs-literal, | |||
.hljs-symbol, | |||
.hljs-bullet { | |||
color: #6897BB; | |||
} | |||
.hljs-keyword, | |||
.hljs-selector-tag, | |||
.hljs-deletion { | |||
color: #cc7832; | |||
} | |||
.hljs-variable, | |||
.hljs-template-variable, | |||
.hljs-link { | |||
color: #629755; | |||
} | |||
.hljs-comment, | |||
.hljs-quote { | |||
color: #808080; | |||
} | |||
.hljs-meta { | |||
color: #bbb529; | |||
} | |||
.hljs-string, | |||
.hljs-attribute, | |||
.hljs-addition { | |||
color: #6A8759; | |||
} | |||
.hljs-section, | |||
.hljs-title, | |||
.hljs-type { | |||
color: #ffc66d; | |||
} | |||
.hljs-name, | |||
.hljs-selector-id, | |||
.hljs-selector-class { | |||
color: #e8bf6a; | |||
} | |||
.hljs-emphasis { | |||
font-style: italic; | |||
} | |||
.hljs-strong { | |||
font-weight: bold; | |||
} |
@@ -0,0 +1,88 @@ | |||
/* | |||
Arduino® Light Theme - Stefania Mellai <s.mellai@arduino.cc> | |||
*/ | |||
.hljs { | |||
display: block; | |||
overflow-x: auto; | |||
padding: 0.5em; | |||
background: #FFFFFF; | |||
} | |||
.hljs, | |||
.hljs-subst { | |||
color: #434f54; | |||
} | |||
.hljs-keyword, | |||
.hljs-attribute, | |||
.hljs-selector-tag, | |||
.hljs-doctag, | |||
.hljs-name { | |||
color: #00979D; | |||
} | |||
.hljs-built_in, | |||
.hljs-literal, | |||
.hljs-bullet, | |||
.hljs-code, | |||
.hljs-addition { | |||
color: #D35400; | |||
} | |||
.hljs-regexp, | |||
.hljs-symbol, | |||
.hljs-variable, | |||
.hljs-template-variable, | |||
.hljs-link, | |||
.hljs-selector-attr, | |||
.hljs-selector-pseudo { | |||
color: #00979D; | |||
} | |||
.hljs-type, | |||
.hljs-string, | |||
.hljs-selector-id, | |||
.hljs-selector-class, | |||
.hljs-quote, | |||
.hljs-template-tag, | |||
.hljs-deletion { | |||
color: #005C5F; | |||
} | |||
.hljs-title, | |||
.hljs-section { | |||
color: #880000; | |||
font-weight: bold; | |||
} | |||
.hljs-comment { | |||
color: rgba(149,165,166,.8); | |||
} | |||
.hljs-meta-keyword { | |||
color: #728E00; | |||
} | |||
.hljs-meta { | |||
color: #728E00; | |||
color: #434f54; | |||
} | |||
.hljs-emphasis { | |||
font-style: italic; | |||
} | |||
.hljs-strong { | |||
font-weight: bold; | |||
} | |||
.hljs-function { | |||
color: #728E00; | |||
} | |||
.hljs-number { | |||
color: #8A7B52; | |||
} |
@@ -0,0 +1,73 @@ | |||
/* | |||
Date: 17.V.2011 | |||
Author: pumbur <pumbur@pumbur.net> | |||
*/ | |||
.hljs { | |||
display: block; | |||
overflow-x: auto; | |||
padding: 0.5em; | |||
background: #222; | |||
} | |||
.hljs, | |||
.hljs-subst { | |||
color: #aaa; | |||
} | |||
.hljs-section { | |||
color: #fff; | |||
} | |||
.hljs-comment, | |||
.hljs-quote, | |||
.hljs-meta { | |||
color: #444; | |||
} | |||
.hljs-string, | |||
.hljs-symbol, | |||
.hljs-bullet, | |||
.hljs-regexp { | |||
color: #ffcc33; | |||
} | |||
.hljs-number, | |||
.hljs-addition { | |||
color: #00cc66; | |||
} | |||
.hljs-built_in, | |||
.hljs-builtin-name, | |||
.hljs-literal, | |||
.hljs-type, | |||
.hljs-template-variable, | |||
.hljs-attribute, | |||
.hljs-link { | |||
color: #32aaee; | |||
} | |||
.hljs-keyword, | |||
.hljs-selector-tag, | |||
.hljs-name, | |||
.hljs-selector-id, | |||
.hljs-selector-class { | |||
color: #6644aa; | |||
} | |||
.hljs-title, | |||
.hljs-variable, | |||
.hljs-deletion, | |||
.hljs-template-tag { | |||
color: #bb1166; | |||
} | |||
.hljs-section, | |||
.hljs-doctag, | |||
.hljs-strong { | |||
font-weight: bold; | |||
} | |||
.hljs-emphasis { | |||
font-style: italic; | |||
} |
@@ -0,0 +1,45 @@ | |||
/* | |||
Original style from softwaremaniacs.org (c) Ivan Sagalaev <Maniac@SoftwareManiacs.Org> | |||
*/ | |||
.hljs { | |||
display: block; | |||
overflow-x: auto; | |||
padding: 0.5em; | |||
background: white; | |||
color: black; | |||
} | |||
.hljs-string, | |||
.hljs-variable, | |||
.hljs-template-variable, | |||
.hljs-symbol, | |||
.hljs-bullet, | |||
.hljs-section, | |||
.hljs-addition, | |||
.hljs-attribute, | |||
.hljs-link { | |||
color: #888; | |||
} | |||
.hljs-comment, | |||
.hljs-quote, | |||
.hljs-meta, | |||
.hljs-deletion { | |||
color: #ccc; | |||
} | |||
.hljs-keyword, | |||
.hljs-selector-tag, | |||
.hljs-section, | |||
.hljs-name, | |||
.hljs-type, | |||
.hljs-strong { | |||
font-weight: bold; | |||
} | |||
.hljs-emphasis { | |||
font-style: italic; | |||
} |
@@ -0,0 +1,83 @@ | |||
/* Base16 Atelier Cave Dark - Theme */ | |||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */ | |||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ | |||
/* Atelier-Cave Comment */ | |||
.hljs-comment, | |||
.hljs-quote { | |||
color: #7e7887; | |||
} | |||
/* Atelier-Cave Red */ | |||
.hljs-variable, | |||
.hljs-template-variable, | |||
.hljs-attribute, | |||
.hljs-regexp, | |||
.hljs-link, | |||
.hljs-tag, | |||
.hljs-name, | |||
.hljs-selector-id, | |||
.hljs-selector-class { | |||
color: #be4678; | |||
} | |||
/* Atelier-Cave Orange */ | |||
.hljs-number, | |||
.hljs-meta, | |||
.hljs-built_in, | |||
.hljs-builtin-name, | |||
.hljs-literal, | |||
.hljs-type, | |||
.hljs-params { | |||
color: #aa573c; | |||
} | |||
/* Atelier-Cave Green */ | |||
.hljs-string, | |||
.hljs-symbol, | |||
.hljs-bullet { | |||
color: #2a9292; | |||
} | |||
/* Atelier-Cave Blue */ | |||
.hljs-title, | |||
.hljs-section { | |||
color: #576ddb; | |||
} | |||
/* Atelier-Cave Purple */ | |||
.hljs-keyword, | |||
.hljs-selector-tag { | |||
color: #955ae7; | |||
} | |||
.hljs-deletion, | |||
.hljs-addition { | |||
color: #19171c; | |||
display: inline-block; | |||
width: 100%; | |||
} | |||
.hljs-deletion { | |||
background-color: #be4678; | |||
} | |||
.hljs-addition { | |||
background-color: #2a9292; | |||
} | |||
.hljs { | |||
display: block; | |||
overflow-x: auto; | |||
background: #19171c; | |||
color: #8b8792; | |||
padding: 0.5em; | |||
} | |||
.hljs-emphasis { | |||
font-style: italic; | |||
} | |||
.hljs-strong { | |||
font-weight: bold; | |||
} |
@@ -0,0 +1,85 @@ | |||
/* Base16 Atelier Cave Light - Theme */ | |||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */ | |||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ | |||
/* Atelier-Cave Comment */ | |||
.hljs-comment, | |||
.hljs-quote { | |||
color: #655f6d; | |||
} | |||
/* Atelier-Cave Red */ | |||
.hljs-variable, | |||
.hljs-template-variable, | |||
.hljs-attribute, | |||
.hljs-tag, | |||
.hljs-name, | |||
.hljs-regexp, | |||
.hljs-link, | |||
.hljs-name, | |||
.hljs-name, | |||
.hljs-selector-id, | |||
.hljs-selector-class { | |||
color: #be4678; | |||
} | |||
/* Atelier-Cave Orange */ | |||
.hljs-number, | |||
.hljs-meta, | |||
.hljs-built_in, | |||
.hljs-builtin-name, | |||
.hljs-literal, | |||
.hljs-type, | |||
.hljs-params { | |||
color: #aa573c; | |||
} | |||
/* Atelier-Cave Green */ | |||
.hljs-string, | |||
.hljs-symbol, | |||
.hljs-bullet { | |||
color: #2a9292; | |||
} | |||
/* Atelier-Cave Blue */ | |||
.hljs-title, | |||
.hljs-section { | |||
color: #576ddb; | |||
} | |||
/* Atelier-Cave Purple */ | |||
.hljs-keyword, | |||
.hljs-selector-tag { | |||
color: #955ae7; | |||
} | |||
.hljs-deletion, | |||
.hljs-addition { | |||
color: #19171c; | |||
display: inline-block; | |||
width: 100%; | |||
} | |||
.hljs-deletion { | |||
background-color: #be4678; | |||
} | |||
.hljs-addition { | |||
background-color: #2a9292; | |||
} | |||
.hljs { | |||
display: block; | |||
overflow-x: auto; | |||
background: #efecf4; | |||
color: #585260; | |||
padding: 0.5em; | |||
} | |||
.hljs-emphasis { | |||
font-style: italic; | |||
} | |||
.hljs-strong { | |||
font-weight: bold; | |||
} |
@@ -0,0 +1,69 @@ | |||
/* Base16 Atelier Dune Dark - Theme */ | |||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ | |||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ | |||
/* Atelier-Dune Comment */ | |||
.hljs-comment, | |||
.hljs-quote { | |||
color: #999580; | |||
} | |||
/* Atelier-Dune Red */ | |||
.hljs-variable, | |||
.hljs-template-variable, | |||
.hljs-attribute, | |||
.hljs-tag, | |||
.hljs-name, | |||
.hljs-regexp, | |||
.hljs-link, | |||
.hljs-name, | |||
.hljs-selector-id, | |||
.hljs-selector-class { | |||
color: #d73737; | |||
} | |||
/* Atelier-Dune Orange */ | |||
.hljs-number, | |||
.hljs-meta, | |||
.hljs-built_in, | |||
.hljs-builtin-name, | |||
.hljs-literal, | |||
.hljs-type, | |||
.hljs-params { | |||
color: #b65611; | |||
} | |||
/* Atelier-Dune Green */ | |||
.hljs-string, | |||
.hljs-symbol, | |||
.hljs-bullet { | |||
color: #60ac39; | |||
} | |||
/* Atelier-Dune Blue */ | |||
.hljs-title, | |||
.hljs-section { | |||
color: #6684e1; | |||
} | |||
/* Atelier-Dune Purple */ | |||
.hljs-keyword, | |||
.hljs-selector-tag { | |||
color: #b854d4; | |||
} | |||
.hljs { | |||
display: block; | |||
overflow-x: auto; | |||
background: #20201d; | |||
color: #a6a28c; | |||
padding: 0.5em; | |||
} | |||
.hljs-emphasis { | |||
font-style: italic; | |||
} | |||
.hljs-strong { | |||
font-weight: bold; | |||
} |
@@ -0,0 +1,69 @@ | |||
/* Base16 Atelier Dune Light - Theme */ | |||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */ | |||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ | |||
/* Atelier-Dune Comment */ | |||
.hljs-comment, | |||
.hljs-quote { | |||
color: #7d7a68; | |||
} | |||
/* Atelier-Dune Red */ | |||
.hljs-variable, | |||
.hljs-template-variable, | |||
.hljs-attribute, | |||
.hljs-tag, | |||
.hljs-name, | |||
.hljs-regexp, | |||
.hljs-link, | |||
.hljs-name, | |||
.hljs-selector-id, | |||
.hljs-selector-class { | |||
color: #d73737; | |||
} | |||
/* Atelier-Dune Orange */ | |||
.hljs-number, | |||
.hljs-meta, | |||
.hljs-built_in, | |||
.hljs-builtin-name, | |||
.hljs-literal, | |||
.hljs-type, | |||
.hljs-params { | |||
color: #b65611; | |||
} | |||
/* Atelier-Dune Green */ | |||
.hljs-string, | |||
.hljs-symbol, | |||
.hljs-bullet { | |||
color: #60ac39; | |||
} | |||
/* Atelier-Dune Blue */ | |||
.hljs-title, | |||
.hljs-section { | |||
color: #6684e1; | |||
} | |||
/* Atelier-Dune Purple */ | |||
.hljs-keyword, | |||
.hljs-selector-tag { | |||
color: #b854d4; | |||
} | |||
.hljs { | |||
display: block; | |||
overflow-x: auto; | |||
background: #fefbec; | |||
color: #6e6b5e; | |||
padding: 0.5em; | |||
} | |||
.hljs-emphasis { | |||
font-style: italic; | |||
} | |||
.hljs-strong { | |||
font-weight: bold; | |||
} |
@@ -0,0 +1,84 @@ | |||
/* Base16 Atelier Estuary Dark - Theme */ | |||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */ | |||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ | |||
/* Atelier-Estuary Comment */ | |||
.hljs-comment, | |||
.hljs-quote { | |||
color: #878573; | |||
} | |||
/* Atelier-Estuary Red */ | |||
.hljs-variable, | |||
.hljs-template-variable, | |||
.hljs-attribute, | |||
.hljs-tag, | |||
.hljs-name, | |||
.hljs-regexp, | |||
.hljs-link, | |||
.hljs-name, | |||
.hljs-selector-id, | |||
.hljs-selector-class { | |||
color: #ba6236; | |||
} | |||
/* Atelier-Estuary Orange */ | |||
.hljs-number, | |||
.hljs-meta, | |||
.hljs-built_in, | |||
.hljs-builtin-name, | |||
.hljs-literal, | |||
.hljs-type, | |||
.hljs-params { | |||
color: #ae7313; | |||
} | |||
/* Atelier-Estuary Green */ | |||
.hljs-string, | |||
.hljs-symbol, | |||
.hljs-bullet { | |||
color: #7d9726; | |||
} | |||
/* Atelier-Estuary Blue */ | |||
.hljs-title, | |||
.hljs-section { | |||
color: #36a166; | |||
} | |||
/* Atelier-Estuary Purple */ | |||
.hljs-keyword, | |||
.hljs-selector-tag { | |||
color: #5f9182; | |||
} | |||
.hljs-deletion, | |||
.hljs-addition { | |||
color: #22221b; | |||
display: inline-block; | |||
width: 100%; | |||
} | |||
.hljs-deletion { | |||
background-color: #ba6236; | |||
} | |||
.hljs-addition { | |||
background-color: #7d9726; | |||
} | |||
.hljs { | |||
display: block; | |||
overflow-x: auto; | |||
background: #22221b; | |||
color: #929181; | |||
padding: 0.5em; | |||
} | |||
.hljs-emphasis { | |||
font-style: italic; | |||
} | |||
.hljs-strong { | |||
font-weight: bold; | |||
} |
@@ -0,0 +1,84 @@ | |||
/* Base16 Atelier Estuary Light - Theme */ | |||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */ | |||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ | |||
/* Atelier-Estuary Comment */ | |||
.hljs-comment, | |||
.hljs-quote { | |||
color: #6c6b5a; | |||
} | |||
/* Atelier-Estuary Red */ | |||
.hljs-variable, | |||
.hljs-template-variable, | |||
.hljs-attribute, | |||
.hljs-tag, | |||
.hljs-name, | |||
.hljs-regexp, | |||
.hljs-link, | |||
.hljs-name, | |||
.hljs-selector-id, | |||
.hljs-selector-class { | |||
color: #ba6236; | |||
} | |||
/* Atelier-Estuary Orange */ | |||
.hljs-number, | |||
.hljs-meta, | |||
.hljs-built_in, | |||
.hljs-builtin-name, | |||
.hljs-literal, | |||
.hljs-type, | |||
.hljs-params { | |||
color: #ae7313; | |||
} | |||
/* Atelier-Estuary Green */ | |||
.hljs-string, | |||
.hljs-symbol, | |||
.hljs-bullet { | |||
color: #7d9726; | |||
} | |||
/* Atelier-Estuary Blue */ | |||
.hljs-title, | |||
.hljs-section { | |||
color: #36a166; | |||
} | |||
/* Atelier-Estuary Purple */ | |||
.hljs-keyword, | |||
.hljs-selector-tag { | |||
color: #5f9182; | |||
} | |||
.hljs-deletion, | |||
.hljs-addition { | |||
color: #22221b; | |||
display: inline-block; | |||
width: 100%; | |||
} | |||
.hljs-deletion { | |||
background-color: #ba6236; | |||
} | |||
.hljs-addition { | |||
background-color: #7d9726; | |||
} | |||
.hljs { | |||
display: block; | |||
overflow-x: auto; | |||
background: #f4f3ec; | |||
color: #5f5e4e; | |||
padding: 0.5em; | |||
} | |||
.hljs-emphasis { | |||
font-style: italic; | |||
} | |||
.hljs-strong { | |||
font-weight: bold; | |||
} |
@@ -0,0 +1,69 @@ | |||
/* Base16 Atelier Forest Dark - Theme */ | |||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ | |||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ | |||
/* Atelier-Forest Comment */ | |||
.hljs-comment, | |||
.hljs-quote { | |||
color: #9c9491; | |||
} | |||
/* Atelier-Forest Red */ | |||
.hljs-variable, | |||
.hljs-template-variable, | |||
.hljs-attribute, | |||
.hljs-tag, | |||
.hljs-name, | |||
.hljs-regexp, | |||
.hljs-link, | |||
.hljs-name, | |||
.hljs-selector-id, | |||
.hljs-selector-class { | |||
color: #f22c40; | |||
} | |||
/* Atelier-Forest Orange */ | |||
.hljs-number, | |||
.hljs-meta, | |||
.hljs-built_in, | |||
.hljs-builtin-name, | |||
.hljs-literal, | |||
.hljs-type, | |||
.hljs-params { | |||
color: #df5320; | |||
} | |||
/* Atelier-Forest Green */ | |||
.hljs-string, | |||
.hljs-symbol, | |||
.hljs-bullet { | |||
color: #7b9726; | |||
} | |||
/* Atelier-Forest Blue */ | |||
.hljs-title, | |||
.hljs-section { | |||
color: #407ee7; | |||
} | |||
/* Atelier-Forest Purple */ | |||
.hljs-keyword, | |||
.hljs-selector-tag { | |||
color: #6666ea; | |||
} | |||
.hljs { | |||
display: block; | |||
overflow-x: auto; | |||
background: #1b1918; | |||
color: #a8a19f; | |||
padding: 0.5em; | |||
} | |||
.hljs-emphasis { | |||
font-style: italic; | |||
} | |||
.hljs-strong { | |||
font-weight: bold; | |||
} |
@@ -0,0 +1,69 @@ | |||
/* Base16 Atelier Forest Light - Theme */ | |||
/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */ | |||
/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */ | |||
/* Atelier-Forest Comment */ | |||
.hljs-comment, | |||
.hljs-quote { | |||
color: #766e6b; | |||
} | |||
/* Atelier-Forest Red */ | |||
.hljs-variable, | |||
.hljs-template-variable, | |||
.hljs-attribute, | |||
.hljs-tag, | |||
.hljs-name, | |||
.hljs-regexp, | |||
.hljs-link, | |||
.hljs-name, | |||
.hljs-selector-id, | |||
.hljs-selector-class { | |||
color: #f22c40; | |||
} | |||
/* Atelier-Forest Orange */ | |||
.hljs-number, | |||
.hljs-meta, | |||
.hljs-built_in, | |||
.hljs-builtin-name, | |||
.hljs-literal, | |||
.hljs-type, | |||
.hljs-params { | |||
color: #df5320; | |||
} | |||
/* Atelier-Forest Green */ | |||
.hljs-string, | |||
.hljs-symbol, | |||
.hljs-bullet { | |||
color: #7b9726; | |||
} | |||
/* Atelier-Forest Blue */ | |||
.hljs-title, | |||
.hljs-section { | |||
color: #407ee7; | |||
} | |||
/* Atelier-Forest Purple */ | |||
.hljs-keyword, | |||
.hljs-selector-tag { | |||
color: #6666ea; | |||
} | |||
.hljs { | |||
display: block; | |||
overflow-x: auto; | |||
background: #f1efee; | |||
color: #68615e; | |||
padding: 0.5em; | |||
} | |||
.hljs-emphasis { | |||
font-style: italic; | |||
} | |||