/Diary.Web/Views/Shared/_Layout.cshtml
https://gitlab.com/thefancydev/Diary · Razor · 70 lines · 70 code · 0 blank · 0 comment · 3 complexity · 8554fc5eee4340822995ab3add889109 MD5 · raw file
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>@ViewBag.Title - Diary</title>
- @Styles.Render("~/Content/css")
- @Scripts.Render("~/bundles/modernizr")
- @Scripts.Render("~/bundles/jquery")
- @Scripts.Render("~/bundles/bootstrap")
- @RenderSection("scripts", required: false)
- </head>
- <body>
- <div class="navbar navbar-inverse navbar-fixed-top">
- <div class="container">
- <div class="navbar-header">
- <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- <span class="icon-bar"></span>
- </button>
- @Html.ActionLink("Diary", "Index", "Home", new { area = "" }, new { @class = "navbar-brand" })
- </div>
- <div class="navbar-collapse collapse">
- <ul class="nav navbar-nav">
- <li>@Html.ActionLink("Home", "Index", "Home")</li>
- <li>@Html.ActionLink("Create", "createEntry", "Entry")</li>
- @if (Authentication.isAuthenticated)
- {
- if (Authentication.AuthenticatedAs.isAdmin)
- {
- <li>@Html.ActionLink("Admin", "adminIndex", "AdminControlCentre")</li>
- }
- }
- </ul>
- @if (Authentication.isAuthenticated)
- {
- <ul class="nav navbar-nav navbar-right">
- <li><i class="fa fa-user"></i> @Html.ActionLink("Account", "accountIndex", "Account")</li>
- <li>@Html.ActionLink("Log Out", "logOut", "Account")</li>
- </ul>
- }
- </div>
- </div>
- </div>
- <div class="container body-content">
- @if ((string)TempData["message"] != null)
- {
- if ((bool)TempData["badAlert"])
- {
- <div class="alert alert-danger">
- @TempData["message"].ToString()
- </div>
- }
- else
- {
- <div class="alert alert-info">
- @TempData["message"].ToString()
- </div>
- }
- <script>$(function(){setTimeout(function(){$(".alert").slideUp(700)},5e3)});</script>
- }
- @RenderBody()
- <hr />
- <footer>
- <p>© @DateTime.Now.Year - Diary. Designed and Developed by <a href="mailto:rhys.oconnor@outlook.com">Rhys O'Connor</a> 2016</p>
- </footer>
- </div>
- </body>
- </html>