Skip to content

Commit fef04ab

Browse files
author
Tim Bannister
committed
Define custom section partial for K8s overview
1 parent f0ab423 commit fef04ab

File tree

5 files changed

+12
-3
lines changed

5 files changed

+12
-3
lines changed

assets/scss/_base.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,8 @@ section#cncf {
477477
}
478478

479479
// OCEAN NODES
480-
#oceanNodes {
480+
#oceanNodes, .td-home .k8s-overview {
481+
481482
padding-top: $ocean-nodes-padding-Y;
482483
padding-bottom: $ocean-nodes-padding-Y;
483484

assets/scss/_desktop.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ $video-section-height: 550px;
2323
}
2424
}
2525

26-
#oceanNodes {
26+
#oceanNodes, .td-home .k8s-overview {
2727
.main-section {
2828
position: relative;
2929

assets/scss/_tablet.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ $feature-box-div-width: 45%;
6666
}
6767
}
6868

69-
#oceanNodes {
69+
#oceanNodes, .td-home .k8s-overview {
7070
h3 {
7171
text-align: left;
7272
margin-bottom: 18px;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<section id="{{ .id }}"{{ with .class }} class="{{ . }}"{{ end }}>
2+
{{ .inner }}
3+
</section>

layouts/shortcodes/blocks/section.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@
22
{{- $style := .Get "style" -}}
33
{{- $id := .Get "id" | default (printf "section-%d" .Ordinal) -}}
44
{{- $bg := .Get "background-image" -}}
5+
{{/* special case Kubernetes overview */}}
6+
{{- if eq $class "k8s-overview" -}}
7+
{{- partial "kubernetes-overview.html" (dict "id" $id "class" $class "inner" $.Inner ) -}}
8+
{{- else -}}
59
{{- if $bg -}}
610
{{ template "shortcodes-blocks_getimage" (dict "name" $bg "ctx" . "target" "bg") }}
711
{{- end -}}
812
{{- $image := $.Scratch.Get "bg" -}}
913
<section id="{{ $id }}"{{ with $class }} class="{{ . }}"{{ end }} style="{{ with $image }}background-image: url({{ .Permalink }}); {{ end }}{{ with $style }}{{ . | safeCSS }}{{ end }}">
1014
{{ $.Inner }}
1115
</section>
16+
{{- end -}}

0 commit comments

Comments
 (0)