Skip to content

Commit 912961a

Browse files
Updated number of posts to show on the homepage
1 parent 4ca2598 commit 912961a

File tree

5 files changed

+34
-22
lines changed

5 files changed

+34
-22
lines changed

assets/built/screen.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/built/screen.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/css/screen.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1644,7 +1644,7 @@ Search LOGO Login Subscribe
16441644
/* 11.2. Without sidebar */
16451645

16461646
.gh-container.is-list:not(.has-sidebar) :is(.gh-container-title, .gh-main, .gh-more) {
1647-
grid-column: 4 / span 11;
1647+
grid-column: 3 / span 12;
16481648
}
16491649

16501650
.gh-container.is-grid:not(.has-sidebar) .gh-main {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
},
151151
"highlight_featured_posts": {
152152
"type": "boolean",
153-
"default": true,
153+
"default": false,
154154
"group": "homepage",
155155
"visibility": "header_style:[Highlight, Magazine]"
156156
},

partials/components/post-list.hbs

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,33 +22,45 @@
2222
{{#match @custom.header_style "Highlight"}}
2323
{{#match posts.length ">=" 10}}
2424
{{#if @custom.highlight_featured_posts}}
25-
{{#foreach posts from="5" limit="12"}}
26-
{{> "post-card"}}
27-
{{/foreach}}
25+
{{#get "posts" limit="16"}}
26+
{{#foreach posts from="5" limit="12"}}
27+
{{> "post-card"}}
28+
{{/foreach}}
29+
{{/get}}
2830
{{else}}
29-
{{#foreach posts from="11" limit="12"}}
30-
{{> "post-card"}}
31-
{{/foreach}}
31+
{{#get "posts" limit="22"}}
32+
{{#foreach posts from="11" limit="12"}}
33+
{{> "post-card"}}
34+
{{/foreach}}
35+
{{/get}}
3236
{{/if}}
3337
{{else}}
34-
{{#foreach posts limit="12"}}
35-
{{> "post-card"}}
36-
{{/foreach}}
38+
{{#get "posts" limit="12"}}
39+
{{#foreach posts}}
40+
{{> "post-card"}}
41+
{{/foreach}}
42+
{{/get}}
3743
{{/match}}
3844
{{else match @custom.header_style "Magazine"}}
3945
{{#match posts.length ">=" 7}}
40-
{{#foreach posts from="8" limit="12"}}
41-
{{> "post-card"}}
42-
{{/foreach}}
46+
{{#get "posts" limit="19"}}
47+
{{#foreach posts from="8" limit="12"}}
48+
{{> "post-card"}}
49+
{{/foreach}}
50+
{{/get}}
4351
{{else}}
44-
{{#foreach posts limit="12"}}
45-
{{> "post-card"}}
46-
{{/foreach}}
52+
{{#get "posts" limit="12"}}
53+
{{#foreach posts}}
54+
{{> "post-card"}}
55+
{{/foreach}}
56+
{{/get}}
4757
{{/match}}
4858
{{else}}
49-
{{#foreach posts limit="12"}}
50-
{{> "post-card"}}
51-
{{/foreach}}
59+
{{#get "posts" limit="12"}}
60+
{{#foreach posts}}
61+
{{> "post-card"}}
62+
{{/foreach}}
63+
{{/get}}
5264
{{/match}}
5365
{{/match}}
5466

0 commit comments

Comments
 (0)