Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📖 Add header to clarify that book-v3 is legacy documentation #3951

Merged
merged 2 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions docs/book/theme/css/custom.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,30 @@
.menu-title img {
vertical-align: bottom;
}

#notice-bar {
background: var(--bg);
padding: 1em;
margin-left: calc(-1 * var(--page-padding));
margin-right: calc(-1 * var(--page-padding));
margin-bottom: 1em;

border-bottom: 1px solid var(--table-border-color);
box-shadow: 0 1px 5px 0 var(--table-border-color);
}

#notice-bar * {
color: var(--fg);
}

#notice-bar a {
text-decoration: none;
}

#notice-bar a:not(.header) {
color: var(--links);
}

#notice-bar h2 {
margin-top: 0;
}
3 changes: 3 additions & 0 deletions docs/book/theme/header.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<header id="notice-bar">
<h2>Viewing legacy documentation for Kubebuilder, check out the <a href="https://book.kubebuilder.io">latest</a> documentation instead.</h2>
</header>
5 changes: 4 additions & 1 deletion docs/book/theme/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@
<i class="fa fa-book"></i>
</button>
<div class="version-dropdown-content">
<a href="https://book.kubebuilder.io/"target="_blank" rel="noopener noreferrer">v3-book</a>
<a href="https://book.kubebuilder.io/"target="_blank" rel="noopener noreferrer">latest (V4x)</a>
<a href="https://book-v3.book.kubebuilder.io/"target="_blank" rel="noopener noreferrer">v3-book</a>
<a href="https://book-v2.book.kubebuilder.io/"target="_blank" rel="noopener noreferrer">v2-book</a>
<a href="https://book-v1.book.kubebuilder.io/"target="_blank" rel="noopener noreferrer">v1-book</a>
</div>
Expand All @@ -158,6 +159,8 @@
</div>
</div>

{{> header}}

{{#if search_enabled}}
<div id="search-wrapper" class="hidden">
<form id="searchbar-outer" class="searchbar-outer">
Expand Down
Loading