Skip to content

Commit ae7fa1b

Browse files
committed
Use Docsy-friendly section partial
Use a partial for <section> that will work with near-vanilla Docsy.
1 parent 85ddc32 commit ae7fa1b

File tree

5 files changed

+28
-45
lines changed

5 files changed

+28
-45
lines changed

assets/scss/_base.scss

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -316,13 +316,6 @@ $ocean-nodes-h3-margin-bottom: 30px;
316316
position: relative;
317317
overflow: hidden;
318318

319-
& > .video-text-optional {
320-
width: 30vw;
321-
padding-top: 2rem;
322-
color: white;
323-
margin-right: 70vw;
324-
}
325-
326319
h2 {
327320
font-size: 32px;
328321
line-height: 44px;
@@ -346,14 +339,7 @@ $ocean-nodes-h3-margin-bottom: 30px;
346339
margin: 5px;
347340
}
348341

349-
#desktopKCButton {
350-
display: inline;
351-
position: absolute;
352-
padding: 20px 10px 20px 10px;
353-
margin: 0;
354-
}
355-
356-
#desktopKCButton:hover, .desktopKCButton:hover{
342+
.desktopKCButton:hover{
357343
background-color: #ffffff;
358344
color: #326ce5;
359345
transition: 150ms;
@@ -366,13 +352,9 @@ $ocean-nodes-h3-margin-bottom: 30px;
366352
color: $secondary;
367353
padding: 1.5rem;
368354
margin-bottom: 1rem;
369-
370-
&:hover::before {
371-
border-color: transparent transparent transparent $dark-grey;
372-
}
373355
}
374356

375-
#desktopShowVideoButton:hover{
357+
#desktopShowVideoButton:hover {
376358
color: $primary;
377359
transition: 150ms;
378360
}
@@ -390,7 +372,7 @@ $ocean-nodes-h3-margin-bottom: 30px;
390372
position: fixed;
391373
top: 50%;
392374
left:50%;
393-
transform: translate(-50%, -50%);
375+
transform: translate(-50%, -50%);
394376
}
395377

396378
#closeButton {
@@ -429,6 +411,7 @@ $ocean-nodes-h3-margin-bottom: 30px;
429411

430412
// KubeWeekly
431413
#kubeweekly {
414+
visibility: hidden;
432415
background-color: $light-grey;
433416
padding-top: 30px;
434417
padding-bottom: 80px;

assets/scss/_custom.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,10 @@ footer {
437437
background-position: 65% center, left center;
438438
background-repeat: no-repeat, repeat;
439439
background-size: auto 100%, cover;
440+
440441
.video-text-optional {
441442
padding-left: calc(max(10vw, 5rem));
443+
padding-right: clamp(2rem, 60vw, 80vw);
442444

443445
button::before, button::after {
444446
color: $secondary;

assets/scss/_desktop.scss

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,6 @@ $vendor-strip-height: 44px;
6464
}
6565
}
6666

67-
#video {
68-
position: relative;
69-
background-position: top center;
70-
background-size: cover;
71-
72-
&>.light-text {
73-
margin: 0 10% 15px 0;
74-
}
75-
}
76-
77-
78-
7967
#talkToUs {
8068
h4 {
8169
br {

assets/scss/_tablet.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,6 @@ $vendor-strip-font-size: 16px;
118118
}
119119
}
120120

121-
#mobileShowVideoButton {
122-
display: none;
123-
}
124-
125121
#talkToUs {
126122
#bigSocial {
127123
div {
Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,30 @@
1-
{{- $class := .Get "class" -}}
1+
{{- $_hugo_config := `{ "version": 1 }` -}}
2+
{{- $col_id := .Get "color" | default .Ordinal -}}
3+
{{- $height := .Get "height" | default "auto" -}}
4+
{{- $type := .Get "type" | default "" -}}
25
{{- $style := .Get "style" -}}
3-
{{- $id := .Get "id" | default (printf "section-%d" .Ordinal) -}}
6+
{{- $id_fallback := ( printf "td-block-%d" .Ordinal ) -}}
7+
{{- $id := .Get "id" | default (printf "%s%s" $id_fallback "-section" ) -}}
8+
{{- $class := .Get "class" -}}
49
{{- $bg := .Get "background-image" -}}
10+
{{- if $bg -}}
11+
{{- template "shortcodes-blocks_getimage" (dict "name" $bg "ctx" . "target" "bg") }}
12+
{{- end -}}
513
{{/* special case Kubernetes overview */}}
614
{{- if eq $class "k8s-overview" -}}
7-
{{- partial "kubernetes-overview.html" (dict "id" $id "class" $class "inner" $.Inner ) -}}
15+
{{- partial "kubernetes-overview.html" (dict "id" $id "class" $class "inner" $.Inner ) -}}
816
{{- else -}}
9-
{{- if $bg -}}
10-
{{ template "shortcodes-blocks_getimage" (dict "name" $bg "ctx" . "target" "bg") }}
11-
{{- end -}}
17+
<a id="{{ $id_fallback }}" class="td-offset-anchor"></a>
1218
{{- $image := $.Scratch.Get "bg" -}}
13-
<section id="{{ $id }}" class="{{ with $image }}section-with-bgimage{{end}} {{ with $class }}{{ . }}{{ end }}" style="{{ with $image }}background-image: url({{ .Permalink }}); {{ end }}{{ with $style }}{{ . | safeCSS }}{{ end }}">
14-
{{ $.Inner }}
19+
<section id="{{ $id }}" class="row td-box td-box--{{ $col_id }} td-box--gradient td-box--height-{{ $height }}{{ with $class }} {{ . }}{{ end }}{{ with $image }} section-with-bgimage {{ end }}" style="{{ with $image }}background-image: url({{ .Permalink }}); {{ end }}{{ with $style }}{{ . | safeCSS }}{{ end }}">
20+
<div class="col">
21+
<div class="row {{ $type }}">
22+
{{ if eq .Page.File.Ext "md" }}
23+
{{ .Inner | markdownify }}
24+
{{ else }}
25+
{{ .Inner | htmlUnescape | safeHTML }}
26+
{{ end }}
27+
</div>
28+
</div>
1529
</section>
1630
{{- end -}}

0 commit comments

Comments
 (0)