Skip to content

Commit 7d5eeba

Browse files
committed
refactor: Update npm dependencies and improve image lazy loading
1 parent af412c9 commit 7d5eeba

File tree

10 files changed

+107
-1545
lines changed

10 files changed

+107
-1545
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "ghost-source-theme",
33
"description": "Fork of the default theme of Ghost publishing platform, customized for sredevops.org",
44
"demo": "https://sredevops.org",
5-
"version": "1.5.3",
5+
"version": "1.5.6",
66
"engines": {
77
"ghost": ">=5.0.0"
88
},
@@ -42,7 +42,7 @@
4242
],
4343
"devDependencies": {
4444
"autoprefixer": "10.4.19",
45-
"cssnano": "7.0.3",
45+
"cssnano": "7.0.4",
4646
"gulp": "5.0.0",
4747
"gulp-concat": "2.6.1",
4848
"gulp-livereload": "4.0.2",

partials/components/header-content.hbs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@
2121
{{/foreach}}
2222
</div>
2323
<div class="gh-header-middle">
24-
{{#foreach posts from="2" limit="2"}}
25-
{{> "post-card"}}
24+
{{#foreach posts from="2" limit="3"}}
25+
{{> "post-card" imageSizes="s"}}
2626
{{/foreach}}
2727
</div>
2828
<div class="gh-header-right">
2929
{{#if @custom.show_featured_posts}}
3030
{{> "components/featured" showFeatured=@custom.show_featured_posts limit=4}}
3131
{{else}}
3232
<div class="gh-featured-feed">
33-
{{#foreach posts from="4" limit="5"}}
34-
{{> "post-card" imageSizes="80px"}}
33+
{{#foreach posts from="4" limit="4"}}
34+
{{> "post-card" imageSizes="s"}}
3535
{{/foreach}}
3636
</div>
3737
{{/if}}

partials/components/navigation.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
{{#unless @site.members_invite_only}}
3838
{{#unless hideSubscribeButton}}
3939
{{!-- <span><a class="sign-google" href="https://login.spectralwebservices.com/auth/google?inbound=b89c0c7a-1b79-4c68-b75e-32060012d7ca" alt="Sign in with Google">Google</a></span> --}}
40-
<span class="gh-button">Login with &nbsp;<a class="sign-github" href="https://login.spectralwebservices.com/auth/github?inbound=b89c0c7a-1b79-4c68-b75e-32060012d7ca" alt="Sign in with Github">Github</a></span>
40+
<span class="gh-button"><a href="https://login.spectralwebservices.com/auth/github?inbound=b89c0c7a-1b79-4c68-b75e-32060012d7ca" alt="Sign in with Github">Login with &nbsp;</a><a class="sign-github" href="https://login.spectralwebservices.com/auth/github?inbound=b89c0c7a-1b79-4c68-b75e-32060012d7ca" alt="Sign in with Github">Github</a></span>
4141
{{/unless}}
4242
{{else}}
4343
{{!-- <span><a class="sign-google" href="https://login.spectralwebservices.com/auth/google?inbound=b89c0c7a-1b79-4c68-b75e-32060012d7ca" alt="Sign in with Google">Google</a></span> --}}
44-
<span class="gh-button">Login with &nbsp;<a class="sign-github" href="https://login.spectralwebservices.com/auth/github?inbound=b89c0c7a-1b79-4c68-b75e-32060012d7ca" alt="Sign in with Github">Github</a></span>
44+
<span class="gh-button"><a href="https://login.spectralwebservices.com/auth/github?inbound=b89c0c7a-1b79-4c68-b75e-32060012d7ca" alt="Sign in with Github">Login with &nbsp;</a><a class="sign-github" href="https://login.spectralwebservices.com/auth/github?inbound=b89c0c7a-1b79-4c68-b75e-32060012d7ca" alt="Sign in with Github">Github</a></span>
4545
{{/unless}}
4646
{{else}}
4747
<a class="gh-button" href="#/portal/account" data-portal="account">Settings</a>

partials/components/post-list.hbs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
{{#match @custom.header_style "Highlight"}}
2424
{{#if @custom.show_featured_posts}}
2525
{{#match posts.length ">=" 4}}
26-
{{#get "posts" include="authors" limit="16"}}
27-
{{#foreach posts from="5" limit="12"}}
26+
{{#get "posts" include="authors" limit="24"}}
27+
{{#foreach posts from="4" limit="24"}}
2828
{{> "post-card" lazyLoad=true}}
2929
{{/foreach}}
3030
{{/get}}

partials/feature-image.hbs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{{#if feature_image}}
22
<figure class="gh-article-image">
33
<img
4-
srcset="{{img_url feature_image size="s"}} 320w,
5-
{{img_url feature_image size="m"}} 600w,
6-
{{img_url feature_image size="l"}} 960w,
7-
{{img_url feature_image size="xl"}} 1200w,
8-
{{img_url feature_image size="xxl"}} 2000w"
9-
src="{{img_url feature_image size="s"}}"
4+
srcset="{{img_url feature_image size="xs" format="webp"}} 120w,
5+
{{img_url feature_image size="s" format="webp"}} 320w,
6+
{{img_url feature_image size="m" format="webp"}} 600w,
7+
{{img_url feature_image size="l" format="webp"}} 960w,
8+
{{img_url feature_image size="xl" format="webp"}} 1200w,
9+
{{img_url feature_image size="xxl" format="webp"}} 2000w"
10+
src="{{img_url feature_image size="s" format="webp"}}"
1011
alt="{{title}}"
1112
>
1213
{{#if feature_image_caption}}

0 commit comments

Comments
 (0)