Skip to content

Commit 3a18689

Browse files
authored
Fix for issues with root page styling (#10193)
We only have [custom styles](https://github.com/NuGet/NuGetGallery/blob/f1434e76555bf7c8f8b29b0e9a7d08f1f1b76982/src/Bootstrap/less/theme/base.less#L624-L636) for when `id="/"`, no need to have it specified in any other case. Also fixes incorrect styling when query parameters are present for the root page.
1 parent f1434e7 commit 3a18689

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/NuGetGallery/Views/Shared/Gallery/Layout.cshtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
@ViewHelpers.ReleaseMeta()
6464
@ViewHelpers.InstrumentationScript(ViewBag)
6565
</head>
66-
<body id=@Url.Current()>
66+
<body @{if (Request.Url.GetComponents(UriComponents.Path, UriFormat.UriEscaped) == "") { <text>id="/"</text> } }>
6767
@Html.Partial("Gallery/Header")
6868
<div id="skippedToContent">
6969
@RenderBody()
@@ -73,4 +73,4 @@
7373
@Scripts.Render("~/Scripts/gallery/site.min.js")
7474
@RenderSection("BottomScripts", required: false)
7575
</body>
76-
</html>
76+
</html>

0 commit comments

Comments
 (0)