Merge pull request #47411 from sftim/20240808_docsy_friendly_deprecation_warnings

Revise deprecation warnings to be more Docsy friendly
This commit is contained in:
Kubernetes Prow Robot 2024-08-29 09:10:30 +01:00 committed by GitHub
commit fd98767e14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 12 additions and 9 deletions

View File

@ -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>

View File

@ -12,6 +12,7 @@ have blog posts -->
{{ $pageGroups := $pag.PageGroups}}
{{ if eq $pag.PageNumber 1 }}
{{ end }}
{{ partial "deprecation-warning.html" . }}
<div class="row">
<div class="col-12">
{{ range $pageGroups }}

4
layouts/blog/single.html Normal file
View File

@ -0,0 +1,4 @@
{{ define "main" }}
{{ partial "deprecation-warning.html" . }}
{{ .Render "content" }}
{{ end }}

View File

@ -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 }}

View File

@ -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">

View File

@ -6,6 +6,7 @@
{{- end -}}
{{- end -}}
<div class="td-content">
{{- partial "deprecation-warning.html" . -}}
{{ $hasContent := false }}
{{ with .File }}
{{ if ne .Filename "" }}

View File

@ -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 }}
@ -10,6 +11,6 @@
</div>
{{ end }}
{{ end }}
</div>
</div>
{{ end }}
{{ end }}

View File

@ -1,4 +1,5 @@
{{ define "main" }}
{{ partial "deprecation-warning.html" . }}
<div class="td-content">
{{- if .HasShortcode "kat-button" -}}
<div class="pageinfo pageinfo-secondary">

View File

@ -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>
@ -11,7 +11,7 @@
</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>