Skip to content

Commit db58cb0

Browse files
committed
refactor: disable hero content in m-stage
1 parent 7162320 commit db58cb0

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

packages/contentful-migrations/ui/1100000000001-create-m-stage-migration.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,8 @@ module.exports = withHelpers(async (migration, _context, helpers) => {
143143
.localized(true)
144144
.required(false)
145145
.validations([])
146-
.disabled(false)
147-
.omitted(false)
146+
.disabled(true)
147+
.omitted(true)
148148
.items({
149149
type: 'Link',
150150
validations: [

templates/theme-default/layouts/partials/modules/m-stage.html

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,15 @@
1616
{{- $media := $params.media -}}
1717
{{- $layout := $params.layout | default "split" -}}
1818
{{- $links := $params.links | default dict -}}
19-
{{- $content := $params.content -}}
2019
{{- $layout := $params.layout | default "default" -}}
2120

21+
{{/*
22+
The hero content is deactivated by default in the content type.
23+
You can remove this block and also lines 98-108 completely
24+
if you do not want to include any additional components in the stage.
25+
{{- $content := $params.content -}}
26+
*/}}
27+
2228
{{- $partialPath := printf "modules/m-stage/%s.html" $layout -}}
2329
{{- if and (ne $layout "default") (templates.Exists ( printf "partials/%s" $partialPath )) -}}
2430
{{- partial $partialPath . -}}
@@ -76,16 +82,17 @@
7682
) -}}
7783
{{- end -}}
7884
<div class="m-stage__links">
79-
{{- range $links -}}
80-
{{- with partialCached "utils/get-params" . . -}}
81-
{{- partial "components/c-link" (dict
82-
"context" .
83-
"globals" $globals
84-
"options" (dict "class_name" "m-stage__link" "appearance" "button" "modifier" "solid")
85-
) -}}
85+
{{- range $links -}}
86+
{{- with partialCached "utils/get-params" . . -}}
87+
{{- partial "components/c-link" (dict
88+
"context" .
89+
"globals" $globals
90+
"options" (dict "class_name" "m-stage__link" "appearance" "button" "modifier" "solid")
91+
) -}}
92+
{{- end -}}
8693
{{- end -}}
87-
{{- end -}}
8894
</div>
95+
{{/*
8996
{{ range $content }}
9097
{{ partialCached "utils/get-partial" (dict
9198
"context" .
@@ -95,6 +102,7 @@
95102
)
96103
) . }}
97104
{{ end }}
105+
*/}}
98106
</div>
99107
</div>
100108
</section>

0 commit comments

Comments
 (0)