-
Notifications
You must be signed in to change notification settings - Fork 0
/
razor.html
20 lines (14 loc) · 1.08 KB
/
razor.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!-- Using Action Links in navbars (Semantic UI) -->
@*Setting navbar item as "Active"*@
<li class="@(ViewContext.RouteData.Values["controller"].ToString() == "ControllerNameHere" ? "active" : "")">@Html.ActionLink("CustomTitleName", "ActionName", "ControllerName", new { area = "" }, new { @id = "someUniqueCSSID" })</li>
<!-- SEMANTIC UI Tab menu -->
<div class="ui fixed inverted pointing menu">
<div class="ui container">
<a href="#" id="some-logo" class="ui medium image">
<img src="~/Content/images/SOME_Logo.svg">
</a>
@Html.ActionLink("Home", "Index", "Home", new { area = "" }, new { @class = (ViewContext.RouteData.Values["action"].ToString() == "Index" ? "active item" : "item") })
@Html.ActionLink("About", "About", "Home", new { area = "" }, new { @class = (ViewContext.RouteData.Values["action"].ToString() == "About" ? "active item" : "item") })
@Html.ActionLink("Contact", "Contact", "Home", new { area = "" }, new { @class = (ViewContext.RouteData.Values["action"].ToString() == "Contact" ? "active item" : "item") })
@Html.Partial("_LoginPartial")
</div>