Global templates and 404
This commit is contained in:
parent
5e970154fa
commit
9fac3beb29
10 changed files with 149 additions and 152 deletions
19
page.hbs
19
page.hbs
|
@ -1,7 +1,8 @@
|
|||
{{!< default}}
|
||||
|
||||
{{#post}}
|
||||
<article class="gh-page {{post_class}} {{#unless feature_image}}no-image{{/unless}}">
|
||||
|
||||
<article class="{{post_class}}">
|
||||
|
||||
<header class="gh-header gh-canvas">
|
||||
{{#if feature_image}}
|
||||
|
@ -20,19 +21,5 @@
|
|||
</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}}
|
||||
{{/post}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue