Skip to content
Snippets Groups Projects
Commit b1e68211 authored by alexisben's avatar alexisben
Browse files

fix chapter figure columns

parent 0fb7d5f1
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@
margin-top: $spacing1
*
@include small
picture
picture, img
display: block
figcaption
@include small
......@@ -15,7 +15,7 @@
display: flex
.text
order: 2
figure
figcaption
margin-bottom: $spacing1
&--alt_background
background: $block-chapter-layout-alt-background
......@@ -27,13 +27,16 @@
color: $block-chapter-layout-accent-color
a
@include link($block-chapter-layout-accent-color)
@include media-breakpoint-down(desktop)
&--with-image
&.block-chapter--alt_background, &.block-chapter--accent_background
padding-top: half($grid-gutter-sm)
@include media-breakpoint-up(desktop)
@include in-page-with-sidebar
figure
max-width: col(6, 8)
&.image-portrait
max-width: col(4, 8)
&--alt_background, &--accent_background
background: none
.chapter .text
......
......@@ -3,9 +3,11 @@
{{- $title := .block.title -}}
{{- $layout := .block.data.layout | default "no_background" -}}
{{- $class := "block block-chapter" -}}
{{- $image_class := "" -}}
{{- with .block.data -}}
{{ if .image }}
{{- $class = printf "%s block-chapter--with-image" $class -}}
{{- $image_class = printf "image-%s" (partial "GetImageDirection" .image) -}}
{{ end }}
{{- $layout_class := printf "block-chapter--%s" $layout -}}
{{- $class = printf "%s %s" $class $layout_class -}}
......@@ -36,7 +38,7 @@
{{ end -}}
</div>
{{ if .image }}
<figure>
<figure class="{{- $image_class -}}">
{{ partial "commons/image.html"
(dict
"image" .image
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment