Skip to content

Commit f169e99

Browse files
authored
Merge pull request #22043 from sftim/20200624_update_documentation_section_page_headers
Remove hero header from documentation section
2 parents 6783d77 + 63cbc7c commit f169e99

File tree

7 files changed

+34
-12
lines changed

7 files changed

+34
-12
lines changed

assets/scss/_base.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -832,3 +832,16 @@ section#cncf {
832832
font-size: 1rem;
833833
}
834834
}
835+
836+
/* DOCUMENTATION */
837+
838+
body.td-documentation {
839+
header > .header-filler {
840+
height: $hero-padding-top;
841+
background-color: black;
842+
}
843+
/* Special case for if an announcement is active */
844+
header section#announcement ~ .header-filler {
845+
display: none;
846+
}
847+
}

assets/scss/_custom.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,3 +497,18 @@ section#announcement ~ .header-hero {
497497
margin: #{$announcement-size-adjustment / 2} 0;
498498
}
499499
}
500+
501+
/* DOCUMENTATION */
502+
503+
/* Don't show lead text */
504+
body.td-documentation {
505+
main {
506+
@media only screen {
507+
> * {
508+
> .lead:first-of-type {
509+
display: none;
510+
}
511+
}
512+
}
513+
}
514+
}

content/en/docs/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
---
2+
linktitle: Kubernetes Documentation
23
title: Documentation
34
---

layouts/docs/baseof.html

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,7 @@
88
<header>
99
{{ partial "navbar.html" . }}
1010
{{ partial "announcement.html" . }}
11-
<section class="header-hero text-center text-white font-bold pb-4">
12-
<h1>
13-
{{ $sectionHeading := .Site.GetPage "section" .Section }}
14-
{{ with $sectionHeading }}
15-
{{ .Title }}
16-
{{ end }}
17-
</h1>
18-
</section>
11+
<div class="header-filler"></div>
1912
</header>
2013
<div class="container-fluid td-outer">
2114
<div class="td-main">

layouts/partials/header.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<ul class="global-nav">
88
{{ $sections := slice "docs" "blog" "training" "partners" "community" "case-studies" }}
99
{{ range $sections }}
10-
{{ with site.GetPage "section" . }}<li><a href="{{ .RelPermalink }}"{{ if eq .Section $.Section }} class="active"{{ end}} data-proofer-ignore>{{ .LinkTitle }}</a></li>{{ end }}
10+
{{ with site.GetPage "section" . }}<li><a href="{{ .RelPermalink }}"{{ if eq .Section $.Section }} class="active"{{ end}} data-proofer-ignore>{{ .Title }}</a></li>{{ end }}
1111
{{ end }}
1212
{{/* Link directly to documentation etc., if possible. */}}
1313
{{ $langPage := cond (gt (len .Translations) 0) . site.Home }}

layouts/partials/navbar.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{{ with site.GetPage "section" . }}
1111
<li class="nav-item mr-2 mb-lg-0">
1212
{{ $active := eq .Section $.Section }}
13-
<a class="nav-link{{if $active }} active{{end}}" href="{{ .RelPermalink }}" >{{ .LinkTitle }}</span></a>
13+
<a class="nav-link{{if $active }} active{{end}}" href="{{ .RelPermalink }}" >{{ .Title }}</span></a>
1414
</li>
1515
{{ end }}
1616
{{ end }}

layouts/partials/sidebar-tree.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@
2626
{{ $show := or (eq $s $p.FirstSection) (and (not $p.Site.Params.ui.sidebar_menu_compact) ($p.IsDescendant $s)) }}
2727
{{ $sid := $s.RelPermalink | anchorize }}
2828
<ul class="td-sidebar-nav__section pr-md-3">
29+
{{ if (ne $s.File.Path "docs/_index.md") }}
2930
<li class="td-sidebar-nav__section-title">
3031
<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">
31-
{{ if not (eq $s.LinkTitle "Documentation") }}
3232
{{ $s.LinkTitle }}
33-
{{ end }}
3433
</a>
3534
</li>
35+
{{ end }}
3636
<ul>
3737
<li class="collapse {{ if $show }}show{{ end }}" id="{{ $sid }}">
3838
{{ $pages := where (union $s.Pages $s.Sections).ByWeight ".Params.toc_hide" "!=" true }}

0 commit comments

Comments
 (0)