You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ombi/PlexRequests.UI/Views/Shared/_Layout.cshtml

124 lines
4.8 KiB

9 years ago
@using Nancy.Security
@using Nancy.Session
@using PlexRequests.UI.Models
9 years ago
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase
<html>
<head>
<title>Plex Requests</title>
<!-- Styles -->
9 years ago
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="~/Content/bootstrap.css" type="text/css"/>
<link rel="stylesheet" href="~/Content/custom.min.css" type="text/css" />
<link rel="stylesheet" href="~/Content/font-awesome.css" type="text/css"/>
9 years ago
<link rel="stylesheet" href="~/Content/pace.min.css" type="text/css"/>
9 years ago
<!-- Scripts -->
<script src="/Content/jquery-2.2.1.min.js"></script>
<script src="/Content/handlebars.min.js"></script>
<script src="/Content/bootstrap.min.js"></script>
<script src="/Content/bootstrap-notify.min.js"></script>
<script src="/Content/site.js"></script>
9 years ago
<script src="/Content/pace.min.js"></script>
<script src="/Content/jquery.mixitup.js"></script>
<script src="/Content/moment.min.js"></script>
</head>
<body>
9 years ago
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/search">Plex Requests</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
@if (Context.Request.Path == "/search")
{
<li class="active"><a href="/search"><i class="fa fa-search"></i> Search</a></li>
}
else
{
<li><a href="/search"><i class="fa fa-search"></i> Search</a></li>
}
@if (Context.Request.Path == "/requests")
{
<li class="active"><a href="/requests"><i class="fa fa-plus-circle"></i> Requests</a></li>
}
else
{
<li><a href="/requests"><i class="fa fa-plus-circle"></i> Requests</a></li>
}
</ul>
<ul class="nav navbar-nav navbar-right">
9 years ago
@if (!Context.CurrentUser.IsAuthenticated())
{
<li><a href="/login"><i class="fa fa-user"></i> Admin</a></li>
}
else
{
9 years ago
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-user"></i> Admin <span class="caret"></span></a>
9 years ago
<ul class="dropdown-menu" role="menu">
<li><a href="/admin"><i class="fa fa-cog"></i> Settings</a></li>
<li><a href="/changepassword"><i class="fa fa-key"></i> Change password</a></li>
9 years ago
<li class="divider"></li>
<li><a href="/logout"><i class="fa fa-sign-out"></i> Logout</a></li>
9 years ago
</ul>
</li>
}
@if (Context.Request.Session[SessionKeys.UsernameKey] != null)
{
<li><a href="/userlogin/logout"><i class="fa fa-sign-out"></i> Logout</a></li>
}
</ul>
</div>
</div>
</nav>
<div class="container">
@RenderBody()
</div>
<div class="scroll-top-wrapper ">
<span class="scroll-top-inner">
<i class="fa fa-2x fa-arrow-circle-up"></i>
</span>
</div>
</body>
9 years ago
</html>
<script>
$(function () {
$(document).on('scroll', function () {
if ($(window).scrollTop() > 100) {
$('.scroll-top-wrapper').addClass('show');
} else {
$('.scroll-top-wrapper').removeClass('show');
}
});
$('.scroll-top-wrapper').on('click', scrollToTop);
});
function scrollToTop() {
verticalOffset = typeof (verticalOffset) != 'undefined' ? verticalOffset : 0;
element = $('body');
offset = element.offset();
offsetTop = offset.top;
$('html, body').animate({ scrollTop: offsetTop }, 500, 'linear');
}
</script>