Browse Source

Improve MainNavbar and footer

pull/41/head
Berkan Sasmaz 5 years ago
parent
commit
3f7ffc9aa3
  1. 7
      src/EventHub.Web.Theme/Themes/EventHub/Components/Footer/Default.cshtml
  2. 8
      src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml

7
src/EventHub.Web.Theme/Themes/EventHub/Components/Footer/Default.cshtml

@ -22,13 +22,6 @@
<a href="@Url.Page("/Help")" class="d-block">Help</a>
</div>
</div>
<div class="col-md">
<h5>Organizations</h5>
<div class="footer-links">
<a href="#" class="d-block">Nearby Events</a>
<a href="#" class="d-block">Online Events</a>
</div>
</div>
<div class="col-md">
<h5>Follow Us</h5>
@* ToDo: Social platform links *@

8
src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml

@ -56,9 +56,12 @@
</span>
</a>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item" href="@Url.Page("/Profile")" title="@L["Settings"]">
<a class="dropdown-item" href="@(EventHubExternalUrls.EhAccount.EnsureEndsWith('/') + "Account/Manage")" target="_blank" title="@L["Settings"]">
<i class="fas fa-cog"></i> @L["Settings"]
</a>
<a class="dropdown-item" href="@Url.Page("/Profile")" title="@L["Profile"]">
<i class="fas fa-user"></i> @L["Profile"]
</a>
<a class="dropdown-item" href="/Account/Logout?returnUrl=@EventHubExternalUrls.EhWww@(System.Net.WebUtility.UrlEncode(Context.Request.GetEncodedPathAndQuery()))" title="@L["Logout"]">
<i class="fas fa-sign-out-alt"></i> @L["Logout"]
</a>
@ -107,6 +110,7 @@
</nav>
@functions{
public string GetPageActiveClassOrEmpty(ViewContext viewContext, string pageUrl)
{
var activeRoute = viewContext?.RouteData.Values["page"]?.ToString()?.ToLowerInvariant();
@ -127,7 +131,7 @@
pageUrl = pageUrl.Replace("/index", "");
var highLevelActiveRoute = GetHighLevelRoute(activeRoute); // "/organizations/ng-coders" => "organizations"
return highLevelActiveRoute.Contains(pageUrl) ? "active" : highLevelActiveRoute;
}

Loading…
Cancel
Save