Support third party disclaimers about vendors

Add support for a third party disclaimer about vendor docs, even where
the things we link to are not necessary for Kubernetes to function.
pull/43176/head
Tim Bannister 2024-01-28 23:27:16 +00:00
parent 04d4ef4b5c
commit cd434ba5f2
2 changed files with 10 additions and 2 deletions

View File

@ -541,10 +541,13 @@ other="""Third party content advice"""
[thirdparty_message_single_item] [thirdparty_message_single_item]
other = """&#128711; This item links to a third party project or product that is not part of Kubernetes itself. <a class="alert-more-info" href="#third-party-content-disclaimer">More information</a>""" other = """&#128711; This item links to a third party project or product that is not part of Kubernetes itself. <a class="alert-more-info" href="#third-party-content-disclaimer">More information</a>"""
[thirdparty_message_disclaimer] [thirdparty_message_disclaimer]
other = """<p>Items on this page refer to third party products or projects that provide functionality required by Kubernetes. The Kubernetes project authors aren't responsible for those third-party products or projects. See the <a href="https://github.com/cncf/foundation/blob/master/website-guidelines.md" target="_blank">CNCF website guidelines</a> for more details.</p><p>You should read the <a href="/docs/contribute/style/content-guide/#third-party-content">content guide</a> before proposing a change that adds an extra third-party link.</p>""" other = """<p>Items on this page refer to third party products or projects that provide functionality required by Kubernetes. The Kubernetes project authors aren't responsible for those third-party products or projects. See the <a href="https://github.com/cncf/foundation/blob/master/website-guidelines.md" target="_blank">CNCF website guidelines</a> for more details.</p><p>You should read the <a href="/docs/contribute/style/content-guide/#third-party-content">content guide</a> before proposing a change that adds an extra third-party link.</p>"""
[thirdparty_message_vendor]
other = """Items on this page refer to vendors external to Kubernetes. The Kubernetes project authors aren't responsible for those third-party products or projects. To add a vendor, product or project to this list, read the <a href="/docs/contribute/style/content-guide/#third-party-content">content guide</a> before submitting a change. <a href="#third-party-content-disclaimer">More information.</a>"""
[ui_search_placeholder] [ui_search_placeholder]
other = "Search this site" other = "Search this site"

View File

@ -1,8 +1,13 @@
{{- $single := .Get "single" | default "false" -}} {{- $single := .Get "single" | default "false" -}}
{{- $vendor_message := .Get "vendor" | default "false" -}}
<div class="alert alert-secondary callout third-party-content" role="alert"> <div class="alert alert-secondary callout third-party-content" role="alert">
{{- if not (eq $single "true" ) -}} {{- if not (eq $single "true" ) -}}
<strong>{{ T "note" | safeHTML }}</strong> <strong>{{ T "note" | safeHTML }}</strong>
{{ T "thirdparty_message" | safeHTML }} {{- if (eq $vendor_message "true" ) -}}
{{ T "thirdparty_message_vendor" | safeHTML }}
{{- else -}}
{{ T "thirdparty_message" | safeHTML }}
{{- end -}}
{{- else -}} {{- else -}}
{{ T "thirdparty_message_single_item" | safeHTML }} {{ T "thirdparty_message_single_item" | safeHTML }}
{{- end -}} {{- end -}}