Skip to content
This repository was archived by the owner on Dec 10, 2024. It is now read-only.

Commit a3f426d

Browse files
add affiliates page
1 parent 16e1912 commit a3f426d

File tree

6 files changed

+137
-0
lines changed

6 files changed

+137
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
export default {
2+
name: 'affiliates',
3+
label: 'affiliates',
4+
folder: 'resources/content/affiliates',
5+
create: false,
6+
delete: false,
7+
fields: [
8+
{
9+
label: 'Title',
10+
name: 'title',
11+
widget: 'string'
12+
},
13+
{
14+
name: 'content',
15+
label: 'affiliates page content',
16+
widget: 'object',
17+
fields: [
18+
{
19+
name: 'default_content',
20+
label: 'Default content',
21+
widget: 'string'
22+
}
23+
]
24+
}
25+
]
26+
}

netlify/collections/pages/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ import donations from './donations'
55
import news from './news'
66
import contact from './contact'
77
import whoweare from './who-we-are'
8+
import affiliates from './affiliates'
89
import home from './home'
910

1011
export default [
1112
notFound,
1213
home,
1314
whoweare,
15+
affiliates,
1416
contact,
1517
news,
1618
donations,

resources/content/global/global-en.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ global_content:
77
global_navigation_item_link: /
88
- global_navigation_item_title: Who we are
99
global_navigation_item_link: /who-we-are/
10+
- global_navigation_item_title: Affiliates
11+
global_navigation_item_link: /affilates/
1012
- global_navigation_item_title: Contact
1113
global_navigation_item_link: /contact/
1214
- global_navigation_item_title: News
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
about_title: en (English) affiliates page content
3+
about_content:
4+
about_page_title: Affiliates
5+
about_page_content: |
6+
7+
We invite existing Haskell projects, committees and communities to
8+
explicitly affiliate and align themselves with the Haskell Foundation.
9+
Affiliation means that the group supports the goals of the Haskell
10+
Foundation, and that the Haskell Foundation in turn supports this group.
11+
We require affiliated groups to adhere to guidelines around transparency,
12+
being open to new members, and follow the
13+
[Haskell committee guidelines for respectful communication](https://github.com/ghc-proposals/ghc-proposals/blob/master/GRC.rst).
14+
We believe that this will help us grow towards being a more open and
15+
welcoming community.
16+
17+
The following groups affiliated with the Haskell Foundation:
18+
19+
- The [Haskell IDE Team](https://github.com/haskell/haskell-language-server)
20+
- The [GHC Steering Committee](https://github.com/ghc-proposals/ghc-proposals)
21+
- [Haskell Weekly](https://haskellweekly.news/)
22+
23+
The following groups are in the process of affiliating. This means they
24+
endorse the Haskell Foundation but are still in the process of adopting the
25+
new guidelines:
26+
27+
- The [Core Libraries Committee](https://wiki.haskell.org/Core_Libraries_Committee)
28+
- The [Haskell.org Committee](https://www.haskell.org/haskell-org-committee)
29+
- The Haskell Admins
30+
- [Cabal](https://www.haskell.org/cabal/)
31+
32+
This is not a closed list! We very much want the Haskell Foundation to be
33+
something by _all of us_. Please [contact](/en/contact/) us if you are
34+
interested in joining us in our quest to make Haskell better for everyone.
35+
36+
#### The Hackage Trustees
37+
38+
Placeholder text until the Hackage Trustees provide an official statement.
39+
40+
#### Volunteers
41+
42+
This is a placeholder for space we will use to include key volunteers who are not on the board or with one of the affiliated committees.
43+
44+
---

src/pages/affiliates.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import React from 'react'
2+
import Grid from '@material-ui/core/Grid'
3+
import Layout from '../components/Layout'
4+
import Page from '../components/Page'
5+
import AffiliatesPageQuery from '../queries/AffiliatesPageQuery'
6+
import Markdown from '@input-output-hk/front-end-core-components/components/Markdown'
7+
8+
export default () => (
9+
<AffiliatesPageQuery
10+
render={(content) => (
11+
<Layout>
12+
<Page title={content.about_page_title}>
13+
<Grid container spacing={2}>
14+
<Grid item xs={12}>
15+
<Markdown source={content.about_page_content} />
16+
</Grid>
17+
</Grid>
18+
</Page>
19+
</Layout>
20+
)}
21+
/>
22+
)

src/queries/AffiliatesPageQuery.js

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import React from 'react'
2+
import PropTypes from 'prop-types'
3+
import { StaticQuery, graphql } from 'gatsby'
4+
import Language from '@input-output-hk/front-end-core-components/components/Language'
5+
6+
const AffiliatesPageQuery = ({ render }) => (
7+
<Language.Consumer>
8+
{({ key: lang }) => (
9+
<StaticQuery
10+
query={graphql`
11+
query {
12+
allFile(filter:{relativePath:{glob:"content/pages/affiliates/*.md"}}) {
13+
nodes{
14+
relativePath,
15+
childMarkdownRemark{
16+
frontmatter {
17+
about_content {
18+
about_page_title
19+
about_page_content
20+
}
21+
}
22+
}
23+
}
24+
}
25+
}
26+
`}
27+
render={({ allFile }) => {
28+
const content = allFile.nodes.filter(node => node.relativePath === `content/pages/affiliates/affiliates-${lang}.md`).shift()
29+
if (!content || !content.childMarkdownRemark) throw new Error(`No affiliates translations found for language ${lang}`)
30+
return render(content.childMarkdownRemark.frontmatter.about_content)
31+
}}
32+
/>
33+
)}
34+
</Language.Consumer>
35+
)
36+
37+
AffiliatesPageQuery.propTypes = {
38+
render: PropTypes.func.isRequired
39+
}
40+
41+
export default AffiliatesPageQuery

0 commit comments

Comments
 (0)