mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
closes: https://github.com/TryGhost/Toolbox/issues/193 - Our Casper fixture was several years out of date. - I'd already updated the ghost-api to point to the latest API version, which was the main difference - This makes sure the full fixture is up to date and correct, and therefore that we're truly testing if Ghost right now works - It also adds instructions for how to update it in future GOTCHA: the mock-express-style tests are failing if the API difference between test-theme and casper are different - I've tried to look into why this is - it's something to do with the overridden route settings not working properly if the API version changes - Given that we may not keep this style of testing AND we are definitely not keeping API versions, I'm ignoreing this for now - To get around it, I'm setting both themes to be v4 API, so that Casper is exactly as in main
45 lines
No EOL
1.5 KiB
Handlebars
45 lines
No EOL
1.5 KiB
Handlebars
{{!< default}}
|
|
|
|
{{!-- The tag above means: insert everything in this file
|
|
into the {body} tag of the default.hbs template --}}
|
|
|
|
|
|
{{#post}}
|
|
{{!-- Everything inside the #post block pulls data from the page --}}
|
|
|
|
<main id="site-main" class="site-main">
|
|
<article class="article {{post_class}}">
|
|
|
|
<header class="article-header gh-canvas">
|
|
{{#if feature_image}}
|
|
<figure class="article-image">
|
|
{{!-- This is a responsive image, it loads different sizes depending on device
|
|
https://medium.freecodecamp.org/a-guide-to-responsive-images-with-ready-to-use-templates-c400bd65c433 --}}
|
|
<img
|
|
srcset="{{img_url feature_image size="s"}} 300w,
|
|
{{img_url feature_image size="m"}} 600w,
|
|
{{img_url feature_image size="l"}} 1000w,
|
|
{{img_url feature_image size="xl"}} 2000w"
|
|
sizes="(min-width: 1400px) 1400px, 92vw"
|
|
src="{{img_url feature_image size="xl"}}"
|
|
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}"
|
|
/>
|
|
{{#if feature_image_caption}}
|
|
<figcaption>{{feature_image_caption}}</figcaption>
|
|
{{/if}}
|
|
</figure>
|
|
{{/if}}
|
|
</header>
|
|
|
|
<section class="gh-content gh-canvas">
|
|
|
|
<h1 class="article-title">{{title}}</h1>
|
|
|
|
{{content}}
|
|
|
|
</section>
|
|
|
|
</article>
|
|
</main>
|
|
|
|
{{/post}} |