Improve announcements implementation
Signed-off-by: Celeste Horgan <celeste@cncf.io> Co-authored-by: Tim Bannister <tim@scalefactory.com>
This commit is contained in:
@@ -4,6 +4,13 @@
|
||||
{{ partial "head.html" . }}
|
||||
</head>
|
||||
<body class="page">
|
||||
{{ block "announcement" . }}
|
||||
{{ if .IsHome }}
|
||||
{{ partial "frontpage-announcement.html" . }}
|
||||
{{ else }}
|
||||
{{ partial "announcement.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ partial "header.html" . }}
|
||||
{{ block "hero" . }}
|
||||
<!-- HERO -->
|
||||
@@ -18,7 +25,6 @@
|
||||
</section>
|
||||
{{ block "post-hero" . }}{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<main>
|
||||
<article class="page-content">
|
||||
{{ block "main" . }}{{ end }}
|
||||
@@ -28,4 +34,4 @@
|
||||
{{ partialCached "footer.html" . }}
|
||||
{{ partialCached "footer-scripts.html" . }}
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -7,6 +7,7 @@
|
||||
<link rel="stylesheet" type="text/css" href="{{ "css/blog.css" | relURL }}">
|
||||
</head>
|
||||
<body>
|
||||
{{ partial "announcement.html" . }}
|
||||
{{ partial "header.html" . }}
|
||||
<section id="hero" class="light-text no-sub">
|
||||
<h1>{{ .Title }}</h1>
|
||||
@@ -39,4 +40,4 @@
|
||||
{{ partialCached "footer.html" . }}
|
||||
{{ partialCached "footer-scripts.html" . }}
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -1,4 +1,4 @@
|
||||
{{ define "main" }}
|
||||
<link rel="stylesheet" type="text/css" href="{{ "css/newcommunity.css" | relURL }}">
|
||||
{{ .Content }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
@@ -4,6 +4,7 @@
|
||||
{{ partial "head.html" . }}
|
||||
</head>
|
||||
<body>
|
||||
{{ partial "announcement.html" . }}
|
||||
{{ partial "header.html" . }}
|
||||
{{ block "hero" . }}
|
||||
<!-- HERO -->
|
||||
@@ -11,16 +12,15 @@
|
||||
{{ partial "docs/top-menu.html" . }}
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ block "announcement" . }}{{ partial "announcement.html" . }}{{ end }}
|
||||
{{ block "deprecation" . }}{{ partial "deprecation-warning.html" . }}{{ end }}
|
||||
<main>
|
||||
<section id="encyclopedia">
|
||||
{{ block "side-menu" . }}<div id="docsToc" style="display:none;"></div>{{ end }}
|
||||
<div id="{{ block "content-id" . }}docsContent{{ end }}">
|
||||
{{ block "content" . }}{{ end }}
|
||||
|
||||
|
||||
{{ partial "feedback.html" . }}
|
||||
|
||||
|
||||
{{ partial "git-info.html" . }}
|
||||
</div>
|
||||
</section>
|
||||
@@ -45,4 +45,4 @@
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
@@ -1,11 +1,14 @@
|
||||
{{ if .Param "announcement"}}
|
||||
<section id="announcement">
|
||||
<main>
|
||||
<div class="content announcement">
|
||||
<h3>
|
||||
{{ .Param "announcement_message" | markdownify }}
|
||||
</h3>
|
||||
</div>
|
||||
</main>
|
||||
</section>
|
||||
{{ end }}
|
||||
{{ if .Page.Param "announcement" }}
|
||||
<section lang="en" id="announcement" style="background-color:{{ .Page.Param "announcement_bg" }}">
|
||||
<main>
|
||||
<div class="content announcement main-section">
|
||||
|
||||
<h4 class="announcement">
|
||||
{{ .Page.Param "announcement_title" | markdownify }}
|
||||
</h4>
|
||||
<p class="announcement">{{ .Page.Param "announcement_message_compact" | markdownify }}</p>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
</section>
|
||||
{{ end }}
|
||||
|
||||
@@ -19,6 +19,9 @@
|
||||
<link rel="stylesheet" href="{{ "css/jquery-ui.min.css" | relURL }}">
|
||||
<link rel="stylesheet" href="{{ "css/callouts.css" | relURL }}">
|
||||
<link rel="stylesheet" href="{{ "css/custom-jekyll/tags.css" | relURL }}">
|
||||
{{- if .Site.Params.announcement }}
|
||||
<link rel="stylesheet" href="{{ "css/announcement.css" | relURL }}">
|
||||
{{- end }}
|
||||
{{- if .Params.deprecated }}
|
||||
<link rel="stylesheet" href="{{ "css/deprecation-warning.css" | relURL }}">
|
||||
{{- end }}
|
||||
@@ -34,4 +37,4 @@
|
||||
{{- $url := trim . " " | relURL }}
|
||||
<link rel="stylesheet" href="{{ $url }}"><!-- custom css added -->
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,14 @@
|
||||
{{ if .Page.Param "announcement" }}
|
||||
<section lang="en" id="fp-announcement" style="background-color:{{ .Page.Param "announcement_bg" }}">
|
||||
<main>
|
||||
<div class="content announcement main-section">
|
||||
|
||||
<h3>
|
||||
{{ .Page.Param "announcement_title" | markdownify }}
|
||||
</h3>
|
||||
<p>{{ .Page.Param "announcement_message_full" | markdownify }}</p>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
</section>
|
||||
{{ end }}
|
||||
@@ -1,10 +1,13 @@
|
||||
{{ if .Page.Param "announcement" }}
|
||||
<link rel="stylesheet" href="{{ "css/announcement.css" | relURL }}">
|
||||
<section id="announcement">
|
||||
<main>
|
||||
<div class="content announcement">
|
||||
<div class="content announcement main-section">
|
||||
|
||||
<h3>
|
||||
{{ .Page.Param "announcement_message" | markdownify }}
|
||||
</h3>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user