Reimplement announcements (#21586)

* Reimplement announcements

Signed-off-by: Celeste Horgan <celeste@cncf.io>

Address deprecation-warning styling

Signed-off-by: Celeste Horgan <celeste@cncf.io>

Use partial only

Signed-off-by: Celeste Horgan <celeste@cncf.io>

Refine

Signed-off-by: Celeste Horgan <celeste@cncf.io>

* Turn on announcements for preview only

Signed-off-by: Celeste Horgan <celeste@cncf.io>

* Update config.toml

Co-authored-by: Celeste Horgan <celeste@cncf.io>

Co-authored-by: Zach Corleissen <zacharysarah@users.noreply.github.com>
This commit is contained in:
Celeste Horgan
2020-06-09 13:46:05 -07:00
committed by GitHub
parent 0d766f1400
commit 9b9ce1f942
9 changed files with 32 additions and 21 deletions
+7 -1
View File
@@ -23,7 +23,13 @@
{{ block "hero-more" . }}{{ end }}
</div>
</section>
{{ block "post-hero" . }}{{ end }}
{{ block "post-hero" . }}
{{ block "deprecated" . }}
{{ if .IsHome }}
{{ partial "deprecation-warning.html" . }}
{{ end }}
{{ end }}
{{ end }}
{{ end }}
<main>
<article class="page-content">
+3 -3
View File
@@ -4,11 +4,11 @@
<div class="content announcement main-section">
<h4 class="announcement">
{{ .Page.Param "announcement_title" | markdownify }}
{{ T "announcement_title" | markdownify }}
</h4>
<p class="announcement">{{ .Page.Param "announcement_message_compact" | markdownify }}</p>
<p class="announcement">{{ T "announcement_message" | markdownify }}</p>
</div>
</main>
</section>
{{ end }}
{{ end }}
+1 -1
View File
@@ -22,7 +22,7 @@
{{- if .Site.Params.announcement }}
<link rel="stylesheet" href="{{ "css/announcement.css" | relURL }}">
{{- end }}
{{- if .Params.deprecated }}
{{- if .Site.Params.deprecated }}
<link rel="stylesheet" href="{{ "css/deprecation-warning.css" | relURL }}">
{{- end }}
{{- if or (eq .Params.class "gridPage") (eq .Params.class "gridPage gridPageHome") }}
+6 -5
View File
@@ -1,13 +1,14 @@
{{ if .Param "deprecated" }}
{{ if .Site.Param "deprecated" }}
<section id="deprecationWarning">
<main>
<div class="content deprecation-warning">
<h3>
Kubernetes {{ .Param "version" }}
{{ T "deprecation_warning" }}
<a href="{{ site.Params.currentUrl }}">{{ T "latest_version" }}</a>
{{ T "deprecation_title" }} {{ .Param "version" }}
</h3>
<p> Kubernetes {{ .Param "version" }} {{ T "deprecation_warning" }}
<a href="{{ site.Params.currentUrl }}">{{ T "latest_version" }}</a>
</p>
</div>
</main>
</section>
{{ end }}
{{ end }}
+3 -3
View File
@@ -4,11 +4,11 @@
<div class="content announcement main-section">
<h3>
{{ .Page.Param "announcement_title" | markdownify }}
{{ T "announcement_title" | markdownify }}
</h3>
<p>{{ .Page.Param "announcement_message_full" | markdownify }}</p>
<p>{{ T "announcement_message" | markdownify }}</p>
</div>
</main>
</section>
{{ end }}
{{ end }}