Revise the Kubernetes website to use Docsy (#20874)

* Add Docsy, required packages and config

* Apply Docsy integration work to k8s website

This encompasses significant changes to the style system, layout files,
as well as changes to some of the static assets. To examine this work
and the iterations that were performed, the original repository can be
found at https://github.com/gearbox-built/kubernetes-hugo.git

* Address issues found in review

The styling and positioning of the header, footer, some shortcodes and
main container elements are improved. A new partial is added for
favicons. The sidebars, as well as inner table of contents, have been
altered for better positioning and rendering of content. Localization
has also been addressed.

* Enable announcements

The recent Black Lives Matter announcement surfaced issues which have
been addressed.
This commit is contained in:
Aidan Ranney
2020-06-15 12:09:57 -07:00
committed by GitHub
parent 49ac273969
commit 0625ced466
72 changed files with 4174 additions and 992 deletions
File diff suppressed because it is too large Load Diff
+99
View File
@@ -0,0 +1,99 @@
// SASS for Case Studies pages go here:
hr
background-color: #999999
h2
margin-bottom: 15px !important
.subhead
padding-bottom: 2% !important
padding-top: 0% !important
.details
margin-left: 1.9%
padding-right: 5%
font-size: 16px !important
padding-bottom: 2% !important
.section1
margin-bottom: 3%
.cols
width: 80% !important
margin-left: 6.8%
padding-top: 1.5%
.col1
width: 52% !important
font-weight: 300 !important
.col2
width: 46% !important
.banner2text
width: 63%
padding-top: 10%
padding-left: 0% !important
float: initial !important
text-align: center
margin: 0 auto
position: relative
.banner3text, .banner4text, .banner5text
width: 63%
padding-left: 0% !important
float: initial !important
text-align: center
margin: 0 auto
position: relative
.fullcol
float: initial !important
body footer
background-color: #585858 !important
.section1
float: left !important
.banner1
padding-left: 11.9% !important
.banner2
float: initial !important
padding-bottom: 2% !important
footer
padding: 0% 7%
.banner4, .banner3, .banner5
float: initial !important
@media screen and (max-width: 910px)
.banner2text
width: 47%
padding-top: 45%
.details
margin-left: 0%
margin-bottom: 3%
.subhead
padding-bottom: 0% !important
padding-top: 0% !important
.banner3
width: 100% !important
@media screen and (max-width: 780px)
.section1 .cols
width: 100% !important
margin-left: 0%
padding-top: 5%
.col1, .col2
width: 100% !important
margin-left: 0% !important
.fullcol
width: 90% !important
margin-left: 5% !important
.banner1
padding-left: 10% !important
margin-bottom: 6% !important
.banner2text
padding-top: 60% !important
padding-bottom: 2% !important
+304
View File
@@ -0,0 +1,304 @@
$main-max-width: 1200px
$vendor-strip-height: 44px
$video-section-height: 550px
@media screen and (min-width: 1100px)
#hamburger
display: none
ul.global-nav
display: inline-block
#docs #vendorStrip #searchBox:before
top: 15px
#vendorStrip
height: $vendor-strip-height
line-height: $vendor-strip-height
li
a.YAH
&:after
content: ""
display: block
position: absolute
left: 0
bottom: 0
width: 100%
height: 4px
background-color: $blue
#searchBox
float: right
#home
#hero
#vendorStrip
display: block
#docs
#hero
h1, h5
text-align: left
#vendorStrip
ul
float: left
#searchBox
float: right
width: 250px
#search
vertical-align: middle
.flyout-button
display: none
.logo
position: relative
float: left
display: block
width: 180px
height: 88px
top: 0
left: 0
transform: none
background-image: url(../images/nav_logo.svg)
&.flip-nav, &.open-nav
.logo
background-image: url(../images/nav_logo2.svg)
#encyclopedia
padding: 50px 50px 100px 100px
clear: both
#docsToc
position: relative
float: left
padding: 0 20px
left: 0
width: 350px
z-index: auto
.push-menu-close-button
display: none
#docsContent
width: calc(100% - 400px)
#editPageButton
right: -25px
section, header, footer
.main-section
max-width: $main-max-width
header, #vendorStrip, #encyclopedia, #hero h1, #hero h5, #docs #hero h1, #docs #hero h5,
#community #hero h1, .gridPage #hero h1, #community #hero h5, .gridPage #hero h5
padding-left: 100px
padding-right: 100px
#vendorStrip
padding-right: 10px
#home
section, header
.main-section
max-width: 1000px
#oceanNodes
.main-section
position: relative
max-width: 830px
&:nth-child(1)
max-width: 1000px
padding-right: 475px
h3, p
text-align: left
.image-wrapper
position: absolute
max-width: 48%
transform: translateY(-50%)
img
width: 425px
//.content
// width: 50%
#video
height: $video-section-height
position: relative
background-position: center center
background-size: cover
#talkToUs
h4
br
display: block
#bigSocial
div
width: calc(25% - 18px)
div + div
margin-left: 20px
//
//div:nth-child(3), div:nth-child(4)
// margin-top: 0
//#home #bigSocial
// div
// width: calc(33% - 15px)
//
// div:nth-child(3)
// margin-top: inherit
// FOOTER
footer
width: 100%
background-image: url(../images/texture.png)
background-color: $dark-grey
.main-section
padding: 20px 0
nav
overflow: hidden
margin-bottom: 20px
display: flex
justify-content: space-between
a
width: auto
float: left
font-size: 24px
font-weight: 300
white-space: nowrap
.social
padding: 0
max-width: 1200px
div
float: left
div:last-child
float: right
#search, #wishField
background-color: transparent
padding: 10px
font-size: 16px
font-weight: 100
color: white
border: 1px solid white
transition: 0.3s
&:focus
background-color: $light-grey
color: $dark-grey
.social a
display: inline-block
background-image: url(../images/social_sprite.svg)
background-repeat: no-repeat
background-size: 350px
width: 50px
height: 50px
border-radius: 5px
margin-right: 10px
&:hover
background-color: #fff
span
position: absolute
display: block
height: 0
overflow: hidden
a.twitter
background-position: 0 0
&:hover
background-position: 0 100%
a.stack-overflow
background-position: -50px 0
&:hover
background-position: -50px 100%
a.slack
background-position: -100px 0
&:hover
background-position: -100px 100%
a.github
background-position: -150px 0
&:hover
background-position: -150px 100%
a.mailing-list
background-position: -200px 0
&:hover
background-position: -200px 100%
a.calendar
background-position: -250px 0
&:hover
background-position: -250px 100%
a.youtube
background-position: -300px 0
&:hover
background-position: -300px 100%
#community, .gridPage
#hero
text-align: left
h1
padding: 20px 100px
#tryKubernetes
width: auto
background-color: $blue
padding: 0 20px
#bigSocial
div
width: calc(25% - 18px)
#home #caseStudiesWrapper
div
width: 24%
min-height: 260px
@media screen and (min-width: 1300px)
#vendorStrip
padding-right: 100px
@media screen and (min-width: 456px)
#vendorStrip
li + li
margin-left: 20px
+61
View File
@@ -0,0 +1,61 @@
html, body
margin: 0
padding: 0
input, button
outline: none
button
cursor: pointer
ul, li
list-style: none
ul
margin: 0
padding: 0
a
text-decoration: none
// CONVENIENCE
.clear
display: block
clear: both
.light-text
color: white
.right
float: right
.left
float: left
.center
text-align: center
//mixins
@mixin fullScreen
position: fixed
top: 0
left: 0
width: 100vw
height: 100vh
@mixin pureCenter($left: 50%, $top: 50%)
position: absolute
top: $top
left: $left
transform: translate(-50%, -50%)
@mixin maintain-aspect-ratio ($width-factor: 16, $height-factor: 9, $target-width: 80vw, $target-height: 80vh)
width: $target-width
height: $target-width * ($height-factor / $width-factor)
max-width: $target-height * ($width-factor / $height-factor)
max-height: $target-height
+86
View File
@@ -0,0 +1,86 @@
h1
font-size: $h1-font-size
line-height: $h1-line-height
h2
font-size: $h2-font-size
line-height: $h2-line-height
h3
font-size: $h3-font-size
line-height: $h3-line-height
h4
font-size: $h4-font-size
line-height: $h4-line-height
h5
font-size: $h5-font-size
line-height: $h5-line-height
p
font-size: $p-font-size
line-height: $p-line-height
section, header, #vendorStrip
padding-left: $full-width-paddingX
padding-right: $full-width-paddingX
.main-section
width: $main-width
max-width: $main-max-width
header
height: $header-height
.nav-buttons
height: $header-height
line-height: $header-height
.button + *
margin-left: $nav-buttons-margin-left
#hamburger
width: $hamburger-size
height: $hamburger-size
#mainNav
padding: $main-nav-padding
h5
margin-bottom: $main-nav-h5-margin-bottom
h3
margin-bottom: $main-nav-h3-margin-bottom
.nav-box
width: $nav-box-width
.nav-box + .nav-box
margin-left: $nav-box-sibling-margin-left
.main-secton + .main-section
margin-top: $main-nav-main-sibling-margin-top
.left .button
height: $main-nav-left-button-size
line-height: $main-nav-left-button-size
font-size: $main-nav-left-button-font-size
.open-nav, .y-enough
#tryKubernetes
margin-left: $nav-buttons-margin-left
#hero
padding-top: $hero-padding-top
#docs
#hero
h1, h5
padding-left: $full-width-paddingX
padding-right: $full-width-paddingX
#vendorStrip
height: $vendor-strip-height
line-height: $vendor-strip-height
font-size: $vendor-strip-font-size
+25
View File
@@ -0,0 +1,25 @@
$blue: #3371e3
$light-grey: #f7f7f7
$dark-grey: #303030
$medium-grey: #4c4c4c
$white: #ffffff
$base-font: 'Roboto', sans-serif
$mono-font: 'Roboto Mono', monospace
*, .button
box-sizing: border-box
font-family: $base-font
background: none
margin: 0
border: 0
body
font-family: $base-font
h1, h2, h5, p
font-weight: 300
h3, h4
font-weight: 400
+250
View File
@@ -0,0 +1,250 @@
// TEXT
//$h1-font-size: 60px
//$h1-line-height: 80px
//
//$h2-font-size: 42px
//$h2-line-height: 60px
//
//$h3-font-size: 26px
//$h3-line-height: 32px
//
//$h4-font-size: 26px
//$h4-line-height: 40px
//
//$h5-font-size: 18px
//$h5-line-height: 36px
//
//$p-font-size: 20px
//$p-line-height: 28px
// header
$full-width-paddingX: 20px
$main-width: 100%
$main-max-width: 100%
$header-height: 80px
$logo-width: 180px
$nav-buttons-margin-left: 30px
$hamburger-size: 50px
// main nav
$main-nav-padding: 140px 0 30px
$main-nav-h5-margin-bottom: 1em
$main-nav-h3-margin-bottom: 0.6em
$nav-box-width: 20%
$nav-box-sibling-margin-left: calc(20% / 3)
$main-nav-main-sibling-margin-top: 60px
$main-nav-left-button-size: 50px
$main-nav-left-button-font-size: 18px
// hero
$hero-padding-top: 80px
$headline-wrapper-margin-bottom: 40px
$quickstart-button-padding: 0 50px
$vendor-strip-font-size: 16px
//video
$video-section-height: 400px
//features
$features-h3-margin-bottom: 40px
$feature-box-margin-bottom: 60px
$feature-box-div-margin-bottom: 0
$feature-box-div-width: 45%
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////
@media screen and (min-width: 750px)
@import "size"
p
font-size: 16px
line-height: 24px
letter-spacing: 0.1px
h1
font-size: 36px
line-height: 44px
h3
font-size: 28px
line-height: 36px
h4
font-size: 24px
line-height: 40px
#home
#viewDocs, #tryKubernetes
display: inline-block
#vendorStrip
display: block
text-align: center
img
max-height: 24px
vertical-align: middle
margin: 0 30px
#docs
#vendorStrip
li
a
font-size: 1em
font-weight: normal
li + li
margin-left: 60px
#oceanNodes
h3
text-align: left
margin-bottom: 18px
main, .main-section
position: relative
clear: both
display: table
height: 160px
.content
display: table-cell
position: relative
vertical-align: middle
.image-wrapper
position: absolute
top: 50%
max-width: 25%
max-height: 100%
transform: translateY(-50%)
width: 100%
&:nth-child(odd)
padding-right: 210px
.image-wrapper
right: 0
text-align: right
&:nth-child(even)
padding-left: 210px
.image-wrapper
left: 0
text-align: left
&:nth-child(1)
padding-right: 0
h3, p
text-align: center
.image-wrapper
position: relative
display: block
float: none
max-width: 100%
transform: none
.content
display: block
img
width: 100%
#video
height: $video-section-height
display: block
& > .light-text
display: block
#mobileShowVideoButton
display: none
#features
padding-bottom: 60px
.feature-box
margin-bottom: 30px
&:last-child
margin-bottom: 0
h3
margin-bottom: $features-h3-margin-bottom
.feature-box
& > div
width: $feature-box-div-width
margin-bottom: $feature-box-div-margin-bottom
#talkToUs
#bigSocial
div
width: calc(50% - 15px)
div + div
margin-top: 0
div:nth-child(2)
margin-left: 20px
div:nth-child(3)
div:nth-child(4)
margin-left: 20px
a
display: inline-block
color: $blue
font-weight: 400
text-decoration: none
// FOOTER
footer
nav
text-align: center
a
width: auto
padding: 0 20px
.social
text-align: center
div
display: inline-block
div:last-child
display: block
margin: 0
span
display: inline-block
margin-right: 10px
input
text-align: left
#home #caseStudiesWrapper
div
width: 48%
+11
View File
@@ -0,0 +1,11 @@
@import "reset"
@import "skin"
// media queries
@import "base"
@import "tablet"
@import "desktop"
{{ if .Params.case_study_styles }}
@import "case-studies"
{{ end }}