mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
2ea7d5432b
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
1.7 KiB
Handlebars
45 lines
1.7 KiB
Handlebars
{{!< default}}
|
|
{{!-- The tag above means: insert everything in this file
|
|
into the {body} of the default.hbs template --}}
|
|
|
|
{{#match @custom.publication_cover_style "!=" "None"}}
|
|
<div class="site-header-content{{#match @custom.publication_cover_style "Large"}} large{{/match}}">
|
|
{{#if @site.cover_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 class="site-header-cover"
|
|
srcset="{{img_url @site.cover_image size="s"}} 300w,
|
|
{{img_url @site.cover_image size="m"}} 600w,
|
|
{{img_url @site.cover_image size="l"}} 1000w,
|
|
{{img_url @site.cover_image size="xl"}} 2000w"
|
|
sizes="100vw"
|
|
src="{{img_url @site.cover_image size="xl"}}"
|
|
alt=""
|
|
/>
|
|
{{/if}}
|
|
<h1 class="site-title">
|
|
{{#if @site.logo}}
|
|
<img class="site-logo" src="{{img_url @site.logo size="m"}}" alt="{{@site.title}}" />
|
|
{{else}}
|
|
{{@site.title}}
|
|
{{/if}}
|
|
</h1>
|
|
<p>{{@site.description}}</p>
|
|
</div>
|
|
{{/match}}
|
|
|
|
{{!-- The main content area --}}
|
|
<main id="site-main" class="site-main outer">
|
|
<div class="inner posts">
|
|
|
|
<div class="post-feed{{#match @custom.feed_layout "List"}} list{{/match}}">
|
|
{{#foreach posts}}
|
|
|
|
{{!-- The tag below includes the markup for each post - partials/post-card.hbs --}}
|
|
{{> "post-card"}}
|
|
|
|
{{/foreach}}
|
|
</div>
|
|
|
|
</div>
|
|
</main>
|