Add a no-featured-image class and give some padding when no value in image field

This commit is contained in:
Benjamin Melançon 2019-08-31 09:04:33 -04:00
parent 48cff3dc53
commit d686009916
2 changed files with 6 additions and 0 deletions

View file

@ -25,3 +25,8 @@
overflow: visible; overflow: visible;
z-index: 10; z-index: 10;
} }
/* If there's no featured image, leave enough blank space for the dropping down title. */
.content.no-featured-image {
margin-top: 4rem;
}

View file

@ -80,6 +80,7 @@ node.isSticky() ? 'is-sticky',
not node.isPublished() ? 'is-unpublished', not node.isPublished() ? 'is-unpublished',
view_mode ? view_mode|clean_class, view_mode ? view_mode|clean_class,
'clearfix', 'clearfix',
content.field_image|render is empty ? 'no-featured-image',
] %} ] %}
<article{{ attributes.addClass(classes) }}> <article{{ attributes.addClass(classes) }}>