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

Commit 99355ee

Browse files
authored
Merge branch 'master' into team
2 parents 77da563 + c48b036 commit 99355ee

File tree

12 files changed

+221
-10
lines changed

12 files changed

+221
-10
lines changed

README.md

Lines changed: 69 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,74 @@
11
# Haskell Foundation website
22

3-
## Based on the IOHK Gatsby Starter
3+
[Gatsby](//www.gatsbyjs.com) based website.
4+
5+
### Installation
6+
7+
Download and install Gatsby locally. Go using command line to the folder root and type:
8+
9+
```
10+
npm i
11+
```
12+
13+
14+
### Run the website on localhost
15+
16+
```
17+
npm start
18+
```
19+
20+
### Build the website into the /build/ folder
21+
22+
Creates HTML export from the Gatsbsy engine.
23+
24+
```
25+
npm run build
26+
```
27+
28+
29+
### Adding custom pages
30+
```
31+
npm run create-pages -- /custom-page/
32+
```
33+
34+
35+
### Removing custom pages
36+
```
37+
npm run delete-pages -- /custom-page/
38+
```
39+
40+
41+
### Editing top navigation
42+
43+
Open file `resources/content/global/global-en.md` and add or delete items from `global_navigation:`. `global_navigation_item_title:` is for the link text. `global_navigation_item_link:` is for the page path. Be sure to have it identical to the page name you created before.
44+
45+
Example:
46+
47+
```
48+
- global_navigation_item_title: Custom page
49+
global_navigation_item_link: /custom-page/
50+
51+
```
52+
53+
54+
### Adding files to link (images, documents)
55+
56+
Add your files to `/static/images/`. Your files can be then linked on path `/images/...`.
57+
58+
Example: Adding file with filename niceimage.jpg to `/static/images/` will have its path on `/images/niceimage.jpg`. Which is what you use for the link. In HTML:
59+
60+
```
61+
<img src='/images/niceimage.jpg' alt='Nice image' />
62+
```
63+
64+
In markdown:
65+
66+
```
67+
![Nice image](/images/niceimage.jpg)
68+
```
69+
70+
71+
## More about IOHK Gatsby Starter
472

573
If you use VisualStudio Code then it's recommended that you download the [code tour](https://github.com/vsls-contrib/code-tour) extension to make use of the guided tours of the codebase. Otherwise the documentation below should be sufficient. The tours will be setup on `npm install`.
674

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: /affiliates/
1012
- global_navigation_item_title: Contact
1113
global_navigation_item_link: /contact/
1214
- global_navigation_item_title: News

resources/content/meta/affiliates.md

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

resources/content/pages/board-of-directors/board-of-directors-en.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
2-
about_title: en (English) Board of Directors Nominations
2+
about_title: en (English) Board of Directors
33
about_content:
4-
about_page_title: Board of Directors Nominations
4+
about_page_title: Board of Directors
55
about_page_content: |
66
77
### The Haskell Foundation Board of Directors

resources/content/pages/who-we-are/who-we-are-en.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ about_content:
1717
Foundation. The [board of directors](/board-of-directors) are responsible
1818
for managing. The *interim board* will serve the Haskell Foundation
1919
during it's initial launch phase and will manage the establishment of the
20-
first full board.
21-
22-
20+
first full board.
2321
team:
2422
- name: Simon Peyton Jones
2523
location: UK
@@ -168,4 +166,4 @@ about_content:
168166
169167
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.
170168
171-
---
169+
---

src/components/Page.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ const Page = ({ children, title }) => {
1616
<Container maxWidth='lg'>
1717
<Box marginTop={8} marginBottom={0}>
1818
<Grid container spacing={4}>
19-
<Grid item lg={3}>
19+
<Grid item lg={12}>
2020
<Box marginTop={0} marginBottom={0}>
2121
<Typography variant='h1' color='primary'>{title}</Typography>
2222
</Box>
2323
</Grid>
24-
<Grid item lg={9}>
24+
<Grid item lg={12}>
2525
<Box marginTop={1} marginBottom={0}>
2626
{children}
2727
</Box>

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

src/themes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ const theme = extendDefaultTheme({
107107
fontDisplay: 'swap',
108108
googleFontsURL: 'https://fonts.googleapis.com/css?family=Chivo:300,400,700',
109109
h1: {
110-
fontSize: 2,
110+
fontSize: 3,
111111
fontWeight: 300,
112112
lineHeight: 1.1,
113113
letterSpacing: -0.1,

0 commit comments

Comments
 (0)