Merge pull request #22043 from sftim/20200624_update_documentation_section_page_headers

Remove hero header from documentation section
pull/23228/head
Kubernetes Prow Robot 2020-08-18 09:15:31 -07:00 committed by GitHub
commit f169e99fee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 34 additions and 12 deletions

View File

@ -832,3 +832,16 @@ section#cncf {
font-size: 1rem;
}
}
/* DOCUMENTATION */
body.td-documentation {
header > .header-filler {
height: $hero-padding-top;
background-color: black;
}
/* Special case for if an announcement is active */
header section#announcement ~ .header-filler {
display: none;
}
}

View File

@ -497,3 +497,18 @@ section#announcement ~ .header-hero {
margin: #{$announcement-size-adjustment / 2} 0;
}
}
/* DOCUMENTATION */
/* Don't show lead text */
body.td-documentation {
main {
@media only screen {
> * {
> .lead:first-of-type {
display: none;
}
}
}
}
}

View File

@ -1,3 +1,4 @@
---
linktitle: Kubernetes Documentation
title: Documentation
---

View File

@ -8,14 +8,7 @@
<header>
{{ partial "navbar.html" . }}
{{ partial "announcement.html" . }}
<section class="header-hero text-center text-white font-bold pb-4">
<h1>
{{ $sectionHeading := .Site.GetPage "section" .Section }}
{{ with $sectionHeading }}
{{ .Title }}
{{ end }}
</h1>
</section>
<div class="header-filler"></div>
</header>
<div class="container-fluid td-outer">
<div class="td-main">

View File

@ -7,7 +7,7 @@
<ul class="global-nav">
{{ $sections := slice "docs" "blog" "training" "partners" "community" "case-studies" }}
{{ range $sections }}
{{ with site.GetPage "section" . }}<li><a href="{{ .RelPermalink }}"{{ if eq .Section $.Section }} class="active"{{ end}} data-proofer-ignore>{{ .LinkTitle }}</a></li>{{ end }}
{{ with site.GetPage "section" . }}<li><a href="{{ .RelPermalink }}"{{ if eq .Section $.Section }} class="active"{{ end}} data-proofer-ignore>{{ .Title }}</a></li>{{ end }}
{{ end }}
{{/* Link directly to documentation etc., if possible. */}}
{{ $langPage := cond (gt (len .Translations) 0) . site.Home }}

View File

@ -10,7 +10,7 @@
{{ with site.GetPage "section" . }}
<li class="nav-item mr-2 mb-lg-0">
{{ $active := eq .Section $.Section }}
<a class="nav-link{{if $active }} active{{end}}" href="{{ .RelPermalink }}" >{{ .LinkTitle }}</span></a>
<a class="nav-link{{if $active }} active{{end}}" href="{{ .RelPermalink }}" >{{ .Title }}</span></a>
</li>
{{ end }}
{{ end }}

View File

@ -26,13 +26,13 @@
{{ $show := or (eq $s $p.FirstSection) (and (not $p.Site.Params.ui.sidebar_menu_compact) ($p.IsDescendant $s)) }}
{{ $sid := $s.RelPermalink | anchorize }}
<ul class="td-sidebar-nav__section pr-md-3">
{{ if (ne $s.File.Path "docs/_index.md") }}
<li class="td-sidebar-nav__section-title">
<a href="{{ $s.RelPermalink }}" class="align-left pl-0 pr-2{{ if not $show }} collapsed{{ end }}{{ if $active}} active{{ end }} td-sidebar-link td-sidebar-link__section">
{{ if not (eq $s.LinkTitle "Documentation") }}
{{ $s.LinkTitle }}
{{ end }}
</a>
</li>
{{ end }}
<ul>
<li class="collapse {{ if $show }}show{{ end }}" id="{{ $sid }}">
{{ $pages := where (union $s.Pages $s.Sections).ByWeight ".Params.toc_hide" "!=" true }}