Revise deprecation warnings

Ready the deprecation warning mechanism for when we want to align with
upstream Docsy.
This commit is contained in:
Tim Bannister 2024-03-12 23:41:24 +00:00
parent 8575f4241b
commit 932f32412c
7 changed files with 11 additions and 6 deletions

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">
{{ partial "docs/content-page" (dict "ctx" . "page" .) }}
<!-- Partial "docs/api-reference-links" determines API reference links for 'partial/page-meta-links.html' -->

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>