Skip to content

Commit 483a8ce

Browse files
author
Tim Bannister
committed
Align deprecation warnings more with Docsy
This change helps us prepare the site so we could serve it with near-vanilla Docsy.
1 parent 97cbae1 commit 483a8ce

File tree

12 files changed

+45
-42
lines changed

12 files changed

+45
-42
lines changed

assets/scss/_custom.scss

Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1183,38 +1183,27 @@ body.cid-community #cncf-code-of-conduct h2:after {
11831183
}
11841184
}
11851185

1186-
#caseStudies body > #deprecation-warning, body.cid-casestudies > #deprecation-warning, body.cid-community > #deprecation-warning {
1187-
display: inline-block;
1188-
vertical-align: top;
1189-
position: relative;
1190-
background-color: $primary;
1191-
color: #fff;
1186+
body.cid-casestudies, body.cid-community, body.cid-partners {
1187+
section#deprecation-warning {
11921188
padding: 0;
11931189
margin: 0;
11941190
width: 100%;
1191+
1192+
border-top: solid 1em $primary;
1193+
border-bottom: solid 1em $primary;
1194+
1195+
// Center the pageinfo
1196+
padding-left: calc(max(1rem, (100vw - 60rem) / 2));
1197+
padding-right: calc(max(1rem, (100vw - 60rem) / 2));
1198+
}
1199+
/* Ensure color overrides */
1200+
section#deprecation-warning, section#deprecation-warning > .pageinfo.deprecation-warning {
1201+
background-color: $primary;
1202+
color: #fff;
1203+
}
11951204
}
1196-
#caseStudies body > #deprecation-warning, body.cid-casestudies > #deprecation-warning {
1197-
padding-top: 32px;
1198-
}
1205+
11991206
body.cid-partners {
1200-
> #deprecation-warning {
1201-
padding: 0;
1202-
margin-right: 0;
1203-
margin-left: 0;
1204-
margin-top: 0;
1205-
width: 100vw;
1206-
> .content {
1207-
width: 100%;
1208-
max-width: initial;
1209-
margin-right: 0;
1210-
margin-left: 0;
1211-
margin-top: 0;
1212-
padding-left: 5vw;
1213-
padding-right: 5vw;
1214-
padding-top: 2rem;
1215-
padding-bottom: 2rem;
1216-
}
1217-
}
12181207
/* SECTIONS */
12191208
.section {
12201209
clear: both;

layouts/_default/baseof.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ <h1>{{ block "hero-title" . }}{{ .Params.bigheader | default .Title }}{{ end }}<
2525
</section>
2626
{{ block "post-hero" . }}
2727
</header>
28-
{{ block "deprecated" . }}
29-
{{ if or .IsHome ( eq .Params.cid "partners" ) ( eq .Params.cid "community" ) }}
30-
{{ partial "deprecation-warning.html" . }}
31-
{{ end }}
32-
{{ end }}
3328
{{ end }}
3429
{{ end }}
3530
<div class="td-outer">
3631
<main role="main" class="td-main" {{ if (or (ne .FirstSection "case-studies") (not .IsSection) ) }}data-pagefind-body{{ end }}>
32+
{{ block "deprecation_warning" . }}
33+
{{ if or .IsHome ( eq .Params.cid "partners" ) ( eq .Params.cid "community" ) }}
34+
{{ partial "deprecation-warning.html" . }}
35+
{{ end }}
36+
{{ end }}
3737
{{ block "main" . }}{{ end }}
3838
</main>
3939
</div>

layouts/blog/baseof.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
RSS <i class="fa-solid fa-rss ml-2 "></i>
3838
</a>
3939
{{ end -}}
40+
{{ block "deprecation_warning" . }}
41+
{{ partial "deprecation-warning.html" . }}
42+
{{ end }}
4043
{{ block "main" . }}{{ end }}
4144
</main>
4245
<div class="d-none d-xl-block col-xl-2 td-toc d-print-none">

layouts/blog/list.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
{{ $pageGroups := $pag.PageGroups}}
1313
{{ if eq $pag.PageNumber 1 }}
1414
{{ end }}
15-
{{ partial "deprecation-warning.html" . }}
1615
<div class="row">
1716
<div class="col-12">
1817
{{ range $pageGroups }}

layouts/blog/single.html

Lines changed: 0 additions & 4 deletions
This file was deleted.

layouts/case-studies/list.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
{{ end }}
1010
{{ end }}
1111
{{ $featured := (where $pages "Params.featured" true).ByWeight | first 4 }}
12-
{{ partial "deprecation-warning.html" . }}
1312
<section id="case-studies">
1413
<h2>{{ .Title }}</h2>
1514
<div class="case-studies">
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html id="{{ .Params.cid }}" lang="{{ .Language }}" class="{{ .Params.class }}">
3+
<head>
4+
{{ partial "head.html" . }}
5+
</head>
6+
<body{{ with .Page.Params.body_class }} class="{{ . }}"{{ end }}>
7+
{{ partial "navbar.html" . }}
8+
{{ block "deprecation_warning.html" . }}
9+
{{ partial "deprecation-warning.html" . }}
10+
{{ end }}
11+
<div data-pagefind-body>
12+
{{ block "main" . }}{{ end }}
13+
</div>
14+
{{ partialCached "footer.html" . }}
15+
{{ partialCached "scripts.html" . }}
16+
17+
</body>
18+
</html>

layouts/docs/baseof.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
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 "deprecation_warning" . }}
28+
{{ partial "deprecation-warning.html" . }}
29+
{{ end }}
2730
{{ block "outdated_content" . }}
2831
{{ partial "docs/outdated_content.html" . }}
2932
{{ end }}

layouts/docs/glossary.html

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

55
{{ define "main" }}
6-
{{ partial "deprecation-warning.html" . }}
76
<h1>{{ .Title }}</h1>
87
<p>{{ T "layouts_docs_glossary_description" }}</p>
98
<div id="tag-container">

layouts/docs/list.html

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

0 commit comments

Comments
 (0)