Skip to content

Commit 8a73630

Browse files
author
Tim Bannister
committed
Revise third-party content warning
1 parent 92d8d1e commit 8a73630

File tree

5 files changed

+31
-4
lines changed

5 files changed

+31
-4
lines changed

data/i18n/en/en.toml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,17 @@ other = "Subscribe"
217217
other = "Synopsis"
218218

219219
[thirdparty_message]
220-
other = """This section links to third party projects that provide functionality required by Kubernetes. The Kubernetes project authors aren't responsible for these projects. This page follows <a href="https://github.com/cncf/foundation/blob/master/website-guidelines.md" target="_blank">CNCF website guidelines</a> by listing projects alphabetically. To add a project to this list, read the <a href="/docs/contribute/style/content-guide/#third-party-content">content guide</a> before submitting a change."""
220+
other = """This section links to third party projects that provide functionality required by Kubernetes. The Kubernetes project authors aren't responsible for these projects, which are listed alphabetically. To add a 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>"""
221+
222+
[thirdparty_message_edit_disclaimer]
223+
other="""Third party content advice"""
224+
225+
226+
[thirdparty_message_single_item]
227+
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>"""
228+
229+
[thirdparty_message_disclaimer]
230+
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>"""
221231

222232
[ui_search_placeholder]
223233
other = "Search"

layouts/docs/baseof.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
{{ partial "deprecation-warning.html" . }}
2323
{{ end }}
2424
{{ block "main" . }}{{ end }}
25+
{{- if .HasShortcode "thirdparty-content" -}}
26+
{{ block "thirdparty-disclaimer" . }}
27+
{{ partial "docs/thirdparty-disclaimer.html" . }}
28+
{{- end -}}
29+
{{- end -}}
2530
{{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }}
2631
{{ partial "feedback.html" .Site.Params.ui.feedback }}
2732
{{ end }}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<div class="pageinfo pageinfo-secondary" id="third-party-content-disclaimer">
2+
{{ T "thirdparty_message_disclaimer" | safeHTML }}
3+
</div>

layouts/partials/page-meta-links.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424

2525
{{ if not (.Param "auto_generated") }}
2626
<a href="{{ $editURL }}" target="_blank"><i class="fa fa-edit fa-fw"></i> {{ T "post_edit_this" }}</a>
27+
{{- if .HasShortcode "thirdparty-content" -}}
28+
<a href="#third-party-content-disclaimer" class="third-party-disclaimer-link"><i class="fa fa-icon-circle fa-fw"></i> {{ T "thirdparty_message_edit_disclaimer" | safeHTML }}</a>
29+
{{- end }}
30+
2731
<a href="{{ $newPageURL }}" target="_blank"><i class="fa fa-edit fa-fw"></i> {{ T "post_create_child_page" }}</a>
2832
{{ end }}
2933

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
<blockquote class="callout caution" role="alert">
2-
<strong>{{ T "caution" | safeHTML }}</strong>
1+
{{- $single := .Get "single" | default "false" -}}
2+
<div class="alert alert-secondary callout third-party-content" role="alert">
3+
{{- if not (eq $single "true" ) -}}
4+
<strong>{{ T "note" | safeHTML }}</strong>
35
{{ T "thirdparty_message" | safeHTML }}
4-
</blockquote>
6+
{{- else -}}
7+
{{ T "thirdparty_message_single_item" | safeHTML }}
8+
{{- end -}}
9+
</div>

0 commit comments

Comments
 (0)