diff --git a/docs/book/book.toml b/docs/book/book.toml index 0dc3a87c8c0..c6244a05df3 100644 --- a/docs/book/book.toml +++ b/docs/book/book.toml @@ -7,7 +7,7 @@ title = "The Kubebuilder Book" [output.html] google-analytics = "UA-119864590-1" curly-quotes = true -additional-css = ["theme/css/markers.css", "theme/css/custom.css"] +additional-css = ["theme/css/markers.css", "theme/css/custom.css", "theme/css/version-dropdown.css"] git-repository-url = "https://github.com/kubernetes-sigs/kubebuilder" edit-url-template = "https://github.com/kubernetes-sigs/kubebuilder/edit/master/docs/book/{path}" diff --git a/docs/book/theme/css/version-dropdown.css b/docs/book/theme/css/version-dropdown.css new file mode 100644 index 00000000000..d3ac4edb0c6 --- /dev/null +++ b/docs/book/theme/css/version-dropdown.css @@ -0,0 +1,23 @@ +.version-dropdown-content { + display: none; + position: absolute; + background-color: #f9f9f9; + min-width: 90px; + box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2); + z-index: 1; + } + + .version-dropdown-content a { + color: black; + padding: 12px 16px; + text-decoration: none; + display: block; + } + + .version-dropdown-content a:hover { + background-color: #f1f1f1; + } + + .version-dropdown:hover .version-dropdown-content { + display: block; + } \ No newline at end of file diff --git a/docs/book/theme/index.hbs b/docs/book/theme/index.hbs index 51753a5047b..2ef47f11981 100644 --- a/docs/book/theme/index.hbs +++ b/docs/book/theme/index.hbs @@ -126,6 +126,17 @@ {{/if}} + +
+ +
+ v3-book + v2-book + v1-book +
+

{{ book_title }}