Skip to content

Commit 476d50b

Browse files
committed
Refactor to reorder some content
1 parent 26cc145 commit 476d50b

File tree

4 files changed

+50
-35
lines changed

4 files changed

+50
-35
lines changed

generate/component/sponsor/byline.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import {h} from 'hastscript'
66

7+
const gh = 'https://github.com/sponsors/unifiedjs'
78
const oc = 'http://opencollective.com/unified'
89

910
/**
@@ -16,6 +17,8 @@ export function byline() {
1617
'Financial support lets the team spend more time maintaining existing ',
1718
'projects and developing new ones. ',
1819
'To support unified, become a sponsor or backer on ',
20+
h('a', {href: gh}, 'GitHub'),
21+
' or ',
1922
h('a', {href: oc}, 'OpenCollective'),
2023
'.'
2124
])

generate/page/community.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,17 @@ export function community(data) {
3030
return page(
3131
h('.row-l.column-l', {}, h('h2', {}, breadcrumbs('/community/'))),
3232
[
33-
h('.article.content', [h('h3', 'Showcase'), casesByline()]),
34-
cases(data.users, {max: 3}),
33+
h('.article.content', [
34+
h('p', [
35+
'unified is an open source effort by people volunteering their time. ',
36+
'A team of maintainers among the broader community. '
37+
]),
38+
h('h3', 'Sponsors'),
39+
sponsorsByline()
40+
]),
41+
sponsors(data.sponsors, {max: 6}),
3542
h('.article.content', [h('h3', 'Team'), membersByline()]),
3643
members(data, sortMembers(data, data.humans), {max: 6}),
37-
h('.article.content', [h('h3', 'Sponsors'), sponsorsByline()]),
38-
sponsors(data.sponsors, {max: 6}),
3944
h('.article.content', [
4045
h('h3', 'Support'),
4146
h('p', [
@@ -96,7 +101,9 @@ export function community(data) {
96101
h('a', {href: '/explore/release/'}, 'Releases'),
97102
' section for recent releases.'
98103
])
99-
])
104+
]),
105+
h('.article.content', [h('h3', 'Showcase'), casesByline()]),
106+
cases(data.users, {max: 3})
100107
]
101108
)
102109
}

generate/page/home.js

Lines changed: 35 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import {releases as dataReleases} from '../../data/releases.js'
2020
import {constantCollective} from '../util/constant-collective.js'
2121
import {fmtCompact} from '../util/fmt-compact.js'
2222
import {fmtPercent} from '../util/fmt-percent.js'
23+
import {fmtPlural} from '../util/fmt-plural.js'
2324
import {pickRandom} from '../util/pick-random.js'
2425
import {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

generate/page/learn.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ export function learn(sections) {
2828

2929
return page(h('.row-l.column-l', {}, h('h2', {}, breadcrumbs('/learn/'))), [
3030
h('.article.content', [
31-
h('h3', 'Intro'),
3231
h('p', [
3332
'unified is an interface for parsing, inspecting, transforming, and ',
3433
'serializing content through syntax trees. ',

0 commit comments

Comments
 (0)