You've already forked Ghost-Theme-Source
Optimization
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<h2 class="gh-featured-title">Featured</h2>
|
||||
<div class="gh-featured-feed">
|
||||
{{#foreach featured}}
|
||||
{{> "post-card"}}
|
||||
{{> "post-card" imageSizes="80px"}}
|
||||
{{/foreach}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
{{#match headerStyle "Highlight"}}
|
||||
<div class="gh-header-left">
|
||||
{{#foreach posts limit="1"}}
|
||||
{{> "post-card"}}
|
||||
{{> "post-card" imageSizes="(max-width: 767px) calc(100vw - max(8vmin, 40px)), 640px"}}
|
||||
{{/foreach}}
|
||||
</div>
|
||||
<div class="gh-header-middle">
|
||||
@@ -31,7 +31,7 @@
|
||||
{{else}}
|
||||
<div class="gh-featured-feed">
|
||||
{{#foreach posts from="5" limit="6"}}
|
||||
{{> "post-card"}}
|
||||
{{> "post-card" imageSizes="80px"}}
|
||||
{{/foreach}}
|
||||
</div>
|
||||
{{/if}}
|
||||
@@ -47,7 +47,11 @@
|
||||
{{#match @number 5}}
|
||||
<div class="gh-header-right">
|
||||
{{/match}}
|
||||
{{> "post-card"}}
|
||||
{{#if @first}}
|
||||
{{> "post-card" imageSizes="640px"}}
|
||||
{{else}}
|
||||
{{> "post-card"}}
|
||||
{{/if}}
|
||||
{{#match @number 4}}
|
||||
</div>
|
||||
{{/match}}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
{{#match posts.length ">=" 4}}
|
||||
{{#get "posts" include="authors" limit="16"}}
|
||||
{{#foreach posts from="5" limit="12"}}
|
||||
{{> "post-card"}}
|
||||
{{> "post-card" lazyLoad=true}}
|
||||
{{/foreach}}
|
||||
{{/get}}
|
||||
{{/match}}
|
||||
@@ -33,7 +33,7 @@
|
||||
{{#match posts.length ">=" 10}}
|
||||
{{#get "posts" include="authors" limit="22"}}
|
||||
{{#foreach posts from="11" limit="12"}}
|
||||
{{> "post-card"}}
|
||||
{{> "post-card" lazyLoad=true}}
|
||||
{{/foreach}}
|
||||
{{/get}}
|
||||
{{/match}}
|
||||
@@ -42,14 +42,14 @@
|
||||
{{#match posts.length ">=" 7}}
|
||||
{{#get "posts" include="authors" limit="19"}}
|
||||
{{#foreach posts from="8" limit="12"}}
|
||||
{{> "post-card"}}
|
||||
{{> "post-card" lazyLoad=true}}
|
||||
{{/foreach}}
|
||||
{{/get}}
|
||||
{{/match}}
|
||||
{{else}}
|
||||
{{#get "posts" include="authors" limit="12"}}
|
||||
{{#foreach posts}}
|
||||
{{> "post-card"}}
|
||||
{{> "post-card" lazyLoad=true}}
|
||||
{{/foreach}}
|
||||
{{/get}}
|
||||
{{/match}}
|
||||
@@ -65,14 +65,14 @@
|
||||
{{/get}}
|
||||
{{/match}}
|
||||
{{#foreach posts}}
|
||||
{{> "post-card"}}
|
||||
{{> "post-card" lazyLoad=true}}
|
||||
{{/foreach}}
|
||||
{{/match}}
|
||||
|
||||
{{!-- Tag and author pages --}}
|
||||
{{#match feed "archive"}}
|
||||
{{#foreach posts}}
|
||||
{{> "post-card"}}
|
||||
{{> "post-card" lazyLoad=true}}
|
||||
{{/foreach}}
|
||||
{{/match}}
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
{{#match feed "recent"}}
|
||||
{{#get "posts" include="authors" filter="id:-{{post.id}}" limit="4" as |next|}}
|
||||
{{#foreach next}}
|
||||
{{> "post-card"}}
|
||||
{{> "post-card" lazyLoad=true}}
|
||||
{{/foreach}}
|
||||
{{/get}}
|
||||
{{/match}}
|
||||
@@ -92,7 +92,7 @@
|
||||
<aside class="gh-sidebar">
|
||||
<section class="gh-about">
|
||||
{{#if @site.icon}}
|
||||
<img class="gh-about-icon" src="{{@site.icon}}" alt="{{@site.title}}">
|
||||
<img class="gh-about-icon" src="{{@site.icon}}" alt="{{@site.title}}" loading="lazy">
|
||||
{{/if}}
|
||||
<h3 class="gh-about-title is-title">{{@site.title}}</h3>
|
||||
{{#if @site.description}}
|
||||
|
||||
Reference in New Issue
Block a user