Skip to content

Commit ff5c17a

Browse files
author
Ben Zörb
authored
Merge pull request #11 from jungvonmatt/feature/spacings
Feature/spacings
2 parents 13ee5cd + d5cbfa2 commit ff5c17a

File tree

10 files changed

+26
-21
lines changed

10 files changed

+26
-21
lines changed

templates/theme-default/assets/scss/main.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
@import "objects/o-ratio";
1717
@import "objects/o-wrapper";
1818
@import "objects/o-slider";
19+
@import "objects/o-module";
1920

2021
// 6. Components
2122
@import "components/c-link";
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +0,0 @@
1-
.m-section {
2-
margin-top: var(--#{$spacing}, var(--#{$spacing}--md));
3-
margin-bottom: var(--#{$spacing}, var(--#{$spacing}--md));
4-
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.o-module {
2+
$self: &;
3+
4+
overflow: hidden;
5+
position: relative;
6+
background-color: var(--#{$color}-background);
7+
color: var(--#{$color}-text);
8+
padding-bottom: var(--#{$spacing}, var(--#{$spacing}-10));
9+
10+
&.u-theme--dark + &.u-theme--light,
11+
&.u-theme--light + &.u-theme--dark {
12+
padding-top: var(--#{$spacing}, var(--#{$spacing}-10));
13+
}
14+
}

templates/theme-default/assets/scss/utilities/_u-theme.scss

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,3 @@
1919
background-color: var(--#{$color}-background);
2020
color: var(--#{$color}-text);
2121
}
22-
23-
.u-theme--dark > .u-theme--light,
24-
.u-theme--light > .u-theme--dark {
25-
padding-top: var(--#{$spacing}, 0);
26-
padding-bottom: var(--#{$spacing}, 0);
27-
}
28-
29-
.u-theme--dark > .u-theme--light + .u-theme--light,
30-
.u-theme--light > .u-theme--dark + .u-theme--dark {
31-
margin-top: calc(-1 * var(--#{$spacing}, 0));
32-
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
{{- $column_left := $params.column_left | default slice -}}
1414
{{- $column_right := $params.column_right | default slice -}}
1515

16-
<section class="m-section {{ with $class_name }}{{ . }}{{ end }}">
16+
<section class="o-module m-section{{ with $class_name }} {{ . }}{{ end }}">
1717
<div class="o-wrapper">
1818
<div class="m-columns__body">
1919
{{- range (slice $column_left $column_right) -}}

templates/theme-default/layouts/partials/modules/m-list/grid.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
{{- $layout := $params.layout -}}
1414
{{- $columns := $params.columns | default 4 -}}
1515

16-
<section class="m-section {{ with $class_name }}{{ . }}{{ end }}" style="--columns-desktop: {{ $columns }};">
16+
<section class="o-module m-section {{ with $class_name }}{{ . }}{{ end }}" style="--columns-desktop: {{ $columns }};">
1717
<div class="o-wrapper">
1818
{{- with $body -}}
1919
{{- $content := . -}}

templates/theme-default/layouts/partials/modules/m-list/slider.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
{{- $layout := $params.layout -}}
1414
{{- $columns := $params.columns | default 4 -}}
1515

16-
<section class="m-section {{ with $class_name }}{{ . }}{{ end }}" style="--columns-desktop: {{ $columns }};">
16+
<section class="o-module m-section {{ with $class_name }}{{ . }}{{ end }}" style="--columns-desktop: {{ $columns }};">
1717
<div class="o-wrapper">
1818
<div class="m-list__body o-slider js-slider" data-loop="true">
1919
<div class="o-slider__outer-wrapper">

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
{{- $body := $params.body -}}
1313
{{- $layout := $params.layout -}}
1414

15-
<section class="{{ with $class_name }}{{ . }}{{ end }}">
15+
<section class="o-module{{ with $class_name }} {{ . }}{{ end }}">
1616
<div class="o-wrapper">
1717
{{- with $body -}}
1818
{{- $content := . -}}

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
{{- $options := .options | default dict -}}
44
{{- $params := (merge $context $options) -}}
55
{{- $modifier := cond (reflect.IsSlice $params.modifier) $params.modifier (cond (ne $params.modifier nil) (slice $params.modifier) dict ) -}}
6-
{{- $class_name := $params.class_name -}}
6+
7+
{{- $class_name := partialCached "utils/get-class-names" (dict
8+
"class" "m-stage"
9+
"context" $params
10+
) . -}}
711

812
{{- $title := $params.title -}}
913
{{- $subtitle := $params.subtitle -}}
@@ -18,7 +22,7 @@
1822
{{- if and (ne $layout "default") (templates.Exists ( printf "partials/%s" $partialPath )) -}}
1923
{{- partial $partialPath . -}}
2024
{{- else -}}
21-
<section class="m-stage m-stage--{{ $layout }}{{ range $modifier }} m-stage--{{ . }}{{ end }}{{ with $layout }} m-stage--{{ . }}{{end}}{{ with $class_name }} {{ . }}{{end}}">
25+
<section class="o-module{{ with $class_name }} {{ . }}{{ end }}">
2226
<div class="m-stage__body">
2327
{{- with $media -}}
2428
{{- partial "utils/get-partial" (dict

templates/theme-default/layouts/partials/templates/t-default.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
{{- partial "utils/get-partial" (dict
1010
"context" .
1111
"globals" $globals
12+
"options" (dict "theme" $theme)
1213
) -}}
1314
{{- end -}}
1415
{{- range $modules -}}

0 commit comments

Comments
 (0)