Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handlebars template fixes #90

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions default.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="{{asset "built/index.css"}}" />
<script src="{{asset "built/index.js"}}" defer></script>
<link rel="stylesheet" href="{{asset 'built/index.css'}}" />
<script src="{{asset 'built/index.js'}}" defer></script>

<title>{{meta_title}}</title>

{{ghost_head}}
{{!-- Outputs important meta data and settings, should always be in <head> --}}
{{!-- Outputs important meta data and settings, should always be in < head > --}}

</head>
<body class="{{body_class}}">
Expand Down Expand Up @@ -40,10 +40,10 @@
<div class="gh-head-actions-list">
{{search}}
{{#if @site.members_enabled}}
{{^if @member}}
<a class="gh-button" href="{{@site.signup_url}}">Subscribe</a>
{{else}}
{{#if @member}}
<a class="gh-button" href="#/portal/account">Account</a>
{{else}}
<a class="gh-button" href="{{@site.signup_url}}">Subscribe</a>
{{/if}}
{{/if}}
</div>
Expand All @@ -61,7 +61,7 @@
<footer class="gh-foot">
<div class="gh-container">
<div class="gh-foot-menu">
{{navigation type="secondary"}}
{{navigation type='secondary'}}
</div>
<div class="gh-foot-meta">
Published with <a href="https://ghost.org" target="_blank" rel="noopener">Ghost</a>
Expand All @@ -71,7 +71,7 @@

</div>

{{!-- <foot> --}}
{{!-- < foot > --}}
{{ghost_foot}}
{{!-- Outputs important scripts - should always be included before closing body tag --}}

Expand Down
8 changes: 4 additions & 4 deletions error.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="{{asset "built/index.css"}}" />
<script src="{{asset "built/index.js"}}" defer></script>
<link rel="stylesheet" href="{{asset 'built/index.css'}}" />
<script src="{{asset 'built/index.js'}}" defer></script>

<title>{{meta_title}}</title>

{{ghost_head}}
{{!-- Outputs important meta data and settings, should always be in <head> --}}
{{!-- Outputs important meta data and settings, should always be in < head > --}}

</head>

Expand Down Expand Up @@ -100,7 +100,7 @@

</div>

{{!-- <foot> --}}
{{!-- < foot > --}}
{{ghost_foot}}
{{!-- Outputs important scripts - should always be included before closing body tag --}}

Expand Down
1 change: 0 additions & 1 deletion members/signup.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
</ul>
{{/if}}

</ul>
{{#if monthly_price}}
<a class="button primary fit" href="javascript:void(0)" data-members-plan="Monthly">Choose this
plan</a>
Expand Down
56 changes: 28 additions & 28 deletions partials/card.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,49 @@ Re-usable card for linking to posts
<a class="gh-card-link" href="{{url}}">
{{#if feature_image}}
<picture class="gh-card-picture">
<source
<source
srcset="
{{img_url feature_image size="xxs" format="avif"}} 30w,
{{img_url feature_image size="xs" format="avif"}} 100w,
{{img_url feature_image size="s" format="avif"}} 300w,
{{img_url feature_image size="m" format="avif"}} 600w,
{{img_url feature_image size="l" format="avif"}} 1200w,
{{img_url feature_image size="xl" format="avif"}} 2000w"
{{^if @first}}sizes="(min-width: 1200px) 1200px, 100vw)"{{else}}sizes="(min-width: 800px) 100vw, 700px"{{/if}}
{{img_url feature_image size='xxs' format='avif'}} 30w,
{{img_url feature_image size='xs' format='avif'}} 100w,
{{img_url feature_image size='s' format='avif'}} 300w,
{{img_url feature_image size='m' format='avif'}} 600w,
{{img_url feature_image size='l' format='avif'}} 1200w,
{{img_url feature_image size='xl' format='avif'}} 2000w"
sizes="{{#if @first}}(min-width: 800px) 100vw, 700px{{else}}(min-width: 1200px) 1200px, 100vw{{/if}}"
type="image/avif"
{{^if @first}}loading="lazy"{{/if}}
loading="{{#if @first}}eager{{else}}lazy{{/if}}"
>
<source
<source
srcset="
{{img_url feature_image size="xxs" format="webp"}} 30w,
{{img_url feature_image size="xs" format="webp"}} 100w,
{{img_url feature_image size="s" format="webp"}} 300w,
{{img_url feature_image size="m" format="webp"}} 600w,
{{img_url feature_image size="l" format="webp"}} 1200w,
{{img_url feature_image size="xl" format="webp"}} 2000w"
{{^if @first}}sizes="(min-width: 1200px) 1200px, 100vw)"{{else}}sizes="(min-width: 800px) 100vw, 700px"{{/if}}
{{img_url feature_image size='xxs' format='webp'}} 30w,
{{img_url feature_image size='xs' format='webp'}} 100w,
{{img_url feature_image size='s' format='webp'}} 300w,
{{img_url feature_image size='m' format='webp'}} 600w,
{{img_url feature_image size='l' format='webp'}} 1200w,
{{img_url feature_image size='xl' format='webp'}} 2000w"
sizes="{{#if @first}}(min-width: 800px) 100vw, 700px{{else}}(min-width: 1200px) 1200px, 100vw{{/if}}"
type="image/webp"
{{^if @first}}loading="lazy"{{/if}}
loading="{{#if @first}}eager{{else}}lazy{{/if}}"

>
<img
srcset="
{{img_url feature_image size="xxs"}} 30w,
{{img_url feature_image size="xs"}} 100w,
{{img_url feature_image size="s"}} 300w,
{{img_url feature_image size="m"}} 600w,
{{img_url feature_image size="l"}} 1200w,
{{img_url feature_image size="xl"}} 2000w"
{{^if @first}}sizes="(min-width: 1200px) 1200px, 100vw)"{{else}}sizes="(min-width: 800px) 100vw, 700px"{{/if}}
src="{{img_url feature_image size="m"}}"
{{img_url feature_image size='xxs'}} 30w,
{{img_url feature_image size='xs'}} 100w,
{{img_url feature_image size='s'}} 300w,
{{img_url feature_image size='m'}} 600w,
{{img_url feature_image size='l'}} 1200w,
{{img_url feature_image size='xl'}} 2000w"
sizes="{{#if @first}}(min-width: 800px) 100vw, 700px{{else}}(min-width: 1200px) 1200px, 100vw{{/if}}"
src="{{img_url feature_image size='m'}}"
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}"
class="gh-card-image"
{{^if @first}}loading="lazy"{{/if}}
loading="{{#if @first}}eager{{else}}lazy{{/if}}"
>
</picture>
{{/if}}
<div class="gh-card-content">
<span class="gh-card-meta"><time datetime="{{date format="YYYY-MM-DD"}}">{{date format="D MMM YYYY"}}</time> <span class="bull">&bull;</span> {{reading_time}}</span>
<span class="gh-card-meta"><time datetime="{{date format='YYYY-MM-DD'}}">{{date format='D MMM YYYY'}}</time> <span class="bull">&bull;</span> {{reading_time}}</span>
<h2 class="gh-card-title">{{title}}</h2>
<p>{{excerpt}}</p>
<strong>Read more</strong>
Expand Down
50 changes: 25 additions & 25 deletions post.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<article class="gh-article {{post_class}}">

<header class="gh-header gh-canvas">
<span class="gh-post-meta"><time datetime="{{date format="YYYY-MM-DD"}}">{{date format="D MMM YYYY"}}</time> <span class="bull">&bull;</span> {{reading_time}}</span>
<span class="gh-post-meta"><time datetime="{{date format='YYYY-MM-DD'}}">{{date format='D MMM YYYY'}}</time> <span class="bull">&bull;</span> {{reading_time}}</span>
<h1 class="gh-title">{{title}}</h1>

{{#if custom_excerpt}}
Expand All @@ -15,38 +15,38 @@
{{#if feature_image}}
<figure class="gh-feature-image">
<picture>
<source
<source
srcset="
{{img_url feature_image size="xxs" format="avif"}} 30w,
{{img_url feature_image size="xs" format="avif"}} 100w,
{{img_url feature_image size="s" format="avif"}} 300w,
{{img_url feature_image size="m" format="avif"}} 600w,
{{img_url feature_image size="l" format="avif"}} 1200w,
{{img_url feature_image size="xl" format="avif"}} 2000w"
sizes="(min-width: 1200px) 1200px, 90vw"
{{img_url feature_image size='xxs' format='avif'}} 30w,
{{img_url feature_image size='xs' format='avif'}} 100w,
{{img_url feature_image size='s' format='avif'}} 300w,
{{img_url feature_image size='m' format='avif'}} 600w,
{{img_url feature_image size='l' format='avif'}} 1200w,
{{img_url feature_image size='xl' format='avif'}} 2000w"
sizes="(min-width: 1200px) 1200px, 90vw"
type="image/avif"
>
<source
<source
srcset="
{{img_url feature_image size="xxs" format="webp"}} 30w,
{{img_url feature_image size="xs" format="webp"}} 100w,
{{img_url feature_image size="s" format="webp"}} 300w,
{{img_url feature_image size="m" format="webp"}} 600w,
{{img_url feature_image size="l" format="webp"}} 1200w,
{{img_url feature_image size="xl" format="webp"}} 2000w"
sizes="(min-width: 1200px) 1200px, 90vw"
{{img_url feature_image size='xxs' format='webp'}} 30w,
{{img_url feature_image size='xs' format='webp'}} 100w,
{{img_url feature_image size='s' format='webp'}} 300w,
{{img_url feature_image size='m' format='webp'}} 600w,
{{img_url feature_image size='l' format='webp'}} 1200w,
{{img_url feature_image size='xl' format='webp'}} 2000w"
sizes="(min-width: 1200px) 1200px, 90vw"
type="image/webp"
>
<img
srcset="
{{img_url feature_image size="xxs"}} 30w,
{{img_url feature_image size="xs"}} 100w,
{{img_url feature_image size="s"}} 300w,
{{img_url feature_image size="m"}} 600w,
{{img_url feature_image size="l"}} 1200w,
{{img_url feature_image size="xl"}} 2000w"
sizes="(min-width: 1200px) 1200px, 90vw"
src="{{img_url feature_image size="l"}}"
{{img_url feature_image size='xxs'}} 30w,
{{img_url feature_image size='xs'}} 100w,
{{img_url feature_image size='s'}} 300w,
{{img_url feature_image size='m'}} 600w,
{{img_url feature_image size='l'}} 1200w,
{{img_url feature_image size='xl'}} 2000w"
sizes="(min-width: 1200px) 1200px, 90vw"
src="{{img_url feature_image size='l'}}"
alt="{{#if feature_image_alt}}{{feature_image_alt}}{{else}}{{title}}{{/if}}"
>
</picture>
Expand Down