Skip to content

Commit

Permalink
Merge pull request kubernetes#47411 from sftim/20240808_docsy_friendl…
Browse files Browse the repository at this point in the history
…y_deprecation_warnings

Revise deprecation warnings to be more Docsy friendly
  • Loading branch information
k8s-ci-robot authored Aug 29, 2024
2 parents 98861dd + 3346b60 commit fd98767
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 9 deletions.
3 changes: 0 additions & 3 deletions layouts/blog/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
<main class="col-12 col-md-9 col-xl-8 pl-md-5 pr-md-4" role="main"
{{ if .IsPage }}data-pagefind-body data-pagefind-meta="date:{{ $.Date.Format "2006-01-02" }}"{{ end }}
><!-- inside main element -->
{{ block "deprecated" . }}
{{ partial "deprecation-warning.html" . }}
{{ end }}
{{ with .CurrentSection.OutputFormats.Get "rss" -}}
<a class="btn btn-lg -bg-orange td-rss-button d-none d-lg-block" href="{{ .Permalink | safeURL }}" target="_blank">
RSS <i class="fa fa-rss ml-2 "></i>
Expand Down
1 change: 1 addition & 0 deletions layouts/blog/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
{{ $pageGroups := $pag.PageGroups}}
{{ if eq $pag.PageNumber 1 }}
{{ end }}
{{ partial "deprecation-warning.html" . }}
<div class="row">
<div class="col-12">
{{ range $pageGroups }}
Expand Down
4 changes: 4 additions & 0 deletions layouts/blog/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{{ define "main" }}
{{ partial "deprecation-warning.html" . }}
{{ .Render "content" }}
{{ end }}
3 changes: 0 additions & 3 deletions layouts/docs/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
<!--main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main"-->
<main role="main" class="col-xl-8" {{ if ne .Params.cid "docsHome" }}data-pagefind-body{{ end }}{{ if (and .IsPage .Params.description ) }} data-pagefind-meta="description:{{ .Params.description }}"{{ end }}>
{{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }}
{{ block "deprecated" . }}
{{ partial "deprecation-warning.html" . }}
{{ end }}
{{ block "outdated_content" . }}
{{ partial "docs/outdated_content.html" . }}
{{ end }}
Expand Down
1 change: 1 addition & 0 deletions layouts/docs/glossary.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{{ end }}

{{ define "main" }}
{{ partial "deprecation-warning.html" . }}
<h1>{{ .Title }}</h1>
{{- with resources.Get "css/glossary.css" -}}
<link href="{{ .RelPermalink }}" rel="stylesheet">
Expand Down
1 change: 1 addition & 0 deletions layouts/docs/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
{{- end -}}
{{- end -}}
<div class="td-content">
{{- partial "deprecation-warning.html" . -}}
{{ $hasContent := false }}
{{ with .File }}
{{ if ne .Filename "" }}
Expand Down
3 changes: 2 additions & 1 deletion layouts/docs/release-info.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{{ if not .Site.Params.deprecated }}
{{ .Content }}
{{ else }}
{{ partial "deprecation-warning.html" . }}
<div class="section-index">
{{ range where .Site.Pages "Section" "releases" }}
{{ if not .IsNode }}
Expand All @@ -10,6 +11,6 @@ <h5><a href="{{ .RelPermalink }}">{{ .Title }}</a></h5>
</div>
{{ end }}
{{ end }}
</div>
</div>
{{ end }}
{{ end }}
1 change: 1 addition & 0 deletions layouts/docs/single.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{ define "main" }}
{{ partial "deprecation-warning.html" . }}
<div class="td-content">
{{- if .HasShortcode "kat-button" -}}
<div class="pageinfo pageinfo-secondary">
Expand Down
4 changes: 2 additions & 2 deletions layouts/partials/deprecation-warning.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ if (.Site.Param "deprecated") }}
<section id="deprecation-warning">
<div class="content deprecation-warning pageinfo">
<div class="deprecation-warning {{ if $.IsHome }}home-pageinfo{{else}}pageinfo{{ end }}">
<h3>
{{ T "deprecation_title" }} {{ .Param "version" }}
</h3>
Expand All @@ -11,7 +11,7 @@ <h3>
</section>
{{ else if and (eq .Section "blog") (not .Params.evergreen) .Date (.Date.Before (now.AddDate -1 0 0)) -}}
<section id="deprecation-warning">
<div class="content deprecation-warning pageinfo outdated-blog">
<div class="deprecation-warning pageinfo outdated-blog">
<p>{{ T "outdated_blog__message" }}</p>
</div>
</section>
Expand Down

0 comments on commit fd98767

Please sign in to comment.