Clean up after the 10th birthday

Remove the special banner support, leaving some scaffolding in place.
pull/47045/head
Tim Bannister 2024-06-30 18:20:17 +01:00
parent 06243a7421
commit 46196821ae
5 changed files with 0 additions and 130 deletions

View File

@ -1421,89 +1421,6 @@ div.alert > em.javascript-required {
padding: 0.2rem;
}
// Special style for Kubernetes' 10th birthday
section.k8s-birthday-override {
background: #dae9f9; // Kubernetes light blue
> .k8s-birthday-wrapper {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
align-content: flex-end;
gap: 2rem;
img.birthday-banner {
max-height: 20rem;
max-width: 100vw;
margin-left: auto;
margin-right: auto;
aspect-ratio: 1;
flex-grow: 1;
}
p {
flex-grow: 4;
text-align: center;
color: $blue;
font-size: 2.5em;
padding-bottom: 2.5rem;
margin: 1em;
}
}
div.k8s-birthday-override.revert-to-previous {
form {
display: block;
max-width: clamp(20rem, 30%, 100vw);
margin-left: auto;
padding-bottom: 0.5rem;
}
text-align: right;
label {
color: $blue;
padding-left: 1.2em;
padding-right: 1.2em;
text-decoration: underline;
font-size: 1.5rem;
}
input {
accent-color: $blue;
border-color: $blue;
visibility: hidden;
}
}
div.k8s-birthday-override.revert-to-previous:has(input:not(:checked)) {
display: initial;
}
&:has(input:checked) {
display: none;
}
}
@media screen and (max-width: 900px) {
section.k8s-birthday-override > .k8s-birthday-wrapper {
flex-wrap: wrap;
}
}
@media screen and (max-width: 900px) {
section.k8s-birthday-override > .k8s-birthday-wrapper {
gap: 0.2rem;
align-content: center;
p {
font-size: initial;
min-width: 80vw;
}
img.birthday-banner {
min-height: initial;
}
label {
font-size: 1.2rem;
}
}
}
@media screen and (max-aspect-ratio: 9/15) {
gap: 0.4rem;
}

View File

@ -8,7 +8,6 @@ sitemap:
{{< site-searchbar >}}
<!-- automatically replaced if Kubernetes birthday feature active -->
{{< blocks/section class="k8s-overview" >}}
{{% blocks/feature image="flower" id="feature-primary" %}}
[Kubernetes]({{< relref "/docs/concepts/overview/" >}}), also known as K8s, is an open source system for automating deployment, scaling, and management of containerized applications.

View File

@ -1,13 +0,0 @@
---
title: Kubernetes' 10th birthday
content_type: special
display_date_start: 2024-06-06
display_date_end: 2024-06-15
# Only ever included, not rendered as a page in its own right
_build:
list: never
render: false
---
Kubernetes 10 Years

View File

@ -209,9 +209,6 @@ other = "email address"
[javascript_required]
other = "JavaScript must be [enabled](https://www.enable-javascript.com/) to view this content"
[k8s_birthday_show_original_content]
other = "Show original content…"
[katacoda_message]
other = """<h4>Shutdown of interactive tutorials</h4>
<p>The interactive tutorials on this website are being shut down. The Kubernetes

View File

@ -1,33 +1,3 @@
{{- $shouldShowBirthdayBanner := false -}}
{{- $now := time.Now -}}
{{- with site.GetPage "page" "community/special/kubernetes-10th-birthday" -}}
{{- if and (lt ( (.Param "display_date_start") | time.AsTime ) $now ) (gt ( (.Param "display_date_end") | time.AsTime ) ( $now.AddDate 0 0 1 ) ) -}}
{{- $shouldShowBirthdayBanner = true -}}
{{- warnf "%s" "It's Kubernetes' birthday, fingers crossed this renders OK" -}}
{{- with resources.Get "images/k8s-10th-birthday.svg" -}}
{{- else -}}
{{- errorf "%s" "Birthday banner image missing" -}}
{{- end -}}
{{ end }}
{{- end -}}
{{- if $shouldShowBirthdayBanner -}}
<section id="{{ .id }}" class="k8s-birthday-override">
<div class="k8s-birthday-wrapper">
<p>{{ "2014-06-06" | time.AsTime | time.Format ":date_long" }}</p>
{{- with site.GetPage "page" "community/special/kubernetes-10th-birthday" -}}
<a href="https://kubernetes.io/blog/2024/06/06/10-years-of-kubernetes/">
<img src="{{ with resources.Get "images/k8s-10th-birthday.svg" }}{{ .RelPermalink }}{{ end }}" class="birthday-banner" title="{{ .Title | markdownify }}" alt="{{ .Content }}" ></img>
</a>
{{- else -}}
{{- errorf "%s" "10th Birthday content missing" -}}
{{- end -}}
<p>{{ printf "%s-06-06" ( time.Format "2006" $now ) | time.AsTime | time.Format ":date_long" }}</p>
</div>
<div class="k8s-birthday-override revert-to-previous">
<form><label for="skip-birthday-details">{{ T "k8s_birthday_show_original_content" }}</label><input type=checkbox id="skip-birthday-details"></form>
</div>
</section>
{{- end -}}
<section id="{{ .id }}"{{ with .class }} class="{{ . }}"{{ end }}>
{{ .inner }}
</section>