Skip to content

Commit c7ee5d7

Browse files
author
Tim Bannister
committed
Remove hero header from documentation section
1 parent 7b2d09a commit c7ee5d7

File tree

6 files changed

+33
-11
lines changed

6 files changed

+33
-11
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
@@ -421,3 +421,18 @@ section#announcement ~ .header-hero {
421421
margin: #{$announcement-size-adjustment / 2} 0;
422422
}
423423
}
424+
425+
/* DOCUMENTATION */
426+
427+
/* Don't show lead text */
428+
body.td-documentation {
429+
main {
430+
@media only screen {
431+
> * {
432+
> .lead:first-of-type {
433+
display: none;
434+
}
435+
}
436+
}
437+
}
438+
}

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: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,11 @@
44
{{ partial "head.html" . }}
55
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
66
</head>
7-
<body class="td-{{ .Kind }}">
7+
<body class="td-{{ .Kind }} td-documentation">
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 }}

0 commit comments

Comments
 (0)