Skip to content

Commit 7e23f0f

Browse files
Tim Bannisterkbhawkey
andcommitted
Tidy & fix deprecation warnings
Co-Authored-By: Karen Bradshaw <[email protected]>
1 parent 6ce3372 commit 7e23f0f

File tree

11 files changed

+99
-27
lines changed

11 files changed

+99
-27
lines changed

assets/scss/_custom.scss

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,82 @@ blockquote {
284284
border-left-color: #d9534f !important;
285285
}
286286

287+
.deprecation-warning {
288+
padding: 20px;
289+
margin: 20px 0;
290+
background-color: #faf5b6;
291+
color: #000;
292+
}
293+
294+
body.td-home .deprecation-warning, body.td-blog .deprecation-warning, body.td-documentation .deprecation-warning {
295+
border-radius: 3px;
296+
}
297+
298+
body.td-home #deprecation-warning {
299+
max-width: 1000px;
300+
margin-top: 2.5rem;
301+
margin-left: auto;
302+
margin-right: auto;
303+
}
304+
305+
#caseStudies body > #deprecation-warning, body.cid-casestudies > #deprecation-warning, body.cid-community > #deprecation-warning {
306+
display: inline-block;
307+
vertical-align: top;
308+
position: relative;
309+
background-color: #326ce5; // Kubernetes blue
310+
color: #fff;
311+
padding: 0;
312+
margin: 0;
313+
width: 100vw;
314+
}
315+
#caseStudies body > #deprecation-warning, body.cid-casestudies > #deprecation-warning {
316+
padding-top: 32px;
317+
}
318+
body.cid-partners > #deprecation-warning {
319+
padding: 0;
320+
margin-right: 0;
321+
margin-left: 0;
322+
margin-top: 0;
323+
width: 100vw;
324+
}
325+
body.cid-partners > #deprecation-warning > .content {
326+
width: 100%;
327+
max-width: initial;
328+
margin-right: 0;
329+
margin-left: 0;
330+
margin-top: 0;
331+
padding-left: 5vw;
332+
padding-right: 5vw;
333+
padding-top: 2rem;
334+
padding-bottom: 2rem;
335+
}
336+
body.cid-community > #deprecation-warning > .deprecation-warning {
337+
margin-left: 20px;
338+
margin-right: 20px;
339+
color: #faf5b6;
340+
background-color: inherit;
341+
}
342+
body.cid-community > #deprecation-warning > .deprecation-warning > * {
343+
color: inherit;
344+
background-color: inherit;
345+
}
346+
347+
#caseStudies body > #deprecation-warning > .deprecation-warning, body.cid-casestudies > #deprecation-warning > .deprecation-warning {
348+
color: inherit;
349+
background: inherit;
350+
width: 80%;
351+
margin: 0;
352+
margin-top: 120px;
353+
margin-left: auto;
354+
margin-right: auto;
355+
border-radius: initial;
356+
}
357+
#deprecation-warning > .deprecation-warning a {
358+
background: transparent;
359+
color: inherit;
360+
text-decoration: underline;
361+
}
362+
287363
// search & sidebar
288364
.td-sidebar {
289365
@media only screen and (min-width: 768px) {

layouts/_default/baseof.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
{{ partial "head.html" . }}
55
</head>
6-
<body class="td-{{ .Kind }}">
6+
<body class="td-{{ .Kind }}{{- if ne .Params.cid "" -}}{{- printf " cid-%s" (lower .Params.cid) -}}{{- end -}}">
77
<header>
88
{{ partial "navbar.html" . }}
99
</header>
@@ -27,7 +27,7 @@ <h5>{{ .Params.abstract }}</h5>
2727
</section>
2828
{{ block "post-hero" . }}
2929
{{ block "deprecated" . }}
30-
{{ if .IsHome }}
30+
{{ if or .IsHome ( eq .Params.cid "partners" ) ( eq .Params.cid "community" ) }}
3131
{{ partial "deprecation-warning.html" . }}
3232
{{ end }}
3333
{{ end }}

layouts/blog/baseof.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ <h1>
2727
{{ partial "blog-sidebar.html" . }}
2828
</div>
2929
<main class="col-12 col-md-9 col-xl-8 pl-md-5 pr-md-4" role="main">
30+
{{ block "deprecated" . }}
31+
{{ partial "deprecation-warning.html" . }}
32+
{{ end }}
3033
{{ with .CurrentSection.OutputFormats.Get "rss" -}}
3134
<a class="btn btn-lg -bg-orange td-rss-button d-none d-lg-block" href="{{ .Permalink | safeURL }}" target="_blank">
3235
RSS <i class="fa fa-rss ml-2 "></i>

layouts/case-studies/list.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<section id="mainContent">
1313
<div class="main-section">
1414
<div class="content">
15+
{{ partial "deprecation-warning.html" . }}
1516
<div class="case-studies">
1617
{{ range $featured }}
1718
{{ template "case-study-featured-block" (dict "ctx" $ "page" .) }}

layouts/case-studies/single-baseof.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
</head>
66
<body>
77
{{ partial "navbar.html" . }}
8+
{{ partial "deprecation-warning.html" . }}
89
{{ block "main" . }}{{ end }}
910
{{ partialCached "footer.html" . }}
1011
<!-- Disabling this as elements queries do not appear to exist on case studies -->

layouts/docs/baseof.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{{ partial "head.html" . }}
55
<title>{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
66
</head>
7-
<body class="td-{{ .Kind }}">
7+
<body class="td-{{ .Kind }} td-documentation">
88
<header>
99
{{ partial "navbar.html" . }}
1010
{{ partial "announcement.html" . }}
@@ -25,6 +25,9 @@ <h1>
2525
</div>
2626
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
2727
{{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }}
28+
{{ block "deprecated" . }}
29+
{{ partial "deprecation-warning.html" . }}
30+
{{ end }}
2831
{{ block "main" . }}{{ end }}
2932
{{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }}
3033
{{ partial "feedback.html" .Site.Params.ui.feedback }}

layouts/index.headers

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
{{- range $pages }}
1515
{{- if or (.Params.deprecated) (eq .Params.class "gridPage") (.Params.case_study_styles) (.Params.css) (.Params.js) }}
1616
{{ .URL }}
17-
{{- if .Params.deprecated }}
18-
Link: </css/deprecation-warning.css>; rel=preload; as=style
19-
{{- end -}}
2017
{{- if eq .Params.class "gridPage" }}
2118
Link: </css/gridpage.css>; rel=preload; as=style
2219
{{- end -}}

layouts/partials/css.html

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@
2121
{{- if .Site.Params.announcement }}
2222
<link rel="stylesheet" href="{{ "css/announcement.css" | relURL }}">
2323
{{- end }}
24-
{{- if .Site.Params.deprecated }}
25-
<link rel="stylesheet" href="{{ "css/deprecation-warning.css" | relURL }}">
26-
{{- end }}
2724

2825
{{- if or (eq .Params.class "gridPage") (eq .Params.class "gridPage gridPageHome") }}
2926
<link rel="stylesheet" href="{{ "css/gridpage.css" | relURL }}">
Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
{{ if .Site.Param "deprecated" }}
2-
<section id="deprecationWarning">
3-
<main>
4-
<div class="content deprecation-warning">
5-
<h3>
6-
{{ T "deprecation_title" }} {{ .Param "version" }}
7-
</h3>
8-
<p> Kubernetes {{ .Param "version" }} {{ T "deprecation_warning" }}
9-
<a href="{{ site.Params.currentUrl }}">{{ T "latest_version" }}</a>
10-
</p>
11-
</div>
12-
</main>
1+
{{ if (.Site.Param "deprecated") }}
2+
<section id="deprecation-warning">
3+
<div class="content deprecation-warning">
4+
<h3>
5+
{{ T "deprecation_title" }} {{ .Param "version" }}
6+
</h3>
7+
<p> Kubernetes {{ .Param "version" }} {{ T "deprecation_warning" }}
8+
<a href="{{ site.Params.currentUrl }}">{{ T "latest_version" }}</a>
9+
</p>
10+
</div>
1311
</section>
1412
{{ end }}

layouts/partials/docs/content-page.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
{{ if not (.Site.Param "deprecated") }}
12
{{- $filepath := .page.File.Path }}
23
{{- $editLink := printf "https://github.com/kubernetes/website/edit/master/content/%s/%s" .page.Language.Lang $filepath }}
34
<p>
45
<a href="{{ $editLink }}" id="editPageButton" target="_blank" data-proofer-ignore>
56
Edit This Page
67
</a>
78
</p>
9+
{{- end -}}
810
{{ if not .page.Params.notitle }}
911
<h1>{{ .page.Title }}</h1>
1012
{{ $desc := .page.Description }}

0 commit comments

Comments
 (0)