@@ -20,6 +20,7 @@ import {releases as dataReleases} from '../../data/releases.js'
20
20
import { constantCollective } from '../util/constant-collective.js'
21
21
import { fmtCompact } from '../util/fmt-compact.js'
22
22
import { fmtPercent } from '../util/fmt-percent.js'
23
+ import { fmtPlural } from '../util/fmt-plural.js'
23
24
import { pickRandom } from '../util/pick-random.js'
24
25
import { page } from './page.js'
25
26
@@ -84,18 +85,6 @@ export function home(data) {
84
85
] )
85
86
] ,
86
87
[
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 } ) ,
99
88
h ( '.article.content' , [
100
89
h ( 'h2' , 'Learn' ) ,
101
90
h ( 'p' , [
@@ -106,9 +95,19 @@ export function home(data) {
106
95
'make things with unified. '
107
96
] )
108
97
] ) ,
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 } ) ,
112
111
h ( '.article.content' , [
113
112
h ( 'h2' , 'Explore' ) ,
114
113
h ( 'p' , [
@@ -131,6 +130,18 @@ export function home(data) {
131
130
] )
132
131
] ) ,
133
132
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 } ) ,
134
145
h ( '.article.content' , [
135
146
h ( 'h2' , 'Work' ) ,
136
147
h ( 'p' , [
@@ -143,22 +154,17 @@ export function home(data) {
143
154
' are currently open (' ,
144
155
fmtPercent ( open / ( open + closed ) ) ,
145
156
'). ' ,
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
159
165
] )
160
166
] ) ,
161
- sponsors ( data . sponsors , { max : 6 } )
167
+ release ( data )
162
168
]
163
169
)
164
170
0 commit comments