Skip to content

Commit 932f324

Browse files
author
Tim Bannister
committed
Revise deprecation warnings
Ready the deprecation warning mechanism for when we want to align with upstream Docsy.
1 parent 8575f42 commit 932f324

File tree

7 files changed

+11
-6
lines changed

7 files changed

+11
-6
lines changed

layouts/blog/single.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{{ define "main" }}
2+
{{ partial "deprecation-warning.html" . }}
3+
{{ .Render "content" }}
4+
{{ end }}

layouts/docs/baseof.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@
2424
<!--main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main"-->
2525
<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 }}>
2626
{{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }}
27-
{{ block "deprecated" . }}
28-
{{ partial "deprecation-warning.html" . }}
29-
{{ end }}
3027
{{ block "outdated_content" . }}
3128
{{ partial "docs/outdated_content.html" . }}
3229
{{ end }}

layouts/docs/glossary.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
{{ end }}
44

55
{{ define "main" }}
6+
{{ partial "deprecation-warning.html" . }}
67
<h1>{{ .Title }}</h1>
78
{{- with resources.Get "css/glossary.css" -}}
89
<link href="{{ .RelPermalink }}" rel="stylesheet">

layouts/docs/list.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
{{- end -}}
77
{{- end -}}
88
<div class="td-content">
9+
{{- partial "deprecation-warning.html" . -}}
910
{{ $hasContent := false }}
1011
{{ with .File }}
1112
{{ if ne .Filename "" }}

layouts/docs/release-info.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
{{ if not .Site.Params.deprecated }}
33
{{ .Content }}
44
{{ else }}
5+
{{ partial "deprecation-warning.html" . }}
56
<div class="section-index">
67
{{ range where .Site.Pages "Section" "releases" }}
78
{{ if not .IsNode }}
@@ -10,6 +11,6 @@ <h5><a href="{{ .RelPermalink }}">{{ .Title }}</a></h5>
1011
</div>
1112
{{ end }}
1213
{{ end }}
13-
</div>
14+
</div>
1415
{{ end }}
1516
{{ end }}

layouts/docs/single.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{{ define "main" }}
2+
{{ partial "deprecation-warning.html" . }}
23
<div class="td-content">
34
{{ partial "docs/content-page" (dict "ctx" . "page" .) }}
45
<!-- Partial "docs/api-reference-links" determines API reference links for 'partial/page-meta-links.html' -->

layouts/partials/deprecation-warning.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{ if (.Site.Param "deprecated") }}
22
<section id="deprecation-warning">
3-
<div class="content deprecation-warning pageinfo">
3+
<div class="deprecation-warning {{ if $.IsHome }}home-pageinfo{{else}}pageinfo{{ end }}">
44
<h3>
55
{{ T "deprecation_title" }} {{ .Param "version" }}
66
</h3>
@@ -11,7 +11,7 @@ <h3>
1111
</section>
1212
{{ else if and (eq .Section "blog") (not .Params.evergreen) .Date (.Date.Before (now.AddDate -1 0 0)) -}}
1313
<section id="deprecation-warning">
14-
<div class="content deprecation-warning pageinfo outdated-blog">
14+
<div class="deprecation-warning pageinfo outdated-blog">
1515
<p>{{ T "outdated_blog__message" }}</p>
1616
</div>
1717
</section>

0 commit comments

Comments
 (0)