content/static: fix sticky header margin on non-documentation pages

Fixes the margin of the sticky header on versions, licenses, imports
and imported by pages.

Change-Id: Ied69420bf5344a34a4b721e7a292831ac5e9ad33
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/306429
Trust: Jamal Carvalho <jamal@golang.org>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
This commit is contained in:
Jamal Carvalho 2021-03-31 18:43:39 -04:00
Родитель f4eaae47a1
Коммит 871013309a
2 изменённых файлов: 18 добавлений и 4 удалений

Просмотреть файл

@ -16,13 +16,25 @@
}
.UnitHeader-outer {
background-color: var(--white);
min-height: 13.0625rem;
min-height: 6.0625rem;
position: sticky;
top: -9.5rem;
top: -2.5rem;
z-index: 100;
}
.UnitHeader-outer--main {
min-height: 9.5625rem;
top: -6rem;
}
.UnitHeader-outer--main.UnitHeader-outer--package {
min-height: 13.0625rem;
top: -9.5rem;
}
@media only screen and (min-width: 64rem) {
.UnitHeader-outer {
.UnitHeader-outer--main {
min-height: 6.0625rem;
top: -2.5rem;
}
.UnitHeader-outer--main.UnitHeader-outer--package {
min-height: 6.0625rem;
top: -2.5rem;
}

Просмотреть файл

@ -9,7 +9,9 @@
{{define "unit_header"}}
{{template "unit_header_breadcrumbs" .}}
<div class="js-headerSentinel"></div>
<div class="UnitHeader-outer">
<div class="UnitHeader-outer
{{if .Unit.IsPackage}} UnitHeader-outer--package{{end}}
{{if eq .SelectedTab.Name ""}} UnitHeader-outer--main{{end}}">
<header class="UnitHeader UnitHeader--full js-unitHeader" role="complementary"
aria-label="{{if eq .PageType "std"}}module{{else}}{{.PageType}}{{end}} {{.Title}} information">
<div class="Site-margin UnitHeader-inner">