From 397748d38f669d8fa838d53a3ea41e037e0e6fbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Mon, 23 Sep 2019 08:07:23 -0400 Subject: [PATCH] Don't drop title down at all for non-fancy content types And we display a solid color instead of an image where we *do* expect an image but there isn't one, so no need for the no-featured-image class or extra margin in that case. Ref #28 Ref #32 Ref #26 Ref #27 Ref #29 --- .../custom/geofresco/src/global/_layout.scss | 23 ++++++++++--------- .../src/templates/layout/node.html.twig | 1 - 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/web/themes/custom/geofresco/src/global/_layout.scss b/web/themes/custom/geofresco/src/global/_layout.scss index 5331cdd..45c4cf9 100644 --- a/web/themes/custom/geofresco/src/global/_layout.scss +++ b/web/themes/custom/geofresco/src/global/_layout.scss @@ -25,17 +25,18 @@ } } -/* On node pages, drop the title over (where we want) the image (to be). */ -.page--content-item .page-title { - height: 0; - position: relative; - overflow: visible; - z-index: 10; -} - -/* If there's no featured image, leave enough blank space for the dropping down title. */ -.content.no-featured-image { - margin-top: 6rem; +/* On certain node pages, drop the title over (where we want) the image (to be). */ +.page--content-item--article, +.page--content-item--blog, +.page--content-item--collection, +.page--content-item--people + { + .page-title { + height: 0; + position: relative; + overflow: visible; + z-index: 10; + } } .background-replacement-for-no-image { diff --git a/web/themes/custom/geofresco/src/templates/layout/node.html.twig b/web/themes/custom/geofresco/src/templates/layout/node.html.twig index 46e7cfb..84b06b2 100644 --- a/web/themes/custom/geofresco/src/templates/layout/node.html.twig +++ b/web/themes/custom/geofresco/src/templates/layout/node.html.twig @@ -80,7 +80,6 @@ node.isSticky() ? 'is-sticky', not node.isPublished() ? 'is-unpublished', view_mode ? view_mode|clean_class, 'clearfix', -content.field_image|render is empty ? 'no-featured-image', ] %}