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

Commit b851959

Browse files
author
flowirtz
committed
🍱 Add partner logos
1 parent 6703df0 commit b851959

10 files changed

+92
-38
lines changed

src/components/LogoCloud/index.jsx

+86-38
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,93 @@
11
import React from 'react';
2-
import logocloudStyles from './logocloud.module.css';
2+
import { StaticQuery, graphql } from 'gatsby';
33

4+
import logocloudStyles from './logocloud.module.css';
45

5-
export default function LogoCloud() {
6-
const logos = [{
7-
src: "https://raw.githubusercontent.com/openclimatefix/website/master/src/images/sponsor_esa.png",
8-
href: "#"
9-
}, {
10-
src: "https://raw.githubusercontent.com/openclimatefix/website/master/src/images/sponsor_raais.png",
11-
href: "#"
12-
}, {
13-
src: "https://camo.githubusercontent.com/1abc6e2b23f17a79a55ee991e6981e46cf338695/68747470733a2f2f63646e2e737667706f726e2e636f6d2f6c6f676f732f7a65706c696e2e737667",
14-
href: "#"
15-
}, {
16-
src: "https://camo.githubusercontent.com/6de73ae841384e69cf10c444cc63022655649a6c/68747470733a2f2f63646e2e737667706f726e2e636f6d2f6c6f676f732f73656d616e7469632d7765622e737667",
17-
href: "#"
18-
}, {
19-
src: "https://camo.githubusercontent.com/deeb3fdf4ccc12c58598858c8a9b96aed919c044/68747470733a2f2f63646e2e737667706f726e2e636f6d2f6c6f676f732f6170707369676e616c2e737667",
20-
href: "#"
21-
}, {
22-
src: "https://raw.githubusercontent.com/openclimatefix/website/master/src/images/sponsor_esa.png",
23-
href: "#"
24-
}, {
25-
src: "https://raw.githubusercontent.com/openclimatefix/website/master/src/images/sponsor_esa.png",
26-
href: "#"
27-
}, {
28-
src: "https://raw.githubusercontent.com/openclimatefix/website/master/src/images/sponsor_esa.png",
29-
href: "#"
30-
}, {
31-
src: "https://raw.githubusercontent.com/openclimatefix/website/master/src/images/sponsor_esa.png",
32-
href: "#"
33-
}, {
34-
src: "https://raw.githubusercontent.com/openclimatefix/website/master/src/images/sponsor_esa.png",
35-
href: "#"
36-
}];
6+
export default function LogoCloud({ logos }) {
7+
const LOGOS = logos || [
8+
{
9+
name: 'ESA Business Applications',
10+
image: 'esa_space_solutions.png',
11+
link: 'https://business.esa.int/',
12+
},
13+
{
14+
name: 'Open Data Institute',
15+
image: 'odi.png',
16+
link: 'https://theodi.org/',
17+
},
18+
{
19+
name: 'The Alan Turing Institute',
20+
image: 'turing.png',
21+
link: 'https://www.turing.ac.uk/',
22+
},
23+
{
24+
name: 'The Climate Subak',
25+
image: 'subak.png',
26+
link: 'https://www.subak.org/',
27+
},
28+
{
29+
name: 'Machine Intelligence Garage',
30+
image: 'MI-Garage_Badge_cohort.png',
31+
link: 'https://www.migarage.ai/',
32+
},
33+
{
34+
name: 'RAAIS Foundation',
35+
image: 'raais_foundation.png',
36+
link: 'https://www.raais.org/',
37+
},
38+
{
39+
name: 'HAO',
40+
image: 'hao_black.png',
41+
link: 'https://haocreative.ca/',
42+
},
43+
{
44+
name: 'Icebreaker One',
45+
image: 'icebreakerOneURL.png',
46+
link: 'https://icebreakerone.org/',
47+
},
48+
];
3749

3850
return (
39-
<div className={logocloudStyles.logogrid}>
40-
{logos.map(({src, href}, index) => (
41-
<a key={`logo-${index}`} href={href}><img src={src} /></a>
42-
))}
43-
</div>
51+
<StaticQuery
52+
query={graphql`
53+
query LogosQuery {
54+
allFile(filter: { relativeDirectory: { eq: "logos" } }) {
55+
edges {
56+
node {
57+
relativePath
58+
childImageSharp {
59+
fluid(maxWidth: 300, maxHeight: 250) {
60+
...GatsbyImageSharpFluid
61+
}
62+
fixed(width: 300) {
63+
...GatsbyImageSharpFixed
64+
}
65+
}
66+
}
67+
}
68+
}
69+
}
70+
`}
71+
render={data => (
72+
<div className={logocloudStyles.logogrid}>
73+
{LOGOS.map(({ name, image, link }) => {
74+
const img = data.allFile.edges.find(({ node }) =>
75+
node.relativePath.endsWith(image)
76+
).node;
77+
78+
return (
79+
<a key={`logo-${name}`} href={link} type="button">
80+
<img
81+
src={img.childImageSharp.fixed.src}
82+
title={name}
83+
alt={`Logo for ${name}`}
84+
style={{ filter: 'grayscale(100%)' }}
85+
/>
86+
</a>
87+
);
88+
})}
89+
</div>
90+
)}
91+
/>
4492
);
4593
}
66.4 KB
Loading
17.2 KB
Loading

src/images/logos/hao_black.png

3.87 KB
Loading

src/images/logos/icebreakerOneURL.png

11.5 KB
Loading

src/images/logos/odi.png

12.8 KB
Loading

src/images/logos/raais_foundation.png

54.1 KB
Loading

src/images/logos/subak.png

28.2 KB
Loading

src/images/logos/turing.png

85.2 KB
Loading

src/pages/index.jsx

+6
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import Header from '../components/Header';
66
import Footer from '../components/Footer';
77
import CloudHero from '../components/CloudHero';
88
import TeamSection from '../components/TeamSection';
9+
import LogoCloud from '../components/LogoCloud';
910

1011
import '../components/layout.css';
1112

@@ -94,6 +95,11 @@ const IndexPage = () => (
9495
</p>
9596
</div>
9697

98+
<h2 id="partners" className="mt-16 mb-2">
99+
Partners
100+
</h2>
101+
<LogoCloud />
102+
97103
<h2 id="founders" className="mt-16 mb-2">
98104
Team
99105
</h2>

0 commit comments

Comments
 (0)