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.
iot/projects/Infrastructure/Views/Shared/_Layout.cshtml

99 lines
4.5 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

@inject IConfiguration cfg
<!DOCTYPE html>
<html>
<head>
@(await Html.PartialAsync("_Header"))
<title>@HtmlTitle | @cfg["name"]</title>
@RenderSection("styles", required: false)
</head>
<body class="hold-transition skin-blue-light layout-top-nav fixed">
<div class="wrapper">
<header class="main-header">
<nav class="navbar navbar-static-top">
<div class="container">
<div class="navbar-header">
<a class="navbar-brand" href="@Url.Action("Index","Home")"><img style="display:inline;max-height:30px;margin:-5px 0;" src="@cfg["logo"]" /> | @cfg["name"]</a>
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar-collapse">
<i class="fa fa-bars"></i>
</button>
</div>
<div class="collapse navbar-collapse pull-left" id="navbar-collapse">
@await Html.PartialAsync("/Views/Shared/_Menu.cshtml")
</div>
<div class="navbar-custom-menu">
@if (User.Identity.IsAuthenticated)
{
using (Html.BeginForm("Logout", "Account"))
{
@Html.AntiForgeryToken()
<ul class="nav navbar-nav">
<li>
<a href="@Url.Action("Index", "Account" , new { area="" })">@User.Identity.Name</a>
</li>
<li>
<a href="@Url.Action("Logout", "Account" , new { area="" })">退出</a>
</li>
</ul>
}
}
else
{
<ul class="nav navbar-nav">
<li>
<a href="@Url.Action("Register","Account",new { area="" })">注册</a>
</li>
<li>
<a href="@Url.Action("Login","Account",new { area="" })">登录</a>
</li>
</ul>
}
</div>
</div>
</nav>
</header>
<div class="content-wrapper">
@RenderSection("header", false)
<div class="container">
@if (!ViewData.ContainsKey("HideBread"))
{
<section class="content-header">
<h1>@HtmlTitle</h1>
<ol class="breadcrumb">
<li><a href="@Url.Action("Index","Home")"><i class="fa fa-home"></i>首页</a></li>
@RenderSection("bread", false)
<li class="active"><a href="@Context.Request.GetUrl()">@HtmlTitle</a></li>
</ol>
</section>
}
<section class="content">
<noscript>
<div class="callout callout-danger">
<h4><i class="icon fa fa-ban"></i> 警告!</h4>
<p>Javascript处于禁用状态</p>
</div>
</noscript>
@RenderBody()
</section>
</div>
</div>
<footer class="main-footer">
<div class="container">
<div class="pull-left">
@Html.Raw(cfg["copyright"].Replace("{now}", DateTime.Now.Year.ToString()))
</div>
<div class="pull-right hidden-xs">
<span>版本:@Html.Raw(cfg["version"])</span><!--设备Id@DeviceAttribute.DeviceId-->
@if (User.Identity.IsAuthenticated)
{
<a href="@Url.Action("Index","Home",new { area="Admin" })">管理</a>
}
</div>
</div>
</footer>
</div>
<a id="backTop" class="btn btn-back-top bg-light-blue-active"></a>
@(await Html.PartialAsync("_Footer"))
@RenderSection("scripts", required: false)
<script src="~/js/site.js"></script>
</body>
</html>