-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6482585
commit 85445cc
Showing
4 changed files
with
137 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
267 changes: 132 additions & 135 deletions
267
src/dotnet/APIView/APIViewWeb/Pages/Shared/_Layout.cshtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,135 +1,132 @@ | ||
@using APIViewWeb.Models; | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="google" content="notranslate" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>@ViewData["Title"] - apiview.dev</title> | ||
|
||
<environment include="Development"> | ||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" /> | ||
</environment> | ||
<environment exclude="Development"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" | ||
asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css" | ||
asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" | ||
crossorigin="anonymous" | ||
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" /> | ||
</environment> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" /> | ||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/> | ||
<!-- Soma Select --> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery.sumoselect/3.1.6/sumoselect.min.css"> | ||
<link rel="stylesheet" href="~/main.css" asp-append-version="true"> | ||
@RenderSection("Styles", required: false) | ||
</head> | ||
@{ | ||
var userPreference = (TempData["UserPreference"] as UserPreferenceModel) ?? new UserPreferenceModel(); | ||
var theme = userPreference.Theme; | ||
var fixedPageHeightClass = String.Empty; | ||
var pageName = ViewContext.RouteData.Values["page"]?.ToString(); | ||
if (pageName.Equals("/Assemblies/Review") || pageName.Equals("/Assemblies/Conversation") || pageName.Equals("/Assemblies/Revisions") || pageName.Equals("/Assemblies/Samples")) | ||
{ | ||
fixedPageHeightClass = " fixed-page-height"; } | ||
} | ||
<body class="@theme@fixedPageHeightClass"> | ||
<header> | ||
<nav class="navbar navbar-expand-sm navbar-toggleable-sm main-nav-cst-theme"> | ||
<div class="container-fluid"> | ||
<a href="/" class="navbar-brand"><img id="apiview-logo" alt="apiview-logo" src="~/icons/apiview.png" />apiview.dev</a> | ||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent" | ||
aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
<div class="navbar-collapse collapse"> | ||
<ul class="navbar-nav me-auto"> | ||
@if (User.Identity.IsAuthenticated) { | ||
<li class="nav-item"> | ||
<a class="nav-link" asp-area="" asp-page="/Assemblies/Index">Reviews</a> | ||
</li> | ||
<li class="nav-item"> | ||
<span asp-resource="@Model" asp-requirement="@ApproverRequirement.Instance"> | ||
<a class="nav-link" asp-area="" asp-page="/Assemblies/RequestedReviews">Requested Reviews</a> | ||
</span> | ||
</li> | ||
} | ||
</ul> | ||
<ul class="navbar-nav ms-auto"> | ||
@if (User.Identity.IsAuthenticated) { | ||
<li class="nav-item"> | ||
<a asp-page="Profile" asp-route-UserName="@User.GetGitHubLogin()" class="nav-link">Profile</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a asp-action="Logout" asp-controller="Account" class="nav-link">Log Out</a> | ||
</li> | ||
} | ||
<li class="nav-item"> | ||
<a href="https://github.com/Azure/azure-sdk-tools/blob/main/src/dotnet/APIView/APIViewWeb/README.md" class="nav-link">Help</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</nav> | ||
</header> | ||
|
||
<main role="main"> | ||
@RenderBody() | ||
</main> | ||
|
||
<footer class="border-top footer text-muted"> | ||
<div class="container text-center"> | ||
© @DateTime.Now.Year - apiview.dev | ||
- <a href="https://github.com/Azure/azure-sdk-tools/">Feedback</a> | ||
- <a href="https://github.com/Azure/azure-sdk-tools/commit/@Startup.VersionHash">@Startup.VersionHash</a> | ||
</div> | ||
</footer> | ||
|
||
<environment include="Development"> | ||
<script src="~/lib/jquery/dist/jquery.js"></script> | ||
<script src="~/lib/jquery/dist/jquery.sticky-sidebar.js"></script> | ||
<script src="~/lib/ResizeSensor/dist/ResizeSensor.js"></script> | ||
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.js"></script> | ||
<script src="~/lib/mark/dist/jquery.mark.js"></script> | ||
</environment> | ||
<environment exclude="Development"> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" | ||
asp-fallback-src="~/lib/jquery/dist/jquery.min.js" | ||
asp-fallback-test="window.jQuery" | ||
crossorigin="anonymous" | ||
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="> | ||
</script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" | ||
asp-fallback-src="~/lib/mark/dist/jquery.mark.min.js" | ||
crossorigin="anonymous"> | ||
</script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.sticky-sidebar.min.js" | ||
crossorigin="anonymous"> | ||
</script> | ||
@*The ResizeSensor is used by the sticky-sidebar to handle resizing content.*@ | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/ResizeSensor.min.js" | ||
crossorigin="anonymous"> | ||
</script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" | ||
asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js" | ||
asp-fallback-test="window.bootstrap" | ||
crossorigin="anonymous" | ||
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"> | ||
</script> | ||
</environment> | ||
<!-- Soma Select --> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.sumoselect/3.1.6/jquery.sumoselect.min.js" crossorigin="anonymous"></script> | ||
<!-- UnderScoreJs--> | ||
<script src="https://cdn.jsdelivr.net/npm/underscore@stable/underscore-umd-min.js" | ||
crossorigin="anonymous"> | ||
</script> | ||
<!--JQuery UI--> | ||
<script src="https://code.jquery.com/ui/1.13.1/jquery-ui.min.js" | ||
integrity="sha256-eTyxS0rkjpLEo16uXTS0uVCS4815lc40K2iVpWDvdSY=" | ||
crossorigin="anonymous"> | ||
</script> | ||
<script src="~/main.js" asp-append-version="true"></script> | ||
|
||
@RenderSection("Scripts", required: false) | ||
</body> | ||
</html> | ||
@using APIViewWeb.Models; | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="google" content="notranslate" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>@ViewData["Title"] - apiview.dev</title> | ||
|
||
<environment include="Development"> | ||
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.css" /> | ||
</environment> | ||
<environment exclude="Development"> | ||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" | ||
asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css" | ||
asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" | ||
crossorigin="anonymous" | ||
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" /> | ||
</environment> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" /> | ||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/animate.css/4.1.1/animate.min.css"/> | ||
<!-- Soma Select --> | ||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery.sumoselect/3.1.6/sumoselect.min.css"> | ||
<link rel="stylesheet" href="~/main.css" asp-append-version="true"> | ||
@RenderSection("Styles", required: false) | ||
</head> | ||
@{ | ||
var userPreference = (TempData["UserPreference"] as UserPreferenceModel) ?? new UserPreferenceModel(); | ||
var theme = userPreference.Theme; | ||
var fixedPageHeightClass = String.Empty; | ||
var pageName = ViewContext.RouteData.Values["page"]?.ToString(); | ||
if (pageName.Equals("/Assemblies/Review") || pageName.Equals("/Assemblies/Conversation") || pageName.Equals("/Assemblies/Revisions") || pageName.Equals("/Assemblies/Samples")) | ||
{ | ||
fixedPageHeightClass = " fixed-page-height"; | ||
} | ||
} | ||
<body class="@theme@fixedPageHeightClass"> | ||
<header> | ||
<nav class="navbar navbar-expand-sm navbar-toggleable-sm main-nav-cst-theme"> | ||
<div class="container-fluid"> | ||
<a href="/" class="navbar-brand"><img id="apiview-logo" alt="apiview-logo" src="~/icons/apiview.png" />apiview.dev</a> | ||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent" | ||
aria-expanded="false" aria-label="Toggle navigation"> | ||
<span class="navbar-toggler-icon"></span> | ||
</button> | ||
<div class="navbar-collapse collapse"> | ||
<ul class="navbar-nav me-auto"> | ||
@if (User.Identity.IsAuthenticated) { | ||
<li class="nav-item"> | ||
<a class="nav-link" asp-area="" asp-page="/Assemblies/Index">Reviews</a> | ||
</li> | ||
<li class="nav-item"> | ||
<span asp-resource="@Model" asp-requirement="@ApproverRequirement.Instance"> | ||
<a class="nav-link" asp-area="" asp-page="/Assemblies/RequestedReviews">Requested Reviews</a> | ||
</span> | ||
</li> | ||
} | ||
</ul> | ||
<ul class="navbar-nav ms-auto"> | ||
@if (User.Identity.IsAuthenticated) { | ||
<li class="nav-item"> | ||
<a asp-page="Profile" asp-route-UserName="@User.GetGitHubLogin()" class="nav-link">Profile</a> | ||
</li> | ||
<li class="nav-item"> | ||
<a asp-action="Logout" asp-controller="Account" class="nav-link">Log Out</a> | ||
</li> | ||
} | ||
<li class="nav-item"> | ||
<a href="https://github.com/Azure/azure-sdk-tools/blob/main/src/dotnet/APIView/APIViewWeb/README.md" class="nav-link">Help</a> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
</nav> | ||
</header> | ||
|
||
<main role="main"> | ||
@RenderBody() | ||
</main> | ||
|
||
<footer class="border-top footer text-muted"> | ||
<div class="container text-center"> | ||
© @DateTime.Now.Year - apiview.dev | ||
- <a href="https://github.com/Azure/azure-sdk-tools/">Feedback</a> | ||
- <a href="https://github.com/Azure/azure-sdk-tools/commit/@Startup.VersionHash">@Startup.VersionHash</a> | ||
</div> | ||
</footer> | ||
|
||
<environment include="Development"> | ||
<script src="~/lib/jquery/dist/jquery.js"></script> | ||
<script src="~/lib/jquery/dist/jquery.sticky-sidebar.js"></script> | ||
<script src="~/lib/ResizeSensor/dist/ResizeSensor.js"></script> | ||
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.js"></script> | ||
<script src="~/lib/mark/dist/jquery.mark.js"></script> | ||
</environment> | ||
<environment exclude="Development"> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js" | ||
asp-fallback-src="~/lib/jquery/dist/jquery.min.js" | ||
asp-fallback-test="window.jQuery" | ||
crossorigin="anonymous" | ||
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="> | ||
</script> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" | ||
asp-fallback-src="~/lib/mark/dist/jquery.mark.min.js" | ||
crossorigin="anonymous"> | ||
</script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.sticky-sidebar.min.js" | ||
crossorigin="anonymous"> | ||
</script> | ||
@*The ResizeSensor is used by the sticky-sidebar to handle resizing content.*@ | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/ResizeSensor.min.js" | ||
crossorigin="anonymous"> | ||
</script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" | ||
asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js" | ||
asp-fallback-test="window.bootstrap" | ||
crossorigin="anonymous" | ||
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"> | ||
</script> | ||
</environment> | ||
<!-- Soma Select --> | ||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.sumoselect/3.1.6/jquery.sumoselect.min.js" crossorigin="anonymous"></script> | ||
<!-- UnderScoreJs--> | ||
<script src="https://cdn.jsdelivr.net/npm/underscore@stable/underscore-umd-min.js" | ||
crossorigin="anonymous"> | ||
</script> | ||
</script> | ||
<script src="~/main.js" asp-append-version="true"></script> | ||
|
||
@RenderSection("Scripts", required: false) | ||
</body> | ||
</html> |