Skip to content

[release-1.26] Added Out-Of-Date Documentation Header for v1.24 #16521

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

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
1 change: 1 addition & 0 deletions assets/sass/_all.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

@import "misc/about";
@import "misc/analysis-message";
@import "misc/archive";
@import "misc/article";
@import "misc/banners";
@import "misc/blog";
Expand Down
18 changes: 18 additions & 0 deletions assets/sass/misc/_archive.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.archive-warning-banner {
background-color: #fff3cd;
color: #664d03;
padding: 1rem;
border-bottom: 1px solid #ffecb5;
text-align: center;

p {
margin-top: 0;
margin-bottom: 0;
}

a {
font-weight: bold;
text-decoration: underline;
color: #413002; // Making link slightly darker than banner text for better contrast/visibility
}
}
6 changes: 6 additions & 0 deletions i18n/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -385,3 +385,9 @@ other = "Go to solutions"

[case_study_slogan]
other = "Read case studies of companies that benefited from implementing Istio"

[archive_banner_text]
other = "⚠️ This documentation is for an older version (<strong>%s</strong>) and is no longer updated."

[archive_banner_link]
other = "Read the latest version."
6 changes: 6 additions & 0 deletions i18n/uk.toml
Original file line number Diff line number Diff line change
Expand Up @@ -386,3 +386,9 @@ other = "Перейти до рішень"

[case_study_slogan]
other = "Читайте приклади успішних прикладів використання Istio компаніями, які отримали вигоду від його впровадження"

[archive_banner_text]
other = "⚠️ Це документація для (застарілої) версії (<strong>%s</strong>), яка вже не підтримується."

[archive_banner_link]
other = "Читати останню версію."
6 changes: 6 additions & 0 deletions i18n/zh.toml
Original file line number Diff line number Diff line change
Expand Up @@ -384,3 +384,9 @@ other = "转到解决方案"

[case_study_slogan]
other = "阅读因实施 Istio 而受益的公司案例"

[archive_banner_text]
other = "⚠️ 此文档针对过时的版本 (<strong>%s</strong>),将不在维护和更新。"

[archive_banner_link]
other = "查看最新文档。"
9 changes: 9 additions & 0 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,15 @@

{{ partial "events.html" (dict "page" . "kind" "sticker") }}
{{ partial "header.html" . }}

<!-- Archived Documentation Header -->
{{ if and (eq .Section "docs") .Site.Data.args.archive}}
<div class="archive-warning-banner" role="alert">
{{ (printf (i18n "archive_banner_text") .Site.Data.args.version) | safeHTML }}
<a href="/latest{{ .RelPermalink | safeURL }}">{{ i18n "archive_banner_link" }}</a>
</div>
{{ end }}

{{ partial "events.html" (dict "page" . "kind" "banner") }}

{{ block "main" . }}{{ end }}
Expand Down