{{!< default}} {{#post}} <article class="gh-page {{post_class}} {{#unless feature_image}}no-image{{/unless}}"> <header class="gh-header gh-canvas"> {{#if feature_image}} <img class="gh-image" src="{{feature_image}}" alt="{{title}}" /> {{/if}} <h1 class="gh-title">{{title}}</h1> {{#if custom_excerpt}} <p class="gh-excerpt">{{custom_excerpt}}</p> {{/if}} </header> <div class="gh-content gh-canvas"> {{content}} </div> </article> {{/post}} {{!-- The #contentFor helper here will send everything inside it up to the matching #block helper found in default.hbs --}} {{#contentFor "scripts"}} <script> // Layout Script for Ghost Gallery Cards var images = document.querySelectorAll('.kg-gallery-image img'); images.forEach(function (image) { var container = image.closest('.kg-gallery-image'); var width = image.attributes.width.value; var height = image.attributes.height.value; var ratio = width / height; container.style.flex = ratio + ' 1 0%'; }) </script> {{/contentFor}}