DESIGN >> CSS

/* ---- GHOST PLUGINS - BLOG POST BANNER IMAGE START ---- */

@ghost-blog-height: 10%; // banner height

@ghost-blog-mobile-height: 40%; // mobile banner height

@ghost-blog-overlay: rgba(0,0,0,0); // banner overlay color

@ghost-blog-text-size: 0rem; // banner text size (was 5em, 3em is ok)

@ghost-blog-text-mobile-size: 35px; // mobile banner text size

@ghost-blog-text-color: #fff; // banner text color

@ghost-blog-text-align: center; // banner text alignment

@ghost-blog-text-space: 10vw; // banner text container padding

@ghost-blog-text-max-width: 100%; // banner text container max width

@ghost-blog-image-position: top; // image position, available options: top, center, left, bottom

@ghost-blog-zoom-animation: 0s; // zoom animation speed on page load, set to 0s to remove zoom

/* ----- DON'T EDIT BELOW THIS LINE - SUPPORT NOT PROVIDED IF EDITING BELOW THIS LINE ----- */

body{.blog-item-wrapper{.blog-item-hero-banner{text-align: @ghost-blog-text-align;&:before{background-color: @ghost-blog-overlay;}.blog-item-title{padding: @ghost-blog-height @ghost-blog-text-space;@media only screen and (max-width: 640px){padding: @ghost-blog-mobile-height @ghost-blog-text-space;}text-align: @ghost-blog-text-align;max-width: @ghost-blog-text-max-width;margin: auto !important;h1{color:@ghost-blog-text-color;font-size: @ghost-blog-text-size;@media only screen and (max-width: 640px){font-size: @ghost-blog-text-mobile-size;}}}img{object-position: @ghost-blog-image-position;transition: transform @ghost-blog-zoom-animation ease !important;}}}}

/* ---- GHOST PLUGINS - BLOG POST BANNER IMAGE END ---- */

<script type="text/javascript">

02

$(document).ready(function(){

03

var imglink = $('[rel="image_src"]').attr('href').replace("http://", "https://");

04

var nxhtml = '<section data-section-fix="page-nx-fix" data-section-theme="black" class="page-section layout-engine-section background-width--full-bleed section-height--medium content-width--medium horizontal-alignment--center vertical-alignment--middle has-background black" data-controller="SectionWrapperController" data-animation="none" style="padding-top: 40px;" data-controllers-bound="SectionWrapperController" data-active="true">\

05

<div class="section-background">\

06

<img alt="" data-src="'+imglink+'" data-image="'+imglink+'" data-image-focal-point="0.5,0.5" data-load="false" srcset="'+imglink+'" sizes="" onload="positionImage(this); this.classList.add("loaded");" loading="lazy" style="width: 100%; height: 100%; object-position: 50% 50%; object-fit: cover;" data-parent-ratio="3.7" class="loaded" data-image-resolution="1500w">\

07

<div class="section-background-overlay" style="opacity: 0.35;"></div>\

08

</div>';

09

$("#sections").prepend(nxhtml);

10

});

11

</script>