@@ -20,6 +20,7 @@ import {releases as dataReleases} from '../../data/releases.js'
2020import { constantCollective } from '../util/constant-collective.js'
2121import { fmtCompact } from '../util/fmt-compact.js'
2222import { fmtPercent } from '../util/fmt-percent.js'
23+ import { fmtPlural } from '../util/fmt-plural.js'
2324import { pickRandom } from '../util/pick-random.js'
2425import { page } from './page.js'
2526
@@ -84,18 +85,6 @@ export function home(data) {
8485 ] )
8586 ] ,
8687 [
87- h ( '.article.content' , [
88- h ( 'h2' , 'Build' ) ,
89- h ( 'p' , [
90- h ( 'b' , 'We provide the building blocks' ) ,
91- ': from tiny, focussed, modular utilities to plugins that combine ' ,
92- 'them to perform bigger tasks. ' ,
93- 'And much, much more. ' ,
94- 'You can build on unified, mixing and matching building blocks ' ,
95- 'together, to make all kinds of interesting new things. '
96- ] )
97- ] ) ,
98- cases ( data . users , { max : 6 } ) ,
9988 h ( '.article.content' , [
10089 h ( 'h2' , 'Learn' ) ,
10190 h ( 'p' , [
@@ -106,9 +95,19 @@ export function home(data) {
10695 'make things with unified. '
10796 ] )
10897 ] ) ,
109- articlesList ( '/learn/' , articlesSort ( data . articles ) , {
110- max : 6
111- } ) ,
98+ articlesList ( '/learn/' , articlesSort ( data . articles ) , { max : 6 } ) ,
99+ h ( '.article.content' , [
100+ h ( 'h2' , 'Sponsor' ) ,
101+ h ( 'p' , [
102+ 'To support our efforts financially, sponsor us on ' ,
103+ h ( 'a' , { href : 'https://github.com/sponsors/unifiedjs' } , 'GitHub' ) ,
104+ ' or ' ,
105+ h ( 'a' , { href : 'http://opencollective.com/unified' } , 'OpenCollective' ) ,
106+ '. ' ,
107+ 'This lets us spend more time maintaining our projects and developing new ones. '
108+ ] )
109+ ] ) ,
110+ sponsors ( data . sponsors , { max : 6 } ) ,
112111 h ( '.article.content' , [
113112 h ( 'h2' , 'Explore' ) ,
114113 h ( 'p' , [
@@ -131,6 +130,18 @@ export function home(data) {
131130 ] )
132131 ] ) ,
133132 listPackage ( data , d , { trail : explore ( ) } ) ,
133+ h ( '.article.content' , [
134+ h ( 'h2' , 'Build' ) ,
135+ h ( 'p' , [
136+ h ( 'b' , 'We provide the building blocks' ) ,
137+ ': from tiny, focussed, modular utilities to plugins that combine ' ,
138+ 'them to perform bigger tasks. ' ,
139+ 'And much, much more. ' ,
140+ 'You can build on unified, mixing and matching building blocks ' ,
141+ 'together, to make all kinds of interesting new things. '
142+ ] )
143+ ] ) ,
144+ cases ( data . users , { max : 6 } ) ,
134145 h ( '.article.content' , [
135146 h ( 'h2' , 'Work' ) ,
136147 h ( 'p' , [
@@ -143,22 +154,17 @@ export function home(data) {
143154 ' are currently open (' ,
144155 fmtPercent ( open / ( open + closed ) ) ,
145156 '). ' ,
146- 'In the last 30 days, we’ve cut ' + releases + ' new releases.'
147- ] )
148- ] ) ,
149- release ( data ) ,
150- h ( '.article.content' , [
151- h ( 'h2' , 'Sponsor' ) ,
152- h ( 'p' , [
153- 'Thankfully, we are backed financially by our sponsors. ' ,
154- 'This allows us to spend more time maintaining our projects and ' ,
155- 'developing new ones. ' ,
156- 'To support our efforts financially, sponsor or back us on ' ,
157- h ( 'a' , { href : 'http://opencollective.com/unified' } , 'OpenCollective' ) ,
158- '.'
157+ // Note: data is sometimes missing.
158+ releases
159+ ? 'In the last 30 days, we’ve cut ' +
160+ releases +
161+ ' new ' +
162+ fmtPlural ( releases , { one : 'release' , other : 'releases' } ) +
163+ '.'
164+ : undefined
159165 ] )
160166 ] ) ,
161- sponsors ( data . sponsors , { max : 6 } )
167+ release ( data )
162168 ]
163169 )
164170
0 commit comments