@@ -31,6 +31,16 @@ namespace Teknik.Areas.Home | |||
new[] { typeof(DefaultController).Namespace } | |||
); | |||
// Default Routes to be applied everywhere | |||
context.MapSubdomainRoute( | |||
"Default.Logo", // Route name | |||
new List<string>() { "*" }, // Subdomains | |||
new List<string>() { config.Host, config.ShortenerConfig.ShortenerHost }, // domains | |||
"Logo", // URL with parameters | |||
new { controller = "Default", action = "Logo" }, // Parameter defaults | |||
new[] { typeof(DefaultController).Namespace } | |||
); | |||
context.MapSubdomainRoute( | |||
"Home.Index", // Route name | |||
new List<string>() { "www", string.Empty }, // Subdomains |
@@ -54,6 +54,16 @@ namespace Teknik.Controllers | |||
string imageFile = Server.MapPath("~/Images/favicon.ico"); | |||
return File(imageFile, "image/x-icon"); | |||
} | |||
// Get the Logo | |||
[HttpGet] | |||
[AllowAnonymous] | |||
public ActionResult Logo() | |||
{ | |||
// Get favicon | |||
string imageFile = Server.MapPath("~/Images/logo-black.svg"); | |||
return File(imageFile, "image/svg+xml"); | |||
} | |||
} | |||
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)] |
@@ -9,7 +9,7 @@ | |||
<span class="icon-bar"></span> | |||
<span class="icon-bar"></span> | |||
</button> | |||
<a class="navbar-brand" href="@Url.SubRouteUrl("www", "Home.Index")"><img src="/Images/logo-black.svg" height="20" alt="Teknik"></a> | |||
<a class="navbar-brand" href="@Url.SubRouteUrl("www", "Home.Index")"><img src="@Url.SubRouteUrl("www", "Default.Logo")" height="20" alt="Teknik"></a> | |||
</div> | |||
<div class="navbar-collapse collapse"> | |||
<ul class="nav navbar-nav"> |